|
Hi Guys,
I have a problem about the "Back" button in firefox, it will not display the previous page as it should be prior the pressing of "Back" button. The first page is my search page where in I have an updatepanel, textbox, and button control. The process is that after the search page listed the records found it will redirected automatically to the 2nd page. And from here after clicking the "Back" button and goes back to the first page, the record listing here is empty.
Do I need to add something in my asp.net project in order the "Back" button to work correctly in firefox?
I tried it in IE and it works fine here, but in firefox no luck.
Have you encountered this kind of problem?
hifiger2004
|
|
|
|
|
I gotta tell ya... By far the most simple, most reliable means of accomplishing this is to get rid of the update panel on the first page and redirect to a results page that lists the records found (and also allows changing / narrowing the search). Now each search is in the browser's history, you can use cache-control headers to hint at how long they should be cached, and all is right with the world.
I'm not saying you couldn't get it working as-is; after all, you could set a flag somewhere persistent (cookies...) when the user has searched containing their search term, and just re-run the search when the page is reloaded. But why? You'd just be simulating the browser's built-in behavior, badly.
There's a reason Google, et. al. work the way they do - it works. When Microsoft rolled out their Live Search site, they tried using a fancy AJAX-style page refresh mechanism similar to what you describe... and they had the same problem you are running into now. They replaced it with a common post-refresh mechanism like everyone else. So, rather than wasting time trying to hack your own page history system, go with the tried-and-true... and then spend the time you saved making your back-end return search results faster.
---- ...the wind blows over it and it is gone, and its place remembers it no more...
|
|
|
|
|
Hi Shog,
You're right.
When I removed the updatepanel it works fine now in firefox
Thanks for the help
hifiger2004
|
|
|
|
|
i believe that the contents are not restored after the postbacks between the pages.If you have used COOKIES or SESSIONS in you .NET applications try assigning them correctly.This will work definitely.
pavan
|
|
|
|
|
Hi,
I get this error :
"HTTP 404. The resource you are looking for (or one of its
dependencies) could have been removed, had its name changed, or is
temporarily unavailable. Please review the following URL and make
sure that it is spelled correctly."
when I try to access a page that has a gridview. When I remove the
gridview, the page work. The page works when I execute it locally but
when I try to execute it on the Web it doesn't work.
I am using Visual Web Developer 2005 Express Edition.
Can anyone help me?
Lucie
|
|
|
|
|
Lucie123 wrote: When I remove the
gridview, the page work
The page works. locally? Does your page without Gridview run on your web server??? If you are not able to run the normal aspx page on your web server then it won't be any issue with Gridview. It might be because of your host. maybe. your host doesn't support the ASP.NET or ASP.NET 2.0.. or you are calling the wrong URL or wrong port number (when you run your page locally, there is a port number after then url but you don't need to give the port number when your site is on web server )
What I like to suggest you is that you should try to place the plain aspx page on your web server and see whether you can get it work or not. and then, place the gridview on this plain page and check it again.. then, you can try your completed page and see the result..
Hope it helps..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Hi Michael,
I have no problem accessing the page on the web server when the gridview is not on the page. Right after I put the gridview, it gives me the error.
Do you have any idea why it doesn't work.
I don't have IIS installed on my computer since with Microsoft Web Developer 2005 you don't need it, but it is installed on the Web server with the version v2.0.50727 which is the same that is installed on my computer.
Any idea why it does that?
Thanks!
Lucie
|
|
|
|
|
Hi, i need to do paging in datalist / datagrid, like the scenario i write below. All the values are fetching from database. in this case the paging options are A-C, D-G, ... I hope you people can understand. I need its solution little urgent.
Please give me any suggestion.
------------------------------------------------------------------------------------------------------
A - C D - G H - K L - N O - R S - V W - Z
A
ABB | Acme | AC Tech Drives | Adalet | Advance | AEG | Allied Molded Products | Amprobe | Asco
B
Bernstein | B-Line | Bodine
C
Cablofil | Carlo Gavazzi | Carlon | Coleman | Cooper | Crouse-Hinds | Cooper Power | Cooper Wiring | Cully
Thanks and Best Regards,
Sohail Arshed
|
|
|
|
|
|
can u please provide me some coding on rfc 2251 used in ldap to be implemented in asp showing creation of a form having some textboxes and other different fields
skd
|
|
|
|
|
|
Hi I am experimenting with VBScript and SQL and am unsure if the following code will actually work. I do not have access to IIS at present so I am unable to test it. I would be greatfull if anyone could just take a brief look at the code to see if the syntax is correct. Thanks
<%@Language = "VBScript" %>
<%Option Explicit%>
<%
Dim newDate
Dim newTime
Dim newMessage
Dim objConn
Dim sqlInsert
Dim objRecordSet
Set objConn = Server.CreatObject("ADODB.Connection")
objConn.ConnectionString="DRIVER={Microsoft Access Driver (*.mdb)};"&_"DBQ=C:/inetpub/wwwroot/feedBack.mdb"
objConn.Open
newDate = Date()
newTime = Time()
newMessage = request.form("strMessage")
if newMessage <> "" then
sqlInsert="INSERT INTO tblMessages(date,time,message) VALUES(newDate,newTime,newMessage)"
end if
Set objRecordSet=Server.CreateObject("ADODB.Recordset")
objRecordSet.Open "tblMessages", objConn,,,adCmdTable
Do while Not objRecordSet.EOF
Response.Write"" & objRs ("time") & " "
Response.Write objRs("date") & " "
Response.Write objRs ("message") & " "
Response.Write " "
objRecordSet.MoveNext
Loop
objRecordSet.Close
Set objRecordSet = Nothing
objConn.Close
Set objConn = Nothing.
%>
|
|
|
|
|
JonCox wrote: sqlInsert="INSERT INTO tblMessages(date,time,message) VALUES(newDate,newTime,newMessage)"
I think this is wrong
Why do you keep on adding this & "" in Response.Write??
The best way is that you should wait until you get the IIS back..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
thanks for the reply.....
i will revist the code, but i will get iis back on friday, so maybe this will help
|
|
|
|
|
hello i am using this
[code]
function counttxt()
{
var txtarea = document.getElementsByTagName("textarea")[0];
var len = txtarea.length;
if(len>500)
{
textarea.value = textarea.value.substring(0,500);
}
}
[/code]
sanjeev
|
|
|
|
|
function textCounter(maxlimit)
{
var field = document.getElementById(fieldId);
if (field.value.length >= maxlimit) // if too long...trim it!
{
field.value = field.value.substring(0, maxlimit);
event.keyCode = 0;
}
event.cancelBubble = true;
}
Hardik Panchal
|
|
|
|
|
I am working on online Dictionary project. Authorized people will work on it to submit word data. The data will be posted by filling a form for one word at a time.
The architecture that I designed for it based on AJAX. Submitter will submit the form then he will get update information about his progress.
Any how, the main problem is to submit a form. So I found the technique as under:
var params = getParam();
xmlHttp.open("POST", "scripts/insertwords.php", true);<br />
http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");<br />
http.setRequestHeader("Content-length", params.length);<br />
http.setRequestHeader("Connection", "close");<br />
xmlHttp.send(params);
Now I have to implement getParam() function. How can I extract form elements along with their name and their values in such manner as ?word=apple&meaning=a fruit&example=I ate apple .
OR
Tell me any alternate way to do the same thing.
Thanks in advance....
Shoaib Nawaz
|
|
|
|
|
Try like that..
function getParam(){<br />
var querystring = "?";<br />
<br />
querystring += "word=" + document.getElementById('txtWord').value;<br />
querystring += "&";<br />
querystring += "meaning=" + document.getElementById('txtMeaning').value;<br />
querystring += "&";<br />
querystring += "example=" + document.getElementById('txtExample').value;<br />
<br />
return querystring;<br />
}<br />
Hope it helps..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
He should also pass the values through encodeURIComponent() before appending them to the querystring.
---- ...the wind blows over it and it is gone, and its place remembers it no more...
|
|
|
|
|
Yeah. I forget that. thanks.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
can I do it as?
A word can have more than one meanings. So I insert elements dynamically according to the user.
I want to access them using like this
function getParam()<br />
{<br />
var querystring = "?";<br />
for(element in document.formname.elements)<br />
{<br />
querystring = querystring + element.name + "=" + element.value + "&";<br />
}<br />
return querystring;<br />
<br />
}
Shoaib Nawaz
|
|
|
|
|
As I don't know how many HTML elements exist in your page, I can't say that..
If you are sure that you want all values from all elements of your page then you can do it.. but if you do like my example, you won't miss anything....
So, I recommend you to do that.. you can try at your own risk.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
|
I have a question regarding calling web services from client side. You see the company I work for hosts sites in every version of asp - asp.net, and we have to work on a just about all of them. This makes something simple like sending form data to an email address a little bit of a pain. For /Net 2.0 I always use the System.Net.Mail Namespace, for 1.0/1.1 we have some 3rd party dll, and for classic asp we have some dinosaur code that is creating a COM object that seems to break all the time.
Now that I have used them all great, but for newer developers here it’s a pain... I won’t lie... It’s a pain for me too.
That’s when I thought, hey, why not build a web service and call it with JavaScript, then we could call it from any site with the same script. There is one problem with that though. It seems you have to use an XmlHTTPRequest which will not work cross domain. The thing is, in this case I really don’t care if it’s all, asynchronous and fancy. I just want it to work reliably.
Does anyone know a better cross platform solution?
Thanks,
-Adam N. Thompson
|
|
|
|
|
AdamNThompson wrote: Does anyone know a better cross platform solution?
Well, here's what i've done: code up a simple app that'll accept POST requests and do something useful with them. Then POST to it from whatever needs it. And FWIW, even classic ASP can use ServerXMLHTTPRequest to do cross-domain requests server-side.
---- ...the wind blows over it and it is gone, and its place remembers it no more...
|
|
|
|