In my application, earlier I had only one user. Now I am to add various users. And each user should login to view his/her details. That is each page should be authentic to a user.
In the database tables also, only in one table containing Login details, I have the parameter Login_ID. Rest no where it is there. In my stored procedures I have added Login_ID. But now at this point when I run the code, it shows an exception at every stage
saying that Login_ID is required.
How shall I pass Login_ID in the pages? Pl help me...resolve this issue...
You can Maintain LoginID across the page using Session.
Session["LoginID"] = "SomeUserID";
@prabhuvincent
It worked when I used Login_Name insstead.
But now I am facing a different problem. Since I made changes in the stored procedures also, now wherever I was getting the values fetched from the tables, I am not able to get them fetched.
Actually the SPs in which I made changes were to fetch certain values from the database tables, by inner joining the Login table with the concerned tables.
But now from when I have passed Session["Login_Name"] to the aspx pages, none of the SPs are working i.e they donot fetch values from database.
What shall I do?
When I started with this project, I didnot pass any Login info to any of the pages, but for Login page. Now, I have to add users in my project, so that each user logs in and does his work. Its like maintaining his/her account.
coolpal9
Member
156 Points
520 Posts
How to pass Login_ID in web page to authenticate the user?
Apr 13, 2012 05:13 AM|LINK
Hi,
In my application, earlier I had only one user. Now I am to add various users. And each user should login to view his/her details. That is each page should be authentic to a user.
In the database tables also, only in one table containing Login details, I have the parameter Login_ID. Rest no where it is there. In my stored procedures I have added Login_ID. But now at this point when I run the code, it shows an exception at every stage saying that Login_ID is required.
How shall I pass Login_ID in the pages? Pl help me...resolve this issue...
coolpal9
Member
156 Points
520 Posts
Re: How to pass Login_ID in web page to authenticate the user?
Apr 13, 2012 05:36 AM|LINK
Pl pl pl somebody help me out in resolving this issue. This is the most important part in the project.
prabhuvincen...
Member
62 Points
77 Posts
Re: How to pass Login_ID in web page to authenticate the user?
Apr 13, 2012 05:36 AM|LINK
Hi,
You can Maintain LoginID across the page using Session.
Session["LoginID"] = "SomeUserID";
Prabhu
coolpal9
Member
156 Points
520 Posts
Re: How to pass Login_ID in web page to authenticate the user?
Apr 13, 2012 05:37 AM|LINK
"SomeUserID" means what?
coolpal9
Member
156 Points
520 Posts
Re: How to pass Login_ID in web page to authenticate the user?
Apr 13, 2012 06:17 AM|LINK
Ok got it! Thanks!
coolpal9
Member
156 Points
520 Posts
Re: How to pass Login_ID in web page to authenticate the user?
Apr 13, 2012 06:46 AM|LINK
@prabhuvincent
It worked when I used Login_Name insstead.
But now I am facing a different problem. Since I made changes in the stored procedures also, now wherever I was getting the values fetched from the tables, I am not able to get them fetched.
What shall I do now?
Can you pl help me out...
prabhuvincen...
Member
62 Points
77 Posts
Re: How to pass Login_ID in web page to authenticate the user?
Apr 13, 2012 10:59 AM|LINK
Sorry I am Not Able to get your question.
Could you pls elabourate
Prabhu
coolpal9
Member
156 Points
520 Posts
Re: How to pass Login_ID in web page to authenticate the user?
Apr 13, 2012 11:35 AM|LINK
Actually the SPs in which I made changes were to fetch certain values from the database tables, by inner joining the Login table with the concerned tables.
But now from when I have passed Session["Login_Name"] to the aspx pages, none of the SPs are working i.e they donot fetch values from database.
What shall I do?
When I started with this project, I didnot pass any Login info to any of the pages, but for Login page. Now, I have to add users in my project, so that each user logs in and does his work. Its like maintaining his/her account.
prabhuvincen...
Member
62 Points
77 Posts
Re: How to pass Login_ID in web page to authenticate the user?
Apr 13, 2012 11:46 AM|LINK
It seems You are Trying to authenticate .
User Will Enter his/her credentails.
1) First Page you are authenticating the user. Maintain the user ID in Session State.
2) Now In the Second page somevariable = Session["Login_Name"];
3)Now In that Pass somevariable as an Input Parameter to SP.
4)Fetch the User Information.
Hope it makes sense
Prabhu
coolpal9
Member
156 Points
520 Posts
Re: How to pass Login_ID in web page to authenticate the user?
Apr 13, 2012 12:06 PM|LINK
No it did not help...