in HTML:
<script type="text/javascript">
function removeIndustry(item)
{
confirm(item);
}
</script>
in C#:
protected void Page_Load(object sender, EventArgs e)
{
Label1.Text = "<a href='javascript:removeIndustry('IndustryNameHere')'><i class='icon-remove'></i></a>Click";
}
The code is not working if I put any strings like 'IndustryNameHere' in that function. Without any values, it is working fine. Anyone please help me fix this error. Thanks a lot.
'single-quote for the parameter. Seems to me that these quotes are in conflict with each other. Can you share your resulting HTML of what you have currently? i.e. with thisIndustryNameHerestring in it."instead of single-quote for the parameters to be wrapped around with i.e. it should look like this:"<a href='javascript:removeIndustry("IndustryNameHere")'><i class='icon-remove'></i></a>Click";.