Question: I am facing a very basic problem while building a website ; The website have 10 pages , The problem is that when i login once how can i remain logged in through out the rest of the pages ??

Answer: 
Since this question includes tags for asp.net and sesion variables, I'm not sure what you are missing.

On login form:

```
if (authentaionSuceeded){
   HttpContext.Current.Session["loggedin"]="yes";
} 

```

On all other pages (except for logout)

```
if (HttpContext.Current.Session["loggedin"]=="yes"){
   // whatever you do for logged in users.
} 

```

That's the basic idea. Although I prefer to access the session variable through an [extension method/class that provides a type safety and a list of all session variables](https://stackoverflow.com/questions/12923609/a-custom-variable-that-is-user-specific/12924861#12924861). The example in that answer is in VB, but you can do the same thing in c#.
There are some possible solutions as below:

1. Cookies: Store session information in the cookies in the page header
2. Hidden Form Fields: Maintain the session information in some hidden fields in the page forms

In each option, you need to generate the session key(some encrypted unique key) on the server side and on subsequent request, you should be able to validate that session key. Its better to regenerate a new session key on each request and expire it after certain interval. So for active user, it will keep getting new keys, but inactive user session will simply expire.