Monday, March 26, 2012

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
anthruCheck out this article:
Maintain State With Dynamic Controls
http://www.ftponline.com/vsm/2003_0...net/default.asp

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
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

0 comments:

Post a Comment