I have added a text box called "Email" and also I have two different check boxes are there. It is called supervisor and users. If I click the supervisor check box, I just want to add a email id in the text box. If I click the second users check box, I want to add multiple email ids on the text box. If I click the supervisor check box, it is just want to clear the email id on text box that are specific to supervisor check box.
I am using C#.NET. My code is given below.
private void chklistSupervisor_Changed(object sender, System.EventArgs e)
{
if(chklistSupervisor.Checked)
{
txtEmail.Text = "" + Session["gEmailID"] + "";
}
else
txtEmail.Text = "";
}
private void chklistUser_Changed(object sender, System.EventArgs e)
{
if(chklistUser.Checked)
{
txtEmail.Text = "" + Session["gEmailID"] + ";" + Session["gUserEmailID"] + "" ;
}
else
txtEmail.Text = "";
}
Since I have added some code in the check box change event, It doesn't work properly. It gives some problem when i click the check box.
I just want to change the above code to work using Javascript. so I have to write a JavaScript for that.
Can anyone give any ideas on this.
I would highly appriciate any help.
Thanks in Advance.
I am using C#.NET. My code is given below.
private void chklistSupervisor_Changed(object sender, System.EventArgs e)
{
if(chklistSupervisor.Checked)
{
txtEmail.Text = "" + Session["gEmailID"] + "";
}
else
txtEmail.Text = "";
}
private void chklistUser_Changed(object sender, System.EventArgs e)
{
if(chklistUser.Checked)
{
txtEmail.Text = "" + Session["gEmailID"] + ";" + Session["gUserEmailID"] + "" ;
}
else
txtEmail.Text = "";
}
Since I have added some code in the check box change event, It doesn't work properly. It gives some problem when i click the check box.
I just want to change the above code to work using Javascript. so I have to write a JavaScript for that.
Can anyone give any ideas on this.
I would highly appriciate any help.
Thanks in Advance.