hidden fields

  • Thread starter Thread starter Jawahar Rajan
  • Start date Start date
J

Jawahar Rajan

All,
I am adding a hidden field to my web from from the tool box under the HTML
contorls.
How ever I am not able to control in by code behind vb page.
For example I add a HTMLInputHidden control called Hidden1 to the form. Then
in a post back I say

if isPostback then
dim txt as string
txt = Hidden1.value
End if

I keep getting error that Hidden1 is not declared even though I have
dragged the control on the form and named it Hidden1
Do I need to reference somthing in particular. I noticed that if I user web
controls they automatically get added to the Web Form Designer Generated
code
and declared as Protected WithEvent .....

Why is this ?

Any help is appreciated.

Jawahar
 
Hi Jawahar,

You can (normaly) not reference to a HTML control you have added to your
page.

That is exactly the reason from the ASPX controls.

I hope this helps,

Cor
 
Back
Top