|
 |
aspx_beginners thread: How to hyperlink from the code
Message #1 by "John Atkinson" <d.j.s.atkinson@b...> on Mon, 1 Jul 2002 19:34:36
|
|
How can I make the browser link to another page from the C# code?
Thanks.
Message #2 by "jeby" <jeby@c...> on Tue, 2 Jul 2002 12:30:15 +0530
|
|
you can use
Response.Write("<a href=3D'nextpage.aspx'>click here to go to next
page</a>");
-----Original Message-----
From: John Atkinson [mailto:d.j.s.atkinson@b...]
Sent: Monday, July 01, 2002 7:35 PM
To: aspx_beginners
Subject: [aspx_beginners] How to hyperlink from the code
How can I make the browser link to another page from the C# code?
Thanks.
Message #3 by "John Atkinson" <d.j.s.atkinson@b...> on Tue, 2 Jul 2002 19:44:43
|
|
I tried it. I put it into the handler of a button - It put a link onto
the current page which could be clicked to link to the target page. Sorry
if question unclear - I want to
if(condition)
{
//jump to page pg1.aspx - go now, from the code
}
else
{
//jump to page pg2.aspx
}
I looked at creating a Hyperlink object in code, but cannot send it a
click() message.
Thanks.
Message #4 by "jeby" <jeby@c...> on Wed, 3 Jul 2002 12:10:36 +0530
|
|
Try this
if(condition)
{
Response.Redirect "pag1.aspx";
}
else
{
Response.Redirect "pg2.aspx";
}
regards,
Jeby
-----Original Message-----
From: John Atkinson [mailto:d.j.s.atkinson@b...]
Sent: Tuesday, July 02, 2002 7:45 PM
To: aspx_beginners
Subject: [aspx_beginners] RE: How to hyperlink from the code
I tried it. I put it into the handler of a button - It put a link onto
the current page which could be clicked to link to the target page.
Sorry
if question unclear - I want to
if(condition)
{
//jump to page pg1.aspx - go now, from the code
}
else
{
//jump to page pg2.aspx
}
I looked at creating a Hyperlink object in code, but cannot send it a
click() message.
Thanks.
|
|
 |