473,387 Members | 3,801 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Page Load

Hi guys,
I have session variable (session["loggedin"]) with values true or false. On
the page load event, i entered
if (HttpContext.Current.Session["loggedin"].ToString().Equals("true")
{
Response.Redirect("http://localhost/lhw/home.aspx");
Response.End();
}
Now i have a calendar control with dayrender event. I am thinking that the
response.end() should really not let the control to load however it keep
giving me error trying to find the dataview. Is there any solution for it.

Thanks.

Manny
Nov 18 '05 #1
2 1153
You might try using Server.Transfer() instead.

"Manny Chohan" wrote:
Hi guys,
I have session variable (session["loggedin"]) with values true or false. On
the page load event, i entered
if (HttpContext.Current.Session["loggedin"].ToString().Equals("true")
{
Response.Redirect("http://localhost/lhw/home.aspx");
Response.End();
}
Now i have a calendar control with dayrender event. I am thinking that the
response.end() should really not let the control to load however it keep
giving me error trying to find the dataview. Is there any solution for it.

Thanks.

Manny

Nov 18 '05 #2
move your test and redirect to OnInit.

-- bruce (sqlwork.com)

"Manny Chohan" <Ma*********@discussions.microsoft.com> wrote in message
news:B6**********************************@microsof t.com...
| Hi guys,
| I have session variable (session["loggedin"]) with values true or false.
On
| the page load event, i entered
| if (HttpContext.Current.Session["loggedin"].ToString().Equals("true")
| {
| Response.Redirect("http://localhost/lhw/home.aspx");
| Response.End();
| }
| Now i have a calendar control with dayrender event. I am thinking that the
| response.end() should really not let the control to load however it keep
| giving me error trying to find the dataview. Is there any solution for it.
|
| Thanks.
|
| Manny
Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: user | last post by:
when i first load index.php with arguments ie: "index.php?page=x", the $_SERVERvalue is null. I then get the session id appended to each link. If i refresh the page, I get the $_SERVER I want, but...
1
by: WFB | last post by:
Hi, I have a base class from which all of my pages derive (ABCBasePage). For example, ABCCustomerSelect Inherits ABCPasePage. I would now like to have ABCPocketSelect which should inherit from...
0
by: Frank 'Olorin' Rizzi | last post by:
Hello everyone. This is quite convoluted, but I'll try to make it simple. I have a couple of bottom-line questions (I guess): 1~ what happens between the Page_Load routine in the code behind...
2
by: Sam | last post by:
I have a custom control (MyTextBox - taken from Microsoft website) that implements the IPostBackDataHandler interface. It is added to the controls collection of a placeholder control during the...
2
by: John Lau | last post by:
Hi, Is there documentation that talks about the page lifecycle, the lifecycle of controls on the page, and the rendering of inline code, in a single document? Thanks, John
7
by: Goober | last post by:
I have a page that receives a session variable from the default.aspx. On Page load, the code in Page load gets executed twice. So far, no problem. It sets the session variable each time,...
7
by: UJ | last post by:
I've got a page with a user control on it. While the page is loading, it needs to check certain conditions of the user object to enable/disable things on the screen. Currently in the page_load of...
5
by: venky | last post by:
Hi, I have a question, i have a web control in my web page. Let say i have page pag1.aspx and control.ascx and page1 contains control. I have written code on the page load of page and also the...
4
by: Garry Jones | last post by:
I have recently constructed a website using a lot of php script (self taught). I now wonder if I should have construted the site in a different way. The page contains a header (a.php) and left...
3
by: GauravGupta | last post by:
i want to know that is it posible to call button click event before page load event on post back.... please help me....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.