S
smccauslin
URLs are stored in a database in a form similar to www.mysite.com.
When the user clicks on the link, it should launch a seperate window
and go to that site. Here's the code
<asp:HyperLink
ID="HyperLink1"
runat="server"
NavigateUrl='<%# Bind("URL") %>'
Text='<%# Bind("URL") %>'
Target="_blank"
</asp:HyperLink>
All of the URLs in the database do not have http:// at the beginning.
I'd rather do it programmatically so that when new records are added,
the user does not have to remember to type http:// Is there an easyway
to code this so it is added at runtime?
In pseudo-code, I want to accomplish this:
NavigateUrl='<%# "http://" + Bind("URL") %>'
so that the data has http:// at the beginning. I'm just not sure how
to code it and haven't been able to find any examples.
Any suggestions are welcome! Thanks!
When the user clicks on the link, it should launch a seperate window
and go to that site. Here's the code
<asp:HyperLink
ID="HyperLink1"
runat="server"
NavigateUrl='<%# Bind("URL") %>'
Text='<%# Bind("URL") %>'
Target="_blank"
</asp:HyperLink>
All of the URLs in the database do not have http:// at the beginning.
I'd rather do it programmatically so that when new records are added,
the user does not have to remember to type http:// Is there an easyway
to code this so it is added at runtime?
In pseudo-code, I want to accomplish this:
NavigateUrl='<%# "http://" + Bind("URL") %>'
so that the data has http:// at the beginning. I'm just not sure how
to code it and haven't been able to find any examples.
Any suggestions are welcome! Thanks!