By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,558 Members | 1,373 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,558 IT Pros & Developers. It's quick & easy.

HtmlInputHidden Control

P: n/a

I have pass new value from client to server, like this:

<script language="JavaScript">
function JSGenerateArticleID()
HiddenValue.value = "test";

<input id="HiddenValue" type="hidden" runat="server">
Then, I need to use this value on Code Behind, like this:

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

private void btnAdd_Click(object sender, System.EventArgs e)
clsArticle m_oArticle = new clsArticle();
m_oArticle.InsertArticle(HiddenValue.Value); // Not Working
Why after I have web-controls HiddenValue the Value is still null? Or,
Server-side did not recognize HiddenValue?

ps: What is relation between this control with AutoEventWireUp="true"?

Julius F


Hi Julius,

You have to pass the new value from client to server separately, the Label
element won't do it for you. There is a number of ways for doing this, most
common one is via a hidden <input> element.

Nov 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.