Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP .NET
I am new to ASP .net C#
i created registration,login and member profile page
 
after all validations data is stored in database..
and login page also working fine...
 
i dont know about sessions ..how can i create session and how to make login module more effective using sessions?
 
thanks in advance
Posted 8-Aug-11 22:05pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

at login you can use this
 
Session["username"]=usernametxt.Text;//or assign it from dataset
 
For more info on session check this[^]
  Permalink  
v2
Comments
sivakumat at 9-Aug-11 4:14am
   
How can i check in registration page and login page ?
Syed Salman Raza Zaidi at 10-Aug-11 2:01am
   
after login you can check on any page like, if(Session["username"].toString() !== "")
Anupam Singh _ at 10-Jun-13 7:03am
   
dont use Session["username"].toString() as it doesnt handle null values you might face "object reference not set .." exception.
 
always use Convert.toString() for this kind of scenario.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

At login with session Please visit this site Address.
http://www.youtube.com/watch?v=cyLPqxxZc64
  Permalink  
Comments
Reza Nabiloo at 17-Feb-13 10:34am
   
Hi dear Admin. I'm New in ASP .Net C# .I can't undrestand what is session.
fo example i can create a session in aspx.cs page same :
session.add("userid",txtusername);
 
but i don't know what is this and i don't khnow how can i get te user id in next page ????
pls help me
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

At login with session Please visit this site Address.
http://www.youtube.com/watch?v=cyLPqxxZc64
http://www.youtube.com/watch?v=fVia0YxfNAM&feature=relmfu
  Permalink  
Comments
rajjon at 27-Sep-12 6:17am
   
7gh
rajjon at 27-Sep-12 6:18am
   
hamka batal tha he coode ka dena
thanks
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

Thank you,I am running the project immoderately asking userid and pwd i am enter the details its checking backed database it's correct disply that corresponding some another page,it's wrong display error msg.
 
My question is ia m running the first time asking login details ok,I am running second time not asking again login details automatically display that corresponding page,
can you give me one simple example on this plz help me what concept is involved to do this?????
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 385
1 Gihan Liyanage 308
2 Sergey Alexandrovich Kryukov 150
3 syed shanu 125
4 ChauhanAjay 120
0 Sergey Alexandrovich Kryukov 9,021
1 OriginalGriff 7,941
2 CPallini 2,603
3 Richard MacCutchan 2,121
4 Abhinav S 1,928


Advertise | Privacy | Mobile
Web02 | 2.8.140827.1 | Last Updated 7 Mar 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100