473,407 Members | 2,676 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

problem with <asp:HyperLink ------

I am trying to let the users test if their web adresses are working or
not. so they input their web adress and click a button and then the
asp:hyperlink will point to their website. the problem is when they
click asp:hyperlink points to

http://www.mysite.com/myWorkingDirec...serWebSite.com

instead of

www.userWebSite.com
I am using the following.
HyperLink1.NavigateUrl = webSite.Text;
//webSite is a Text Box

Feb 9 '06 #1
5 1210
you may be doing: HyperLink1.NavigateUrl += webSite.Text;
if thats the case just remove the +
"newhorizon" <me********@gmail.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
I am trying to let the users test if their web adresses are working or
not. so they input their web adress and click a button and then the
asp:hyperlink will point to their website. the problem is when they
click asp:hyperlink points to

http://www.mysite.com/myWorkingDirec...serWebSite.com

instead of

www.userWebSite.com
I am using the following.
HyperLink1.NavigateUrl = webSite.Text;
//webSite is a Text Box

Feb 9 '06 #2
on the other hand, you might need to add http:// to your string

"newhorizon" <me********@gmail.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
I am trying to let the users test if their web adresses are working or
not. so they input their web adress and click a button and then the
asp:hyperlink will point to their website. the problem is when they
click asp:hyperlink points to

http://www.mysite.com/myWorkingDirec...serWebSite.com

instead of

www.userWebSite.com
I am using the following.
HyperLink1.NavigateUrl = webSite.Text;
//webSite is a Text Box

Feb 9 '06 #3
No in my code i have

HyperLink1.NavigateUrl = webSite.Text;

Feb 10 '06 #4
then you need to add "http://" to your string, like this:
HyperLink1.NavigateUrl = "http://" + webSite.Text;

"newhorizon" <me********@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
No in my code i have

HyperLink1.NavigateUrl = webSite.Text;

Feb 10 '06 #5
it works allright thank you Alex.
Alex D. wrote:
then you need to add "http://" to your string, like this:
HyperLink1.NavigateUrl = "http://" + webSite.Text;

"newhorizon" <me********@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
No in my code i have

HyperLink1.NavigateUrl = webSite.Text;


Feb 10 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.