Hello folks..
I have a text box in which I m trying to call a function on its OnBlur event.
The function is defined in the aspx.cs page.
Problem arises when I try to debug, it says the function
Text_Blur is not defined.
Below is the code:
Front end:
<asp:TextBox ID="txtAutoComplete" runat="server" OnBlur="Text_Blur" CssClass="TextStyleFilter"></asp:TextBox>
Code Behind, aspx.cs:
public event EventHandler OnChange;
protected void Text_Blur(object sender, EventArgs e)
{
if (OnChange != null)
OnChange(this, EventArgs.Empty);
}
The event handler OnChange is to invoke an event in another user control.
Where am I going wrong?Any suggestions will be highly appreciated.
-Anurag