|
 |
aspx thread: redirect.
Message #1 by "Phaneendra-seacom" <phaneendra@s...> on Fri, 1 Jun 2001 15:45:43 +0530
|
|
Hi all,
In ASP we can redirect a page by response.redirect"......".
I want to redirect in ".cs" file(C#).
Please help me.
Phaneendra
Message #2 by "Thomas Tomiczek" <t.tomiczek@t...> on Fri, 1 Jun 2001 12:52:09 +0200
|
|
Ever tried the response object.
Come, at least look up the documentation before asking. You would see
that:
(a) your code-behind class is inheriting from Page
(b) you have a property named Response
(c) it has a Redirect method.
So, the code you wrote, only transferred to C#, will work.
Nothing against beginner questions - by far not - but I started to use
mailing lists where it was considered to be unfriendly to use the
mailing list as a replacement for a simple 2 minute lookup into the
documentation.
And this one was obvious.
Regards
Thomas Tomiczek
THONA Consulting Ltd.
-----Original Message-----
From: Phaneendra-seacom [mailto:phaneendra@s...]
Sent: Freitag, 1. Juni 2001 12:16
To: ASP+
Subject: [aspx] redirect.
Hi all,
In ASP we can redirect a page by response.redirect"......".
I want to redirect in ".cs" file(C#).
Please help me.
Phaneendra
Message #3 by "Samuel Engelman" <samuel_engelman@p...> on Fri, 1 Jun 2001 08:26:40 -0400
|
|
The .cs file that you want to put the code in, is it the code behind?
|--------+--------------------------------->
| | "Thomas Tomiczek" |
| | <t.tomiczek@t...|
| | om> |
| | |
| | |
| | Friday June 1, 2001 06:52 AM |
| | Please respond to "ASP+" |
| | |
|--------+--------------------------------->
>--------------------------------------------------------------------
---|
|
|
| To: "ASP+" <aspx@p...
> |
| cc:
|
| Subject: [aspx] RE: redirect.
|
>--------------------------------------------------------------------
---|
Ever tried the response object.
Come, at least look up the documentation before asking. You would see
that:
(a) your code-behind class is inheriting from Page
(b) you have a property named Response
(c) it has a Redirect method.
So, the code you wrote, only transferred to C#, will work.
Nothing against beginner questions - by far not - but I started to use
mailing lists where it was considered to be unfriendly to use the
mailing list as a replacement for a simple 2 minute lookup into the
documentation.
And this one was obvious.
Regards
Thomas Tomiczek
THONA Consulting Ltd.
-----Original Message-----
From: Phaneendra-seacom [mailto:phaneendra@s...]
Sent: Freitag, 1. Juni 2001 12:16
To: ASP+
Subject: [aspx] redirect.
Hi all,
In ASP we can redirect a page by response.redirect"......".
I want to redirect in ".cs" file(C#).
Please help me.
Phaneendra
Message #4 by "Allen, Sheila (ITS)" <Sheila.Allen@i...> on Fri, 1 Jun 2001 08:27:36 -0700
|
|
-----Original Message-----
From: Thomas Tomiczek [mailto:t.tomiczek@t...]
Sent: Friday, June 01, 2001 3:52 AM
To: ASP+
Subject: [aspx] RE: redirect.
Ever tried the response object.
Come, at least look up the documentation before asking. You would see
that:
(a) your code-behind class is inheriting from Page
(b) you have a property named Response
(c) it has a Redirect method.
A property can have a method?
Message #5 by "Thomas Tomiczek" <t.tomiczek@t...> on Fri, 1 Jun 2001 17:46:01 +0200
|
|
Sure.
A property returns an instance of the type that is defined for the
property.
In this case it's a class that has a method.
You can call it directly.
So you can Write Page.Response.Redirect ("xx");
Thomas Tomiczek
THONA Consulting Ltd.
-----Original Message-----
From: Allen, Sheila (ITS) [mailto:Sheila.Allen@i...]
Sent: Freitag, 1. Juni 2001 17:28
To: ASP+
Subject: [aspx] RE: redirect.
-----Original Message-----
From: Thomas Tomiczek [mailto:t.tomiczek@t...]
Sent: Friday, June 01, 2001 3:52 AM
To: ASP+
Subject: [aspx] RE: redirect.
Ever tried the response object.
Come, at least look up the documentation before asking. You would see
that:
(a) your code-behind class is inheriting from Page
(b) you have a property named Response
(c) it has a Redirect method.
A property can have a method?
|
|
 |