我在 asp 页面中有一个 Asp:Hyperlink,我正在动态设置文本和导航 url,但是当页面呈现时,它会在呈现的 href 中添加我的网站的相对路径。我不知道为什么?
ASPX
<asp:HyperLink runat="server" ID="charityNameText"></asp:HyperLink>
代码隐藏(页面加载事件)
//Getting data from database
charityNameText.Text = entryDetails.RegisteredCharityName;
charityNameText.NavigateUrl = "www.facebook.com";
charityNameText.Target = "_blank";
呈现的 HTML
<a id="ctl00_PageContent_CompetitionsEntries_ctl06_charityNameText" href="../../ConLib/Custom/www.facebook.com" target="_blank">save the childrens</a>
../../ConLib/Custom/ is the path where this file is located.
请帮助