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

Posted on 2006-06-19
Medium Priority
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
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…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

777 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