C
chris
In my CreateChildControls() function, I am adding onClick code to a HyperLink
control. The OnClick makes a call to a javascript function and looks like
this:
_hlDisplay.Attributes.Add("OnClick", "javascript:showPopup(document.all." +
this.ClientID + "_" + textBox.ID + ", " + "\"test string\")");
The problem is the double-quotes around the 2nd parameter, "test string". I
would like the above to render as:
<a href='javascript:void(0);'
OnClick='showPopup(document.all.testControl_textBox, "test string"'>click</a>
Unfortunately, I keep getting the double-quotes replaced by " in the
rendered HTML:
<a href='javascript:void(0);'
OnClick='showPopup(document.all.testControl_textBox, &quit;test
string&quit;'>click</a>
I have tried the \" shown above, as well as '\u0022'.
Suggestions?
control. The OnClick makes a call to a javascript function and looks like
this:
_hlDisplay.Attributes.Add("OnClick", "javascript:showPopup(document.all." +
this.ClientID + "_" + textBox.ID + ", " + "\"test string\")");
The problem is the double-quotes around the 2nd parameter, "test string". I
would like the above to render as:
<a href='javascript:void(0);'
OnClick='showPopup(document.all.testControl_textBox, "test string"'>click</a>
Unfortunately, I keep getting the double-quotes replaced by " in the
rendered HTML:
<a href='javascript:void(0);'
OnClick='showPopup(document.all.testControl_textBox, &quit;test
string&quit;'>click</a>
I have tried the \" shown above, as well as '\u0022'.
Suggestions?