Click here to Skip to main content
15,887,346 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: jquery in asp.net+server side execution Pin
saini arun11-Jun-10 21:11
saini arun11-Jun-10 21:11 
QuestionCrystal Reports in a web application [modified] Pin
Harshini8111-Jun-10 14:59
Harshini8111-Jun-10 14:59 
QuestionASP.NET and smooth colour changing Pin
Unsy11-Jun-10 10:45
Unsy11-Jun-10 10:45 
AnswerRe: ASP.NET and smooth colour changing Pin
thatraja11-Jun-10 19:40
professionalthatraja11-Jun-10 19:40 
AnswerRe: ASP.NET and smooth colour changing Pin
Amar Chaudhary12-Jun-10 17:26
Amar Chaudhary12-Jun-10 17:26 
Questiontrying to submit an httpwebrequest with hidden field and submit button data Pin
Member 391904911-Jun-10 10:25
Member 391904911-Jun-10 10:25 
QuestionRestrict logged in user to login again Pin
Hemant Thaker11-Jun-10 7:58
Hemant Thaker11-Jun-10 7:58 
AnswerRe: Restrict logged in user to login again Pin
Adam R Harris11-Jun-10 8:10
Adam R Harris11-Jun-10 8:10 
Application state would not be the best place for that, as the users session would not timeout until the application state timedout, the app pool was recycled or the app is recompiled (a change to the web.config would do this).

I would / have used Session State for this in the past, just set session state variable to true when the user is logged in and just check that when the page is loaded. something along the lines of;

Login Page;
<code>
protected void login_click(object sender, EventArgs e){
   .... code to validate credentials ......
   Session["LoggedIn"] = true;
   Response.Redirect("defaultpage.aspx");
}
</code>


All Pages;
<code>
protected void Page_Init(object sender, EventArgs e){
    if (!(bool)Session["LoggedIn"])
        Response.Redirect("login.aspx");
}
</code>

If at first you don't succeed ... post it on The Code Project and Pray.

QuestionRe: Restrict logged in user to login again Pin
Hemant Thaker11-Jun-10 8:24
Hemant Thaker11-Jun-10 8:24 
AnswerRe: Restrict logged in user to login again Pin
Adam R Harris11-Jun-10 8:43
Adam R Harris11-Jun-10 8:43 
QuestionRe: Restrict logged in user to login again Pin
Hemant Thaker11-Jun-10 8:55
Hemant Thaker11-Jun-10 8:55 
AnswerRe: Restrict logged in user to login again Pin
Adam R Harris11-Jun-10 9:11
Adam R Harris11-Jun-10 9:11 
QuestionDinamically created gridview not handling SelectedIndexChanged Pin
Zasumo11-Jun-10 7:27
Zasumo11-Jun-10 7:27 
AnswerRe: Dinamically created gridview not handling SelectedIndexChanged Pin
Adam R Harris11-Jun-10 8:15
Adam R Harris11-Jun-10 8:15 
GeneralRe: Dinamically created gridview not handling SelectedIndexChanged Pin
Zasumo14-Jun-10 3:01
Zasumo14-Jun-10 3:01 
GeneralRe: Dinamically created gridview not handling SelectedIndexChanged Pin
Adam R Harris14-Jun-10 3:14
Adam R Harris14-Jun-10 3:14 
GeneralRe: Dinamically created gridview not handling SelectedIndexChanged Pin
Zasumo14-Jun-10 3:58
Zasumo14-Jun-10 3:58 
GeneralRe: Dinamically created gridview not handling SelectedIndexChanged Pin
Adam R Harris15-Jun-10 9:06
Adam R Harris15-Jun-10 9:06 
QuestionUsing Resource file in C# .NET Pin
VOITDOTNET11-Jun-10 7:10
VOITDOTNET11-Jun-10 7:10 
AnswerRe: Using Resource file in C# .NET Pin
Adam R Harris11-Jun-10 8:17
Adam R Harris11-Jun-10 8:17 
GeneralRe: Using Resource file in C# .NET Pin
VOITDOTNET11-Jun-10 9:53
VOITDOTNET11-Jun-10 9:53 
AnswerRe: Using Resource file in C# .NET Pin
Sandeep Mewara11-Jun-10 10:28
mveSandeep Mewara11-Jun-10 10:28 
QuestionSearch and Replace String Value Pin
AsianRogueOne11-Jun-10 4:01
AsianRogueOne11-Jun-10 4:01 
AnswerRe: Search and Replace String Value Pin
Rhys Jacob11-Jun-10 4:51
Rhys Jacob11-Jun-10 4:51 
GeneralRe: Search and Replace String Value Pin
AsianRogueOne11-Jun-10 5:04
AsianRogueOne11-Jun-10 5:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.