Asp.NET C# application

Electrical Maintenance System

Page 1 of 1

3 Replies - 1408 Views - Last Post: 13 May 2009 - 12:34 PM Rate Topic: -----

#1 ananmail  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 10-May 09

Asp.NET C# application

Posted 10 May 2009 - 10:51 PM

Hi. I am creating an Electrical Maintenance System for my project using ASP.NET C# with SQL as backend. Till date i have created the basic pages, most of them without database connectivity or authentication. Now i have started the DB connectivity and am gradually moving with it.

I would like to start with the LOGIN session and the authentication of the Users who login. I am not able to understand where to start it from. I have three types of users and depending on the user type which logs in, their respective Homepage opens up. For eg. For administrator, we have a different Homepage. For the Electrical Maintenance Manager, we have a different Homepage and for the Default user who only registers Complaints we have a different page.

How do i Use session authentication?

Also, There is another page which i am facing problems with.

I am trying to perform Crosspage Postback and Transfer the Data in the Controls on the 1st page to the 2nd page(in labels). However, it fails to display a single value from the previous page! Please help me!

Is This A Good Question/Topic? 0
  • +

Replies To: Asp.NET C# application

#2 newProgram  Icon User is offline

  • D.I.C Head

Reputation: 4
  • View blog
  • Posts: 160
  • Joined: 28-October 08

Re: Asp.NET C# application

Posted 11 May 2009 - 06:59 PM

View Postananmail, on 10 May, 2009 - 09:51 PM, said:

Hi. I am creating an Electrical Maintenance System for my project using ASP.NET C# with SQL as backend. Till date i have created the basic pages, most of them without database connectivity or authentication. Now i have started the DB connectivity and am gradually moving with it.

I would like to start with the LOGIN session and the authentication of the Users who login. I am not able to understand where to start it from. I have three types of users and depending on the user type which logs in, their respective Homepage opens up. For eg. For administrator, we have a different Homepage. For the Electrical Maintenance Manager, we have a different Homepage and for the Default user who only registers Complaints we have a different page.

How do i Use session authentication?

Also, There is another page which i am facing problems with.

I am trying to perform Crosspage Postback and Transfer the Data in the Controls on the 1st page to the 2nd page(in labels). However, it fails to display a single value from the previous page! Please help me!

Quote

Is your DB connection ok? To determine what type of user log in, you may add a field on the DB to check if the account is for administrator or user only and so on. For example on your DB put a field name "account_type" and value range 1 - 3, 1 for administrator; 2 for different type of user and same as for 3. Now on the log in page when the user type the username and password, on your query you may now check the account type on what page the user will be redirected.

On your question on how to transfer data from one page to another, use the Session Variable. You will declare it on the Global.asax. To add Global.asax right click on the project name place on the solution explorer, then add >> new item.

Was This Post Helpful? 0
  • +
  • -

#3 b.ihde  Icon User is offline

  • D.I.C for life
  • member icon

Reputation: 42
  • View blog
  • Posts: 1,070
  • Joined: 29-September 08

Re: Asp.NET C# application

Posted 12 May 2009 - 08:08 AM

Check this link: MSDN

regards

Ben
Was This Post Helpful? 0
  • +
  • -

#4 kzimmerm  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 70
  • Joined: 08-February 09

Re: Asp.NET C# application

Posted 13 May 2009 - 12:34 PM

Just an FYI access authentication is something that I typically add last. It is actually quite simple to implement. What I did was simply take the persons userID and place it into a session variable. On my Master Page Form.Load I checked the contents of my session variable. If it is null then I knew that either the user tried to jump to a page w/o logging in or the session timed out. All I did was reroute the user back to the log in page otherwise I proceeded into the page. This logic is about as basic as you can get. Now if you wanted to add levels of security then the process does get more involved.

When ever I develop any ASP.NET/MS Sql app I build the functionality first which is going to take the longest.

Good luck and hope this helps.
Kurt
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1