Link to home
Start Free TrialLog in
Avatar of WillyCornbread
WillyCornbread

asked on

How to prevent Literal and Textbox control repopulating?

Hi,

I have a literal and a textbox on my form, the contents of the literal are set in the Page_load with no postback check. Viewstate has been disabled for both controls, yet when a postback is performed, the textbox retains it's pre-post value, and so does the literal control. ( I know that viewstate doesn't hold the textbox value, blah blah blah)

I could handle the textbox by setting it's text to "" on postback, but the literal control SHOULD be refreshing itself each postback.

How can I make the page behave as it does when first loaded?

Thanks for your time,

b
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

>>with no postback check.
Why aren't you checking Page.IsPostBack before setting value?

Bob
Avatar of WillyCornbread
WillyCornbread

ASKER

I'm not checking, because I WANT to rebuild the literal regardless of whether the page was posted back, or the first access.

Thanks,

b
Well, I can't see any answer from what you described.

Bob
ASKER CERTIFIED SOLUTION
Avatar of WillyCornbread
WillyCornbread

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial