J
Janet
Hi,
I've created a User control, where it has a DropDownList and a Textbox.
Whenever the selectedindex is changed, the textbox will show the
SelectedValue of the dropdownlist.
Code in the ascx file
private void InitializeComponent()
{
this.cboCode.SelectedIndexChanged += new
System.EventHandler(this.cboCode_SelectedIndexChanged);
this.ID = "cboCode";
this.Load += new System.EventHandler(this.Page_Load);
}
public void cboCode_SelectedIndexChanged(object sender, System.EventArgs
eCboCode_SelectedIndexChanged)
{
txtDesc.Text = cboCode.SelectedValue;
}
When I include this control in the web form, is there any handling method I
have to include to make the dropdownlist event fire? Currently, there is
nothing shown on the textbox when the selectedindex changes.
Any help will be appreciated.
Thank You.
Regards,
Janet
I've created a User control, where it has a DropDownList and a Textbox.
Whenever the selectedindex is changed, the textbox will show the
SelectedValue of the dropdownlist.
Code in the ascx file
private void InitializeComponent()
{
this.cboCode.SelectedIndexChanged += new
System.EventHandler(this.cboCode_SelectedIndexChanged);
this.ID = "cboCode";
this.Load += new System.EventHandler(this.Page_Load);
}
public void cboCode_SelectedIndexChanged(object sender, System.EventArgs
eCboCode_SelectedIndexChanged)
{
txtDesc.Text = cboCode.SelectedValue;
}
When I include this control in the web form, is there any handling method I
have to include to make the dropdownlist event fire? Currently, there is
nothing shown on the textbox when the selectedindex changes.
Any help will be appreciated.
Thank You.
Regards,
Janet