User Control in VB.NET
I have a hyperlink as a user control. When I click it, I need to open a new popup window. My code is like this:
CType(hypowner.FindControl("txtEmp"), HyperLink).NavigateUrl = "EmployeeDetails.aspx?empno=" + myPlant.OwnerID
Here, "hypowner" is the hyperlink on my current page. "txtemp" is the hyperlink from my user开发者_Python百科 control. The same way, I got to do for ten such controls. They take different query strings. Could someone help me with this please?
Thanks.
Use window.open
<a href="javascript:;" onclick="javascript:window.open(...)">Text</a>
Edit
If the href
is already set, you can use something like this:
<a
href="http://www.google.com/"
onclick="javascript:window.open(this.href, ...);return false;"
>Text</a>
精彩评论