|
-
Jun 22nd, 2006, 10:32 PM
#1
Thread Starter
Lively Member
IE better than FireFox???
In my project, I have a text box and a button. when button is clicked (text of TextBox is "Unbelievable"), Page will be direct to "abc.aspx".
But the problem is text box.
I standing at abc.aspx and press Back button of browser.
If the browser is IE, text of TextBox is "Unbelievable".
If the browser is FF, text of TextBox is "".
I don't know what is happening in my web page.
Thank you for any help.
-
Jun 24th, 2006, 11:37 AM
#2
Re: IE better than FireFox???
So you're saying when you click the button, the text of the textbox is set to 'unbelievable' and within the same event, you redirect to another page?
First of all, I can see no conceivable reason as to why you would want to do that: populate a textbox and then redirect. Why even populate it?
Second, this is happening because firefox is reloading the page from the server, while IE is giving you the cached version of the page.
-
Jun 24th, 2006, 01:25 PM
#3
Re: IE better than FireFox???
If you leave out the value attribute on the textbox Firefox does not reset it when loading the cached version.
Edit: Oh yeah, and nice dramatic attention-grabbing thread title. Worked well
-
Jun 25th, 2006, 08:51 PM
#4
Thread Starter
Lively Member
Re: IE better than FireFox???
 Originally Posted by mendhak
So you're saying when you click the button, the text of the textbox is set to 'unbelievable' and within the same event, you redirect to another page?
First of all, I can see no conceivable reason as to why you would want to do that: populate a textbox and then redirect. Why even populate it?
Second, this is happening because firefox is reloading the page from the server, while IE is giving you the cached version of the page.
Hi mendhak,
At first, I apolozise about my Question. When I click the button, textbox isn't set to 'unbelievable', It was set before I click the button.
I've try a new way to understand more about FF and IE.
Now, I have two textbox. One shows the Name (txtName), one shows the FName (txtFName). When value of Name is changed, value of txtFName is changed too. When i click the button, the Page will go to abc.aspx. Then, I click Back button on standard buttons in abc.aspx, page returns back.
But with IE: the values of txtFName, txtName are stored.
With FF: the value of txtFName is stored but value of txtName is not.
In my code behind, I reset value of txtFName = "" before I go to next page.
And i want values of txtFName, txtName are stored or not stored, not one of them is stored.
So, What should i do now?
-
Jun 27th, 2006, 05:29 AM
#5
Addicted Member
Re: IE better than FireFox???
To keep the values use Cache code to put the values back ionto the page text box's:
http://aspnet.4guysfromrolla.com/articles/100902-1.aspx
To stop the catch from doing this try clearing rthe browser catch with asp with:
<% Response.CacheControl = "no-cache" %>
<% Response.AddHeader "Pragma", "no-cache" %>
<% Response.Expires = -1 %>
Not sure if that code works any more but may do

I will wait for death with a smile and a big stick
-
Jun 27th, 2006, 08:42 PM
#6
Thread Starter
Lively Member
Re: IE better than FireFox???
 Originally Posted by rabid lemming
To keep the values use Cache code to put the values back ionto the page text box's:
http://aspnet.4guysfromrolla.com/articles/100902-1.aspx
To stop the catch from doing this try clearing rthe browser catch with asp with:
<% Response.CacheControl = "no-cache" %>
<% Response.AddHeader "Pragma", "no-cache" %>
<% Response.Expires = -1 %>
Not sure if that code works any more but may do
I had tried your code. but It don't have any thing better.
-
Jun 28th, 2006, 05:57 AM
#7
Addicted Member
Re: IE better than FireFox???
Ok then try this maybe:
Code:
Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
' check page isn't been post back from form event procedures
' Might need to be "If Page.IsPostBack Then" as can't be sure which one you need
If Not Page.IsPostBack Then
'Add code to empty the text box's i.e.
MyTextBox.text = ""
End if
end sub
Might that work ? Or you could just have
Code:
Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
'Add code to empty the text box's i.e.
MyTextBox.text = ""
end sub
That would clear the text box's every time but would cause problems with from post back events as the text box's would loose their data but you can work around that by adding it back in with catch code
Hope this helps a bit ?

I will wait for death with a smile and a big stick
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|