Changing value of hidden HTML input

Discussion in 'ASP .Net' started by Urs, Aug 3, 2006.

  1. Urs

    Urs Guest

    Hi

    How do I change the value of an HTML HIDDEN INPUT field from code behind (VB
    or C#)?

    I need this (invisible) field for some javascript to gather information once
    the page has been loaded.

    Thanks for any hints. Urs.
     
    Urs, Aug 3, 2006
    #1
    1. Advertisements

  2. Urs

    michaelkb Guest

    Pput an ID on it, and a runas="server" attribute on it. Then you can
    programmatically access it as a
    System.Web.UI.HtmlControls.HtmlGenericControl...
     
    michaelkb, Aug 3, 2006
    #2
    1. Advertisements

  3. Urs

    Urs Guest

    Found ASP.Net HiddenField, problem solved.
     
    Urs, Aug 3, 2006
    #3
  4. Urs

    michaelkb Guest

    Kewl... that's a new 2.0 one.. wasn't sure if you were using that or
    not. Cheers!
     
    michaelkb, Aug 3, 2006
    #4
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.