I have to create a javascript which contains an url in code behind page using C#. But the url parameter inside javascript doesn't have correct format after generated by C#.
Example:
Url parameter: http://google.com
Javascript: javascript:dnnModal.show('http://google.com',false,365,206,false)
C# code:
string link = "http://google.com?popUp=true";
string googleIcon = "<a href='javascript:dnnModal.show('" + link +',false,365,206,false)'><img border='0' src='~/Icons/gIcon.png'></a>";
After generated from code behind the page view the url incorrect format. There is the code of googleIcon after I am using "View Select Source" to view the code of aspx page:
<a href="javascript:dnnModal.show(" http:="" google.com?popup="true',false,365,206,false)'"><img src="~/Icons/gIcon.png" border="0"></a>
The hyperlink on icon just show this when I move the mouse over it:
javascript:dnnModal.show(
The url is lost and the remind string is lost too.
I need some help on my issue to show the way how to pass an url parameter into javascript using C#.