Click here to Skip to main content
15,867,453 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Selected Text in a TextBox with TextMode Multiline Pin
Abhijit Jana9-Dec-10 5:56
professionalAbhijit Jana9-Dec-10 5:56 
QuestionUser search(ctrl+F) on asp.net page with multiple textboxes Pin
gbabu179-Dec-10 4:31
gbabu179-Dec-10 4:31 
AnswerRe: User search(ctrl+F) on asp.net page with multiple textboxes Pin
T M Gray9-Dec-10 9:55
T M Gray9-Dec-10 9:55 
QuestionPage can't be displayed! Pin
Jassim Rahma9-Dec-10 2:46
Jassim Rahma9-Dec-10 2:46 
AnswerRe: Page can't be displayed! Pin
Hiren solanki9-Dec-10 2:49
Hiren solanki9-Dec-10 2:49 
GeneralRe: Page can't be displayed! Pin
Jassim Rahma9-Dec-10 2:55
Jassim Rahma9-Dec-10 2:55 
AnswerRe: Page can't be displayed! Pin
Hiren solanki9-Dec-10 3:09
Hiren solanki9-Dec-10 3:09 
AnswerRe: Page can't be displayed! Pin
Vimalsoft(Pty) Ltd9-Dec-10 3:30
professionalVimalsoft(Pty) Ltd9-Dec-10 3:30 
GeneralRe: Page can't be displayed! Pin
Jassim Rahma9-Dec-10 3:39
Jassim Rahma9-Dec-10 3:39 
GeneralRe: Page can't be displayed! Pin
Vimalsoft(Pty) Ltd9-Dec-10 3:49
professionalVimalsoft(Pty) Ltd9-Dec-10 3:49 
Ok , What you need to do, is that When He Successfully logged in , you need to store his username on the Session e.g

if(Success)
{
Session["Username"] = "The Username";
}


this code should in your Login Button , and when the User Decides to Logout , then You need to clear the Session , e.g


Session["Username"] = null;


Now on the Page load event of every page , you need to Check if the User has logged in , if the Session is Null, it means that the user has not logged in, then you can Redirect that user to the Login page. e.g

 if(Session["Username"] == null)
{
   Response.Redirect("Login.aspx",false);
} 


make sure that this code is not inside a code like this

if(!page.ispostback)
{
}


Keep it outside , so that it will always check it.

Hope this helps
Vuyiswa Maseko,

Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.

C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/

AnswerRe: Page can't be displayed! Pin
Abhijit Jana9-Dec-10 5:04
professionalAbhijit Jana9-Dec-10 5:04 
AnswerRe: Page can't be displayed! Pin
Sandeep Mewara9-Dec-10 5:43
mveSandeep Mewara9-Dec-10 5:43 
GeneralRe: Page can't be displayed! Pin
Abhijit Jana9-Dec-10 5:52
professionalAbhijit Jana9-Dec-10 5:52 
GeneralRe: Page can't be displayed! Pin
Sandeep Mewara9-Dec-10 5:55
mveSandeep Mewara9-Dec-10 5:55 
GeneralRe: Page can't be displayed! Pin
Abhijit Jana9-Dec-10 5:58
professionalAbhijit Jana9-Dec-10 5:58 
GeneralRe: Page can't be displayed! Pin
Sandeep Mewara9-Dec-10 6:03
mveSandeep Mewara9-Dec-10 6:03 
GeneralRe: Page can't be displayed! Pin
Abhijit Jana9-Dec-10 6:10
professionalAbhijit Jana9-Dec-10 6:10 
GeneralRe: Page can't be displayed! Pin
Sandeep Mewara9-Dec-10 6:27
mveSandeep Mewara9-Dec-10 6:27 
GeneralRe: Page can't be displayed! Pin
Abhijit Jana9-Dec-10 8:49
professionalAbhijit Jana9-Dec-10 8:49 
QuestionWorking with tabcontrol in windows application Pin
sarang_k8-Dec-10 16:46
sarang_k8-Dec-10 16:46 
AnswerRe: Working with tabcontrol in windows application Pin
Brij8-Dec-10 19:29
mentorBrij8-Dec-10 19:29 
Questionpass variable between ASP.NET pages Pin
Jassim Rahma8-Dec-10 4:02
Jassim Rahma8-Dec-10 4:02 
AnswerRe: pass variable between ASP.NET pages Pin
NeverHeardOfMe8-Dec-10 4:08
NeverHeardOfMe8-Dec-10 4:08 
AnswerRe: pass variable between ASP.NET pages Pin
David Mujica8-Dec-10 4:14
David Mujica8-Dec-10 4:14 
GeneralRe: pass variable between ASP.NET pages Pin
NeverHeardOfMe8-Dec-10 4:18
NeverHeardOfMe8-Dec-10 4:18 

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.