How can I refrence html object from aspx form.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mike John

    How can I refrence html object from aspx form.

    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

    #2
    Re: How can I refrence html object from aspx form.

    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.W ebControls.Chec kBox myCtrl;

    -or-

    2) protected System.Web.UI.H tmlControls.Htm lInputCheckBox 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@hot mail.com> schrieb im Newsbeitrag news:16ba01c33d cf$e28fdef0$a60 1280a@phx.gbl.. .[color=blue]
    > 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
    > [/color]

    Comment

    Working...