I have the following code in my aspx file:
<input type="text" runat="server" id="test" name="test" onBlur="OnBlurFunction()"/>
When I click a submit button:
<asp:Button runat="server" id="SubmitButton" OnClick="SubmitButton" Text="Submit" />
The function "SubmitButton" contains the following:
System.Diagnostics.Debug.WriteLine(this.FindControl("test"));
When I run this, it always prints out a blank value and I'm not sure why. If I set the value in the HTML line as follows:
<input type="text" runat="server" id="test" name="test" value="hello" onBlur="OnBlurFunction()"/>
It prints "hello" with no issues. But when I manually change the value in the text box to something else, it always to print the first value out. It's as if something isn't dynamic. Am I doing something fundamentally wrong here?