I am trying to redirect another site on button click.

Answer Posted / gopakumar

There is a mistake in answer is that the link button
control doesn't contain the NavigateUrl property but we do
this task by doing this in the linkbutton control source
view is:

<asp:LinkButton ID="lnkbtn" runat="server"
OnClick="lnkbtn_Click"><a
href="http://www.google.com">Link</a></asp:LinkButton>
</div>

The OnCommand="link" is not needed.

<asp:LinkButton ID="lnkbtn" OnClick="lnkbtn_Click"
runat="server" >
<a href="http://www.google.com">Link</a>
</asp:LinkButton>

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What r the asp.net list controls and difference between them?

600


What parameters can you pass in the url of the api? Can get and post use the same url?

641


How can I have a particular web page in an asp.net application which displays its own error page?

616


Explain the differences between clr & cts?

637


How to communicate via Remote proxy with Client? a)MarshalByRef b)Marshal by Value or Any thing else?

1662






What are the different types of validation controls provided in ASP.NET?

753


Describe Segmentation With Paging?

713


What is the difference between cookie and session?

579


Explain the features that make asp.net more used framework? : asp.net mvc

569


How Can assign alias name for ASP.NET Web API Action?

1040


Is razor a programming language?

599


Explain login controls.

703


Can you use c# without .net?

638


What is the asp.net mvc folder conventions? : asp.net mvc

543


What r the asp.net list controls and diff. Between them?

609