target=_blank opening with same url
I added HyperLink control in my page. When I enter "http://www.google.com", It is opening in new window (good) and pointing google.
1. When I enter 开发者_C百科"www.google.com", It is opening in new window, but Url is "http://mysite.com/www.google.com". Why this is happing? How to should point to www.google.com
<a href= '<%# Eval("ConferenceUrl") %>' runat ="server" id="ConferenceUrl"
target="_blank"> <%# Eval("ConferenceUrl")%> </a>
You need http://
in the url, I believe.
The <%# Eval("ConferenceUrl") %>
needs to have the http://
prefix. Either change your data or add it to the href
attribute.
<a href= 'http://<%# Eval("ConferenceUrl") %>' runat ="server" id="ConferenceUrl" target="_blank"> <%# Eval("ConferenceUrl")%> </a>
you have to add http:// in the beginning of href
精彩评论