evaleah Posted May 16, 2003 Posted May 16, 2003 New day... new problem.... I am looking for a way to produce tab-control like behaviour on several web pages. In other words: I want a user to be able to make changes on one page, go to another that is related, make changes on that one, go back to the first, persist the changes on the first, but not commit the whole thing until the user clicks a submit button, then save the entire kit and kaboodle from all the tabs. I was thinking to use a dataset and share that across the multiple pages. Is this the best way to do this? I would love any ideas and suggestions. Thanks, Eva Quote
*Gurus* Derek Stone Posted May 16, 2003 *Gurus* Posted May 16, 2003 ASP.NET's viewstate or session features can easily provide for this type of behavior. When a tab is clicked the current tab's information is posted back the server, saved in the control's viewstate and later collected and inserted into a database or other backend. Quote Posting Guidelines
evaleah Posted May 16, 2003 Author Posted May 16, 2003 Great. That is exactly what I was thinking I would do. Now, I have a big favor to ask.... Can you point me to a simple example of this being done? I am getting myself all confused about viewstate and session and how to retrieve data, etc.... Thank you so much! Quote
evaleah Posted May 16, 2003 Author Posted May 16, 2003 Well, I answered my own last question and from a place I had visited oh so many times before.... If anyone else is interested, the GrocerToGo example at http://docs.aspng.com/quickstart/aspplus/default.aspx?url=/quickstart/aspplus/doc/quickstart.aspx is a wonderfully easy-to-follow, baby-simple example of exactlly maintaining a dataset across pages. Quote
bungpeng Posted May 17, 2003 Posted May 17, 2003 I also think of this question (tab control), but do you think it is good everytime postback to server when I switch from one page to another? How about if I use Client site script to do something similar? In client site we can do whatever without postback to server until we save the record... don't you think is better? Quote
*Gurus* Derek Stone Posted May 17, 2003 *Gurus* Posted May 17, 2003 You could provide that level of client-side functionality, however you'd also have to support posting back to the server, since some browsers either do not support scripting or have it disabled. I wouldn't recommend an implementation such as this however, in situations where the user will be entering data. Quote Posting Guidelines
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.