2

The catch is this is a .NET 1.0 project and there is no hidden field control...

So this is out of the question:


<asp HiddenField Runat="server" ID="hdn" />

I vaguely remember some type of HtmlHiddenInput class that allowed similar functionality...does anybody know how to do this?

Thanks.

Michael Eakins
  • 4,149
  • 3
  • 35
  • 54
mmattax
  • 27,172
  • 41
  • 116
  • 149

3 Answers3

7

You can use a regular input or create a custom server control.

<input type="hidden" runat="server" />
Cristian Libardo
  • 9,260
  • 3
  • 35
  • 41
1

You can use <input type="hidden" Name="HiddenControl" runat="server" /> and at code behind page use below code:

protected System.Web.UI.HtmlControls.HtmlInputHidden HiddenControl;

You can assign value to hidden control: HiddenControl.value="Your value";

0

just use an asp textbox and the visible=false property

Jas
  • 888
  • 1
  • 8
  • 12
  • Its overkill to instantiate a textbox when you can just add 'runat=''server'' to a regular hidden input field. – immutabl Sep 26 '11 at 13:14