开发者

target=_blank opening with same url

开发者 https://www.devze.com 2023-01-13 02:54 出处:网络
I added HyperLink control in my page.When I enter \"http://www.google.com\", It is opening in new window (good) and pointing google.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消