How can I refrence html object from aspx form.

  • Thread starter Thread starter Mike John
  • Start date Start date
M

Mike John

I have created checkbox in the aspx form (html) not the
design.


Syntax:<input type =checkbox name ="mycheckbox">

now how can I read i's value from aspx.

I have type Me which stand for the current form, but the
mycheckbox was not in the list.


Sincelery yours


Mike John
 
You can either...

1) use the <asp:Checkbox RunAt="Server" id="myCtrl"/> element

-or-

2) use the <input type="checkbox" RunAt="Server" id="myCtrl"> element


then in your VB file, add

1) protected System.Web.UI.WebControls.CheckBox myCtrl;

-or-

2) protected System.Web.UI.HtmlControls.HtmlInputCheckBox myCtrl;


This is the same thing Designer does. After that you have a control to be displayed and a variable to be used in code.

HTH,
Axel Dahmen
 
Back
Top