I have a HTML input box in my ASPX page like below
<input id="txtID" runat="Server" type="text" />
Now I have some code written in C# codebehind which calculate a value and I want that value to be displayed in the above TextBox.
I have already tried
txtID.Value = Number.ToString();
and
HtmlGenericControl ct = new HtmlGenericControl();
ct.InnerHTML = Number.ToString();
txtID.Controls.Add(ct);
but both of the above does not seems to set the display text of the textbox.
Can anyone help me figure out as to how do I get it done. I cannot use
<asp:TextBox />
EDIT (WITH CORRECT ANSWER): The way I was originally trying to do was correct i.e.
txtID.Value = Number.ToString();
The culprit was Placeholder Plugin which was getting called and was erasing the values from the TextBox. Hope this will help a lot of people like me who get stuck at such silly places.