Unable to access values at server side.

  • Thread starter Thread starter aarsalan
  • Start date Start date
A

aarsalan

Hi,

I made a .NET web form ( NonGrid, in C# web application ),
Added HTML controls (Text boxes) and set them to run at
server side. I also set form to runat Server side.

I added button ( Web controls ) on form but when at the
event onclick of buttons (at server side) i tried to
access inputs values of my text boxes i get the values
that i set at design time. ( if it is empty at design
time, i get empty and if i set some default value then i
get that default value). I think this is some thing to do
with state of page. can any body help me with this and
advise how i can get rid o this problem.

Every thing works fine in other pages, but i am getting it
at one of my core forms.

Thanks,
 
Hi,

make sure enableviewstate is on if you want to access values from controls
across postbacks. How are you accessing (get / set) the values to / from the
InputTextControl. The property I'm using is Value, and it is working fine.

Can you post us the relevant code ?

Thanks
Joyjit
 
Back
Top