hyperlink/linkbutton transfer with http://localhost

  • Thread starter Thread starter Ganesh
  • Start date Start date
Ganesh said:
Hi There,

It should be easy question, but i don't know how to do.

How to transfer to another website from my page. I tried with linkbutton and
Hyperlink but i cannot figure out
always it transfer to

http://localhost:4111/www.yahoo.com

but i want transfer to www.yahoo.com

Thanks



Hi,

<asp:HyperLink
ID="lnkUser"
Runat="Server" />

void Page_Load(object sender, EventArgs e) {

lnkUser.NavigateUrl = String.Format( "~/{0}.aspx", strUsername );
lnkUser.Text = String.Format( "{0}'s home page", strUsername );

}



or

Instead of using HyperLink controls to dipplay hyperlinks, you can use teh
HTML anchor tag. Using the anchor tag instead of the HyperLInk control
requires slightly fewer server resources.


Develop your own Web accounting application using AS.net
http://www.vkinfotek.com

<a href="<%=ResolveUrl("~/listjob.aspx")%>">list job</a>
 
Back
Top