Possible Duplicate:
convert javascript variable to C# variable
I have a c# code in which JavaScript code is embedded. I need to pass the variable label to C# function.. Is this possible? if then how can I achieve it?
StringBuilder ts = new StringBuilder("<script language='javascript' type='text/javascript'>");
ts.Append(var label="testLabel";);
ts.Append("</script>");
HtmlGenericControl div = new HtmlGenericControl("div");
div.Attributes.Add("id",DivId);
div.InnerHtml = ts.ToString();
Container.Controls.Add(div);