How can I refrence html object from aspx form.

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
 
A

Axel Dahmen

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top