How to keep input value in user controls after postback

  • Thread starter Thread starter elain
  • Start date Start date
E

elain

Hi all,

My webform contains a repeater, and every item in the repeater is a
user control which contains several textboxes. Each time when the page
is loaded, I bind a dataset to this repeater to let the user control
know how many textboxes it will display. After a user filling in those
textboxes, he will click a button to postback this page, what i want
to know is how can i keep and show up the values the users has already
inputed into those textboxes after postback? Is there any easy way to
do it besides using ViewState?

thanks,

Elain
 
elain said:
Hi all,

My webform contains a repeater, and every item in the repeater is a
user control which contains several textboxes. Each time when the page
is loaded, I bind a dataset to this repeater to let the user control
know how many textboxes it will display. After a user filling in those
textboxes, he will click a button to postback this page, what i want
to know is how can i keep and show up the values the users has already
inputed into those textboxes after postback? Is there any easy way to
do it besides using ViewState?

This is what ViewState is for. If you want, you could create your own
ViewState mechansim, but why?
 
Back
Top