How can I refrence html object from aspx form.

Discussion in 'ASP .Net' started by Mike John, Jun 29, 2003.

  1. Mike John

    Mike John Guest

    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
     
    Mike John, Jun 29, 2003
    #1
    1. Advertising

  2. Mike John

    Axel Dahmen Guest

    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

    ------------------------
    "Mike John" <> schrieb im Newsbeitrag news:16ba01c33dcf$e28fdef0$...
    > 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, Jun 29, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kevin Spencer
    Replies:
    0
    Views:
    473
    Kevin Spencer
    Jun 30, 2003
  2. Mike John

    How can I refrence the aspNetEmail

    Mike John, Jul 6, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    401
    dave wanta
    Jul 6, 2003
  3. Greg Phillips
    Replies:
    1
    Views:
    409
    Victor Bazarov
    May 26, 2004
  4. =?ISO-8859-1?Q?=22Nils_O=2E_Sel=E5sdal=22?=

    refrence from return value ?

    =?ISO-8859-1?Q?=22Nils_O=2E_Sel=E5sdal=22?=, Sep 29, 2004, in forum: C++
    Replies:
    8
    Views:
    412
    Sumit Rajan
    Sep 29, 2004
  5. Replies:
    5
    Views:
    109
Loading...

Share This Page