change background color of div on button click
In my code behind i am generating html string <a href='#' class='my-post' onclick='myFunc(" + Id + ")'> <div class='my-idea'> <span >23</span> <span class='heart'></span> </div> </a> I have implemented myFunc function in code behind as below funcString += "function myFunc(id){"; funcString += "document.getElementById(\"" + btn1.ClientID + "\").click();"; funcString += "}"; Then on btn1 click event i do some processing protected void btnSubmitWinnerPage_Click(object sender, EventArgs e) { // some processing } Now i want to change background color of div inside that href tag when button is click
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.