Link to home
Start Free TrialLog in
Avatar of Saroj13
Saroj13

asked on

convert checkbox code to link in asp.net and c#

hi,

I want to convert checkbox into link. Clicking on checkbox will expand/collapse table. How the below can be converted if the checkbox is a link.

<asp:CheckBox id=chkExpandView runat="server" Font-Names="Arial" Font-Size="X-Small" AutoPostBack=true  OnCheckedChanged="chkExpandView_CheckedChanged" />
                    <font size="2" face="Arial"> <b>Expand All</b></font>

C#
 protected string DisplayScriptExpandCollapse()
    {
        if (this.chkExpandView.))
            return "display:block;";
        else
            return "display:none;";
            }
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Do you want the CheckBox to use an <anchor> style, or change the CheckBox to a HyperLink control?
ASKER CERTIFIED SOLUTION
Avatar of Tom Beck
Tom Beck
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial