How to grant value to a html form hidden field

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
 
M

Mark Rae

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%>" />
 
B

bruce barker \(sqlwork.com\)

or

ClientScript.RegisterHiddenField(name,value);

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top