Difference between Authorization and Authentication

Authentication Authorization Authentication verifies who you are Authorization verifies what you are authorized to do Authenticating a user on a website means that you verify that this user is a valid user, that is, verifying who the user is using username/password or certificates, etc Authorization is the process of verifying if the user has rights/permission to access certain resources or sections of a website, Example : When u login to access some site then your logon credential (userid/password) identifies Example : After successful logon, you will be granted specific role or privileges to access the site.

Difference between Destructor, dispose and finalize method

Destructor They are special methods that contains clean up code for the object. You can’t call them explicitly in your code as they are called implicitly by GC (Garbage Collector). In C# they have same name as the class name preceded by the "~" sign. Like- class MyClass { public MyClass () { } ~MyClass () { } } Dispose These are just like any other methods in the class and can be called explicitly but they have a special purpose of cleaning up the object. In the dispose method we write clean up code for the object. It is important that we freed up all the unmanaged resources in the dispose method like database connection, files etc. The class implementing dispose method should implement IDisposable which is inherited by interface and it contains GC.SuppressFinalize method for the object it is disposing if the class has destructor because it has already done the work to clean up the object, then it is not necessary for the garbage collector to call the object's Finalize method.

Use of UrlEncode and UrlDecode Method in Asp.net

Use of UrlEncode and UrlDecode Method in Asp.net UrlEncode Method : HttpUtility.UrlEncode(string) Ex: string encodedText= HttpUtility.UrlEncode(txtrefcode.Text.Trim()) string url = "Test.aspx?enc=" + encodedText; Response.Redirect(url); UrlDecode Method : HttpUtility.UrlDecode(Encoded String); Ex: string…

3-Tier Architecture in asp.net using C# with Crude Operations

3-Tier Architecture in asp.net using c# 3-Tier architecture consists of 1) UI or Presentation Layer 2) Business Access Layer or Business Logic Layer 3) Data Access Layer Presentation Layer Presentation layer consists of pages like .aspx or desktop based form where data is presented to users or getting input from users. Business Logic layer or Business Access Layer Business logic layer contains all of the business logic. Its responsibility is to validate the business rules of the component and communicating with the Data Access Layer. Business Logic Layer is the class in which we write functions that get data from Presentation Layer and send that data to database through Data Access Layer.

Dynamic Data Manipulation using XSLT using c# methods

If you want to display dynamic data/from database in xslt then this is a way to do your requirements. In this we are directly firing a query which returns data in xml format then according to the node names u can transform your xslt. Step 1: Create a xslt named as Sample.xsl < ?xml version="1.0" encoding="UTF-8" ?>
Category name :
Details on Category :

How to apply an XSLT Stylesheet in C#

The main purpose to use XSLT in C# for making your application faster while rendering from server. this is the following code on how to use simple xslt files in ur aspx page by using c#. This is only for rendering a static data only not dynamic means the xslt contains hard coded data only. This can be handy when u r using any header or footer or any portion of your application which is a bit heavier and taking more time to load. Step 1: Create a file named as Demo.xsl and put the below code. < ?xml version="1.0" encoding="UTF-8" ?>
Test xslt page
Demo text here

How to call C# Method from Java Script

If you want to call any method of cs page from JS then this is the best way that you can follow. This is required when ur buttons onClick event are not fired den u can call the onClientClick of button and then call the required method. Step 1: Create any page lets say Default.aspx. With in the body part look carefully