How do I retrieve hidden form fields posted to another page?

Posted on 2006-06-19
Last Modified: 2009-11-11
To create the hidden textboxes I've tried creating regular text boxes and making them hidden and by using RegisterHiddenField.

Then on the page I want to get the variables from, I've tried:


No combination returns the values.

Question by:dtburdick
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 16934900
This is how I'm doing it, I have a hidden HTML textbox:

<input id="hdnListText" type="hidden" name="hdnListText">

In my code I simply request as follows:

If Request("hdnListText") <> "" Then

I've had no problems with it.
LVL 52

Expert Comment

by:Carl Tawn
ID: 16934983
There is a specific control for hidden fields:

    <asp:HiddenField ID="HiddenField1" runat="server" Value="wibble" />

You can then retrieve the value using the methods in your original post.

Author Comment

ID: 16935623
Neither of those worked.

The first one returns blank.  I'm using C# so maybe it is syntax thing.

The second shows on the GUI "Error Creating Control" and when I hover over it the following error shows:

Parser Error: Could not load type System.Web.UI.WebControls.HiddenField from assembly System.Web, Version=, Culture=neutral, PublicKey Token=b03f5f7f11d50a3a.

Author Comment

ID: 16937279
I figured it out.

I was issuing the RegisterHiddenField method just prior to the Server.Transfer call so the controls are never actually posted.  I put them into the Page_Load() event and the posted through fine.

Accepted Solution

DarthMod earned 0 total points
ID: 17160202
PAQed with points refunded (125)

Community Support Moderator

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question