Selected Text event not working
-
Hi all I have a textbox(tboContent) im typinh data into and another one tboCharacters i would like to display information ie the number of text i have entered in the first textbox. I have added that to the textchanged event and set autopostback to true. I added the control as a trigger on the Update panel but nothing changes gets displayed on the display screen until i submit the form manually(say clicking another control with postback set to true) Does anyone know how to solve this problem. protected void tboContent_TextChanged1(object sender, EventArgs e) { tboCharacters.Text = Convert.ToString(160 - Convert.ToInt64(tboContent.Text.Length - 1)); } Thank you.
-
Hi all I have a textbox(tboContent) im typinh data into and another one tboCharacters i would like to display information ie the number of text i have entered in the first textbox. I have added that to the textchanged event and set autopostback to true. I added the control as a trigger on the Update panel but nothing changes gets displayed on the display screen until i submit the form manually(say clicking another control with postback set to true) Does anyone know how to solve this problem. protected void tboContent_TextChanged1(object sender, EventArgs e) { tboCharacters.Text = Convert.ToString(160 - Convert.ToInt64(tboContent.Text.Length - 1)); } Thank you.
-
Hi all I have a textbox(tboContent) im typinh data into and another one tboCharacters i would like to display information ie the number of text i have entered in the first textbox. I have added that to the textchanged event and set autopostback to true. I added the control as a trigger on the Update panel but nothing changes gets displayed on the display screen until i submit the form manually(say clicking another control with postback set to true) Does anyone know how to solve this problem. protected void tboContent_TextChanged1(object sender, EventArgs e) { tboCharacters.Text = Convert.ToString(160 - Convert.ToInt64(tboContent.Text.Length - 1)); } Thank you.
public partial class Home_Page_frmSMSTemplate: System.Web.UI.Page { long lngSMSID = 0; // long lngContactID = 0; string strUserName = ""; SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString); protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { lblNewRecord.Text = "true"; strUserName = Convert.ToString(Session["UserName"]); //strUserName = Convert.ToString(Request.QueryString["strUsername"]); lngSMSID = Convert.ToInt64(Request.QueryString["ID"]); LoadSMSDetail(lngSMSID); } else { lngSMSID = Convert.ToInt64(Request.QueryString["ID"]); strUserName = Convert.ToString(Session["UserName"]); //strUserName = Convert.ToString(Request.QueryString["strUsername"]); } } private void LoadSMSDetail(long lngSMSID) { try { LoadMergeFields(); if (con.State == ConnectionState.Closed) { con.Open(); } SqlCommand SqlCmd = new SqlCommand("Get_SMSTemplate", con); SqlDataReader dtr; SqlCmd.Parameters.AddWithValue("@SMSTemplateID", lngSMSID); //SqlCmd.Parameters.AddWithValue("@ContactID", lngContactID); SqlCmd.CommandType = CommandType.StoredProcedure; dtr = SqlCmd.ExecuteReader(); while (dtr.Read()) { tboName.Text = (string)dtr["SMSTemplateName"]; //tboSubject.Text = (string)dtr["SMSTemplateText"]; rbtnAuditor.Checked = (bool)dtr["IsScheduledAuditor"]; rbtnSite.Checked = (bool)dtr["IsScheduledSite"]; rbtnNotification.Checked = (bool)dtr["IsNotification"]; rbtnReport.Checked = (bool)dtr["IsAuditReport"]; rbtnSample.Checked = (bool)dtr["IsScheduledSamples"]; rbtnReSite.Checked = (bool)dtr["IsReScheduledSite"]; rbtnFotten.Checked = (bool)dtr["IsForgotPassword"]; rbtnNewIncident.Checked = (bool)dtr["IsNewIncident"]; rbtnIncidentReassign.Checked = (bool)dtr["IsReassignedIncident"]; rbtnReactivatedInc.Checked = (bool)dtr["IsReactivatedIncident"]; rbtnActionsNotification.Checked = (bool)dtr["IsNewAction"]; r