I have a check box in my page as follows:
<asp:CheckBox ID="chkPayerCB"
runat="server"
Text="Payer Core Banking details"
TextAlign="Right"/>
I need to disable it on Page Load event of the page. I wrote the following code in code behind:
chkPayerCB.Enabled = false;
Though the check box is disabled but it still gets checked for a moment on clicking at it and then gets unchecked. Though it solves my purpose but I do not want it to be checked at any cost.
I am using VS 2008 Professional Edition (v 9.0.2). Please can anybody guide me on this.
You can use a different approach.
Set Enabled = False
in the Designer
.
If you need to enable it under some circustances you can use Page_Load
event.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With