Hidden textbox values lost!!

  • Thread starter Thread starter Rajesh
  • Start date Start date
R

Rajesh

Hello all,
I have a problem here.
I have a procedure called FillForm() where I populate values for some hidden
asp:textboxes.
But after I do a postback, my values in the textboxes are lost and I see
only "" values.

Hope someone can help me with this.
Thank you.
 
Well, I I did not specify the EnableViewState property.
So by default it should be true.

Oh! and I forgot; when I make the textboxes to be visible and not hidden
anymore,
the values are retained.
Strange isnt it!!
 
Use html hidden control, before using right click and choose 'run as server
control'.

This is better instead of a normal textbox, when u say visible=false for any
webserver control, the control is not emitted at all.

Another good trick if u are bent on using the textbox is,
1. make its border flat instead of 3d, with no border.
2. make the background color of the text box equal to the page background
color.
3. visible can be true.
Kind of merges with the background.
 
Back
Top