Sridhar John

Sridhar John

  • NA
  • 109
  • 4.6k

textchanged event is not firing in textbox.

Jun 11 2019 5:44 AM
Please help me this is my code
 
Code Behind:
protected void txtPincode_TextChanged(object sender, EventArgs e)
{
try
{
TextBox lsender = (TextBox)sender;
if (lsender.Text.Contains("(") && lsender == txtPincode)
{
lsender.Text = lsender.Text.Split('(')[1].Replace(")", "");
}
}
catch (Exception exp)
{
Log.writeLog(exp);
}
}
.aspx code:
 
<asp:Label ID="lblPincode" runat="server" Font-Size="Small" Text="Pincode" Font-Bold="true"></asp:Label> 

Answers (4)