473,324 Members | 2,567 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

HtmlInputHidden Control

Okay,

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

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

<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
BindingDataGrid();
}
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"?

Thx,
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.

Eliyahu
Nov 19 '05 #1
0 1071

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Bruce Rusk | last post by:
I'm using Stephen Lebans' RTF2 control in a report, and have discovered what may be a slight bug in it. I have a lot of non-Western language (Chinese) text in my RTF field, and such records get...
6
by: martin | last post by:
Hi, I am a web page and a web user control. My web user control is placed in my web page using the following directive <%@ Register TagPrefix="uc1" TagName="Header"...
2
by: Jiho Han | last post by:
In CreateChildControls method of my Page, I am trying to see if a hidden input field is present (by id) and if not, add it to a predefined form (by id). protected override void...
2
by: John Lau | last post by:
Hi, Is there documentation that talks about the page lifecycle, the lifecycle of controls on the page, and the rendering of inline code, in a single document? Thanks, John
6
by: heybrakywacky | last post by:
After hours of pulling my hair out on this one, I've finally realized that the problem I'm having in my code is due to behavior that is not at all expected. Using ASP.NET 1.1.4322.2032, I'm...
4
by: Jack | last post by:
In page1:<INPUT id="MD" type="hidden" name="MD" value="Hello world">, and there is a button, has a javascript onclick event, in this event, a popup window will appear. In the pop-up window, how...
2
by: Mike | last post by:
Hi, I am strugling with a simple problem which I can't seem to resolve. I have an asp.net page which contains a server-control (flytreeview, which is a kind of a tree to be exact). The tree is...
0
by: Ma³y Piotruœ | last post by:
Hello, (Sorry for my English, it's not my country language). I created .aspx page with HTML control: <input id=CustomersType name=CustomersType type=hidden runat=server> and I have it...
15
by: rizwanahmed24 | last post by:
Hello i have made a custom control. i have placed a panel on it. I want this panel to behave just like the normal panel. The problem i was having is that the panel on my custom control doesnt...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.