asp:Button

0 views
Skip to first unread message

brwalias

unread,
Sep 10, 2007, 6:53:40 PM9/10/07
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
I'm new to .net and am trying to figure out how to have my
<asp:Button /> link to a another page like http://yahoo.com using an
onClick event. how can this be achieved?


Thanks

Aman Sharma

unread,
Sep 11, 2007, 4:35:27 AM9/11/07
to DotNetDe...@googlegroups.com
On button's click event... give               Response.Redirect("http://yahoo.com");

Nick Chan

unread,
Sep 11, 2007, 6:26:39 AM9/11/07
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
google for PostBackURL
if using onClick is not a must
or myButton.attributes("onclick") = "location.href='http://yahoo.com'"
or ClientOnClick

On Sep 11, 6:53 am, brwalias <brwal...@gmail.com> wrote:
> I'm new to .net and am trying to figure out how to have my

> <asp:Button /> link to a another page likehttp://yahoo.comusing an

ozoid

unread,
Sep 11, 2007, 1:46:06 AM9/11/07
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Hi
Try this

Public Sub Redirect(ByVal sender As System.Object, ByVal e As
System.EventArgs)
Server.Transfer("http://blah.com",true)
End Sub


On Sep 10, 11:53 pm, brwalias <brwal...@gmail.com> wrote:
> I'm new to .net and am trying to figure out how to have my

> <asp:Button /> link to a another page likehttp://yahoo.comusing an

Cerebrus

unread,
Sep 11, 2007, 1:23:19 PM9/11/07
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Why not use a Hyperlink.NavigateUrl instead ? Does it need to be a
button ?

On Sep 11, 3:53 am, brwalias <brwal...@gmail.com> wrote:
> I'm new to .net and am trying to figure out how to have my

> <asp:Button /> link to a another page likehttp://yahoo.comusing an

brwalias

unread,
Oct 25, 2007, 10:37:55 AM10/25/07
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Yes this needed to be a button. it is working now! Thanks for
everyone's help!
Reply all
Reply to author
Forward
0 new messages