In the checkchanged event of the checkbox you can just call the
btnSave_Click event.
Ex:
private void CheckBox1_CheckedChanged( object sender, System.EventArgs e)
{
btnSave_Click(sender, e);
}
or
btnSave_Click(null,null);
or
((IPostBackEventHandler)btnSave).RaisePostBackEvent( null);
If you want to call dropdown selected index changed method then do the following steps.
Ex: Object sender=new Object();
btnSave_Click event.
Ex:
private void CheckBox1_CheckedChanged(
{
btnSave_Click(sender, e);
}
or
btnSave_Click(null,null);
or
((IPostBackEventHandler)btnSave).RaisePostBackEvent(
If you want to call dropdown selected index changed method then do the following steps.
Ex: Object sender=new Object();
EventArgs myargs=new EventArgs();
// Call the Drop down list Selected Index changed method
ddlMyDropDown1_SelectedIndexChanged(sender, myargs);
1 comments:
Creating custom buttons in C#.NET
Post a Comment