i m trying to create a div container in c# codebehind.i want the div container to raise a javascript event onclick once its clicked.its working fine.below is the code where a javascript function "ds()" is called with no parameters.the problem is that i want to pass a parameter to javascript function.I dont know how to accomplish it.Kindly facilitate me.
//string userIcon = "gbn";
sb.Append(userIcon + @"<div onclick=""ds()"" style='background-color: #EFEFEF; padding: 10px;'>" + "<a href=#>" + "MubbshirAbbs" + "</a></div><br>");
Literal1.Text = sb.ToString();
The Javascript function is this:
function ds()
{
var a="";alert("123");
document.getElementById("TextBox1").style.backgroundColor="red";
}
Kindly let me know how can i add a parameter in the div onclick function.