M
Magnus Blomberg
Hello!
An common issue for me is that I have a web control, double-click it to
reach the event in the code-behind. Then I for example get the code:
protected void CheckBox1_CheckedChanged(Object sender , EventArgs e)
This is good, but if I then want to use the sender as a control, for
instance the methods are not for the Checkbox, but for the Object.
This is quite obvious, but how to solve it?
I can't (or it's not recommended to) write if (sender.Checked == true)...
Should I convert it, and if so, how?
Regards Magnus
An common issue for me is that I have a web control, double-click it to
reach the event in the code-behind. Then I for example get the code:
protected void CheckBox1_CheckedChanged(Object sender , EventArgs e)
This is good, but if I then want to use the sender as a control, for
instance the methods are not for the Checkbox, but for the Object.
This is quite obvious, but how to solve it?
I can't (or it's not recommended to) write if (sender.Checked == true)...
Should I convert it, and if so, how?
Regards Magnus