How to keep input value in user controls after postback

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
 
J

John Saunders

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,533
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top