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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with postback in ASP.NET and C#

Status
Not open for further replies.

TeaAddictedGeek

Programmer
Apr 23, 1999
271
US
I have a form with a summary page that I'm coding in ASP.NET and C#. The values are passed to the summary page, and if the user made an error, they can go back to the previous form page and correct the changes.

My problem is with the postback. It keeps overriding any changes that the user did on the forum. I'm using session variables to remember what the user put in and pass them to the summary page as well. There may be a better method; I don't know. I confess being still rather new to the ASP.NET/C# arena.

Has anyone ever come across this problem before with the postback? If so, could you please tell me what you did to solve it? I'm at my wits end here.


Thanks a bunch in advance,
Andrea

andrea_m_berman@yahoo.com
 
Have you considered using panels on a single page instead of navigating between pages and then either show or hide the appropriate panel. I have had much more success with this because you can then access those hidden controls directly and they are maintained through postbacks. Just and idea...
 
Well, that's really the problem is the postback. There are commands that get fired in the page_load() section that I don't want to fire if a person is coming through after already having filled out the values, but now wants to correct them. The page_load() puts in those values, but when the user tries to change them, the page_load() fires before the button code does, and the values are overwritten with the previous values.

Does this make any sense? Let me know if I need to step through anything, and thanks in advance!

andrea_m_berman@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top