borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2012 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Generate barcode in C#)Next Topic (Introduction to C#) New Topic New Poll Post Reply
AndreaVB Forum : C# : Question about Sessions in C#?
Poster Message
jhonrtin
Level: Trainee

Registered: 08-09-2011
Posts: 1

icon Question about Sessions in C#?

buddha








Hi, Im doing an assignment which is a website. I'm using HTML as the basic page and ASP.Net C# as my server side script.
My Question:
I have a login.aspx page with two text boxes for user name and password. It is coded to check if the data entered into those fields is equal to the data stored in the database (which is Microsoft SQL Server 2005 Express). if the data is correct, the user is redirected to Main.html which is the Main menu. In the Main.html page, there are several buttons which are images. Among them is a "Reservation" button/image. I want to set the page up so that the "Reservation" button is not visible to those who are not logged in. In other words, if you are logged in, only then can you see the "Reservation" image/button. Otherwise you cannot see it.

How do I do this?
I need relevant answers with coding because I'm a total noob at this.
filme porno


[Edited by jhonrtin on 15-01-2012 at 10:12 AM GMT]

[Edited by jhonrtin on 05-03-2012 at 04:22 PM GMT]

08-09-2011 at 11:57 AM
View Profile Send Email to User Show All Posts | Quote Reply
GeoffS
Level: VB Lord


Registered: 29-09-2004
Posts: 637
icon Re: Question about Sessions in C#?

But if your user does not enter a correct username and password he will not see the main.html page at all as he will not be "logged in"
If you want to give different security levels to your users and decide what they can, or cannot, see based upon their level then you use the visibilty property of the control.
So if you need a pass level of 1 to see the Reservation button then :-

Reservation_button.Visible = UserLevel == 1;



____________________________
multi-tasking - the ability to hang more than one app. at the same time.

12-09-2011 at 11:37 AM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : C# : Question about Sessions in C#?
Previous Topic (Generate barcode in C#)Next Topic (Introduction to C#) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2012 Andrea Tincaniborder