How to grant value to a html form hidden field

  • Thread starter Thread starter David Jia
  • Start date Start date
D

David Jia

I have a html form in aspx pages, so how can I grant value to the hidden
field in this form?

For Example:

<body>
<script language="C#" runat="server">

string strTest = "test";
</script>

<form name="try" action="post" >
<input name="test1" type="hidden" />
</form>

How to make test1's value equals to strTest in C# script. Thank you very
much
 
David,

Ignore Bruno's reply...
How to make test1's value equals to strTest in C# script. Thank you very
much

<input name="test1" type="hidden" value="<%=strTest%>" />
 
or

ClientScript.RegisterHiddenField(name,value);

-- bruce (sqlwork.com)
 
Back
Top