1

Forms Authentication In Asp.Net

Forms Authentication in asp.net


In examples below i'm explaining how to use forms authentication in Asp.Net and forms authentication tickets in Asp.net.












Forms Authentication In Asp.Net 2.0 and 3.5


Forms Authentication in ASP.NET is technique to decide how users can access your web application.

Using froms authentication we can decide certain users can access only certain pages or we can control the anonymous access, we can implement folder level access and access based on roles.

we can manage the access through web.config file or folder level access and through multiple web.config files using forms authentication.

Read More


Forms Authentication Ticket In Asp.Net 2.0 And 3.5


In this article i am going to describe how to implement Forms authentication tickets and manage user roles based access in ASP.NET using C# and multiple web.config files

Read More


Bypass Forms Authentication Or Skip Authorization


Some readers ask me how to skip or bypass forms authentication or Authorization for selected pages in asp.net or a scenario where only few pages on site needs user to log in rest can be accessed without login.

Read More


Detecting Session Timeout and Redirect to Login Page in ASP.NET


In this example i'll show how to detect the session timeout which occurs when user is idle for the time specified as Session imeout,using forms authentication,C# asp.NET and if it is than redirect the user to login page to login again, for this i've set time out value in web.config file to 1 minute

Read More



Have fun

4

Maintain Scroll Position On After Postback in Asp.Net 2.0 3.5

Maintain scroll position after postback
Maintain Scroll Position on or After Postback in Asp.Net 2.0 3.5.

In this example i'm explaining different methods of maintaining scroll position on/after postback in asp.net 2.0,3.5 web pages or applications.
















Method 1 .

Write below mention directive in page directive section of html source of aspx page to maintain scroll position of only one page or selected pages rather then whole web application.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"  
         MaintainScrollPositionOnPostback="true"  Inherits="_Default" %>



Method 2.

To maintain scroll position programmatically use code mentione below.
System.Web.UI.Page.MaintainScrollPositionOnPostBack = true;


Method3.

To maintain scroll position application wide or for all pages of web application we can write below mentioned code in pages section of web.config file so that we don't need to add page directive in each and every page.

<pages maintainScrollPositionOnPostBack="true">

Hope this helps.

4

Create Setup And Deployment Project in Visual Studio 2008/2010

Create setup Project In Visual Studio

In this example i am going to explain how to create setup and deployment project for winforms windows application using visual studio 2005/2008/2010.

Similar approach can be applied for creating setup project for web application as well.











First of all create any sample windows/web application.

Create setup project

right click on solution explorer root and select Add > New project 


In add new project dialog box select setup and deployment from other project types and then select Setup Project.


In the setup project file system editor window, right click on Application folder > Add > Project Output 


Now select primary output from next dialog box and click on OK.



Right click on User's desktop and create shortcut to primary output in application folder.


Similarly add shortcut in user's program menu.


Build the project by right clicking on setup project name and run the setup.


Hope this helps 




Download the sample code attached 



Popular Posts

Find More Articles