The following is on my asp.net page written in c#. Where someURL is asp.net string variable that contained a html link such as http:\www.somewebsite.com.
ClientScript.RegisterStartupScript(typeof(Page), "openPage", "<script type='text/JavaScript'>var link1 = document.getElementById('<%=someURL.ClientID%>');window.open(link1);</script>");
The objective is when the above javascript executed it will open a new browser page with the url contained inside the someURL string (http:\www.somewebsite.com, etc.)
My problem was that it opens a blank page with nothing in the url. And I think I know why... the someURL variable referenced inside the javascript code was not from the calling asp.net page.
Am I right? Any suggestion on how to achieve my objective?
Thank you.