Click here to Skip to main content
16,019,359 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
protected void Page_Load(object sender, EventArgs e)
    {

if (!IsPostBack)
        {

Table_ID.Style.Add("CssClass", "sel_tbl");

}

}

protected void btn_find_Click(object sender, EventArgs e)
    {

Table_ID.Style.Add("CssClass", "selecttable_style_new");
}



It , does't perform
Posted
Updated 17-May-14 3:27am
v2
Comments
DamithSL 17-May-14 9:40am    
what is Table_ID? can you update the question with aspx page code of Table_ID?

You can set css dynamically using javascript and jquery


Javascript

JavaScript
document.getElementsByClassName("tableID").ClassName = "ClassName"; 


Jquery

JavaScript
$("#TableID").addClass("className");
 
Share this answer
 
try with
C#
Table_ID.Attributes["class"] = "selecttable_style_new";
 
Share this answer
 

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