Groups | Blog | Home
all groups > asp.net > june 2003 >

asp.net : How can I refrence html object from aspx form.



Mike John
6/28/2003 4:49:16 PM
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
Axel Dahmen
6/29/2003 2:45:00 AM
You can either...

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

-or-

2) use the <input type=3D"checkbox" RunAt=3D"Server" id=3D"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

------------------------
"Mike John" <RiadeAsleh@hotmail.com> schrieb im Newsbeitrag =
news:16ba01c33dcf$e28fdef0$a601280a@phx.gbl...
[quoted text, click to view]
AddThis Social Bookmark Button