Click here to Skip to main content
15,894,405 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi friends

highlight a button until we click another button in menu in asp.net c# using javascript/jquery/css.


Thanks in advance
Posted
Comments
Avinash_Pathak 18-Dec-12 5:39am    
you have to create 2 css class for that..on 1st button click just pass 1st class from code behind that will be your default class and in last line of that click event pass it 2nd css class that will be use for highlight your button. thats it...do it on every button
subba.mind 18-Dec-12 5:49am    
I don't get it.if u have time send code to me

1 solution

C#
protected void Page_Load(object sender, EventArgs e)
       {
           

           
           defaultcss();
          



       }
protected void defaultcss()
        {
            fivedays.CssClass = "change";
            onemonth.CssClass = "change";
            threemonth.CssClass = "change";
            sixmonth.CssClass = "change";
            oneyear.CssClass = "change";
            twoyear.CssClass = "change";


        }

 protected void fivedays_Click(object sender, EventArgs e)
        {
            btnmedicines.Enabled = true;
            fivedays.CssClass = "selected";
            
        }
 
Share this answer
 
Comments
Avinash_Pathak 18-Dec-12 6:36am    
do something like this...make 2 css class...I did same as you want by using the above code...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900