Hidden field doesn't work?

Discussion in 'ASP .Net' started by =?Utf-8?B?Sm9obg==?=, Sep 19, 2007.

  1. <input type="hidden" id="myHiddenField">

    document.getElementById("myHiddenField").value = "HiddenValue"

    protected void Page_Load(object sender, EventArgs e)
    {
    //Why cannot get anything here???
    string hiddenStr = Request.Form["myHiddenField"];
    }

    I can get values from textbox that is enabled and visible. Is there anyway
    around?

    Thanks.
     
    =?Utf-8?B?Sm9obg==?=, Sep 19, 2007
    #1
    1. Advertising

  2. Solved.

    Thanks.

    "John" wrote:

    > <input type="hidden" id="myHiddenField">
    >
    > document.getElementById("myHiddenField").value = "HiddenValue"
    >
    > protected void Page_Load(object sender, EventArgs e)
    > {
    > //Why cannot get anything here???
    > string hiddenStr = Request.Form["myHiddenField"];
    > }
    >
    > I can get values from textbox that is enabled and visible. Is there anyway
    > around?
    >
    > Thanks.
     
    =?Utf-8?B?Sm9obg==?=, Sep 19, 2007
    #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. Rick
    Replies:
    3
    Views:
    8,570
    Alexey Smirnov
    Apr 13, 2010
  2. GavMc
    Replies:
    4
    Views:
    376
    Evertjan.
    Sep 22, 2005
  3. Roy Adams

    writing from hidden field to text field

    Roy Adams, Dec 20, 2004, in forum: Javascript
    Replies:
    1
    Views:
    220
  4. Roy Adams
    Replies:
    3
    Views:
    291
    Dr John Stockton
    Dec 21, 2004
  5. Sound
    Replies:
    2
    Views:
    498
    Randy Webb
    Sep 28, 2006
Loading...

Share This Page