maintain the state of a hidden html control.

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default maintain the state of a hidden html control.

    Hi,
    I have a usercontrol which handles the menu functions which is
    included in the main form.My requirement is to pass a variable to the
    server and maintain its state when I click an item in the menu.
    I have a hidden htmlcontrol(runat="server") and i set a value to the
    control thru a javascript.
    Then submitted the form using "document.forms('frmMain').submit();".
    I am not able to get the value of hiddenhtml control in the server.Is
    there any way to get around this?

    thanks
    anthru
    George Guest

  2. Similar Questions and Discussions

    1. Hidden Couner HTML Code
      I need the HTML code to make a hidden counter. I had one on my old web site, but the code I have does not work on my new site. I've tried...
    2. view source problem with hidden control using IE
      I have a page that has several controls on it and the controls are shown or hidden during postback. I show and hide them using the visible...
    3. ASP.NET 2 Treeview does not maintain state
      I am new to ASP.NET so please bear with me.... I have a treeview in which the nodes are populated from a database. When I click on a node, some...
    4. Hidden HTML elements not posting
      New install of 4.3.3 and apache 1.3.27 as the web server. The install went fine, no major hickups or anything like that. But now, I'm finding...
    5. Ignore exception in Application_Error event but maintain state
      Hi, I would like to ignore a certain exceptions in Application_Error event in Global.asax.cs file and still have the page's state be maintained. ...
  3. #2

    Default Re: maintain the state of a hidden html control.

    Check out this article:
    Maintain State With Dynamic Controls
    [url]http://www.ftponline.com/vsm/2003_04/magazine/columns/aspnet/default.asp[/url]

    It won't give you the exact answer, but it will help you (page 3) understand
    what is going on with your hidden field.


    "George" <anthru77@yahoo.com> wrote in message
    news:da9dd0d7.0307201318.10a33650@posting.google.c om...
    > Hi,
    > I have a usercontrol which handles the menu functions which is
    > included in the main form.My requirement is to pass a variable to the
    > server and maintain its state when I click an item in the menu.
    > I have a hidden htmlcontrol(runat="server") and i set a value to the
    > control thru a javascript.
    > Then submitted the form using "document.forms('frmMain').submit();".
    > I am not able to get the value of hiddenhtml control in the server.Is
    > there any way to get around this?
    >
    > thanks
    > anthru

    Mike S Guest

  4. #3

    Default Re: maintain the state of a hidden html control.

    You can get the value of the hidden field in the server side using
    request.params("<name of the hidden field>") or using request.forms("<name
    of the hidden field>")

    --
    Saravana
    Microsoft India Community Star,
    MCAD,SE,SD,DBA.


    "George" <anthru77@yahoo.com> wrote in message
    news:da9dd0d7.0307201318.10a33650@posting.google.c om...
    > Hi,
    > I have a usercontrol which handles the menu functions which is
    > included in the main form.My requirement is to pass a variable to the
    > server and maintain its state when I click an item in the menu.
    > I have a hidden htmlcontrol(runat="server") and i set a value to the
    > control thru a javascript.
    > Then submitted the form using "document.forms('frmMain').submit();".
    > I am not able to get the value of hiddenhtml control in the server.Is
    > there any way to get around this?
    >
    > thanks
    > anthru

    Saravana Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139