Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IE IsPostBack bug?

Status
Not open for further replies.

AndrewJMarshall

Programmer
Jun 8, 1999
24
US
I have a simple app that displays images and allows he user to enter keywords. I build the form dynamically in the Page_Init method (for several reasons).

If the user does not want to work on the image, they can click the Skip button. In the Skip_Click method, I mark the item as skipped and Response.Redirect back to the page using the Request.Url.AbsoluteUri because there is important info in the QueryString. I added JavaScript to the page to call the button's click method if the user presses the Esc key.

If the user clicks the button with the mouse, IsPostBack is false after the Response.Redirect. However, if the user presses the Esc key, IsPostBack is true after the Response.Redirect. Oops, I almost forgot this only happens in IE.

I hacked in a solution in the Skip_Click method, but it's total BS.

Any thoughts on what the problem and/or solution is?

Many thanks,
Andrew
 
try forum855. the problem is a webforms issue, not c#.

Jason Meckley
Programmer
Specialty Bakers, Inc.

faq855-7190
faq732-7259
 
This is a Javascript problem. Make sure it returns false in the esc function to avoid the postback.

[morning]


"The computer programmer is a creator of universes for which he alone is responsible. Universes of virtually unlimited complexity can be created in the form of computer programs."
-Joseph Weizenbaum
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top