Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hyperlink problem 1

Status
Not open for further replies.

Pampers

Technical User
Apr 7, 2004
1,300
0
0
AN
Hi everyone,
I am trying to create a hyperlink. But is not working (it will point to a website withing my website). Say the website url is: It requests this:

Requested URL: /ASPNET_MasterPages_Tutorial_01_VB/and I want:


Here is my code.

Code:
w: <asp:hyperlink runat="server" text = '<%#Eval("ApartmentWebsite")%>' 
                    Navigateurl= '<%#Eval("ApartmentWebsite")%>'></asp:hyperlink>

Pampers [afro]
Keeping it simple can be complicated
 
hi ca8msm,
Tnx for the reply, yes that is what i figured as well. But how to do that. Tried all kinds concatenations, but no luck... How u think one has to do that?


Pampers [afro]
Keeping it simple can be complicated
 
You could do it one of two ways; either in the data source prior to sending it to the client (i.e. in sql), or from within a function that checks whether the input value contains "http" and if not prepends it to the start of the value.


Mark,

Darlington Web Design[tab]|[tab]Experts, Information, Ideas & Knowledge[tab]|[tab]ASP.NET Tips & Tricks
 
Hi ca8msm,
I thought i tried putting " in the datasource before. Ha. But this time around it worked. I added to the query, and it works fine. Thanks a lot for the answers and swift reply.

Pampers [afro]
Keeping it simple can be complicated
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top