URL Rewriting in ASP.NET

URL Rewriting in ASP.NET

Dynamic Url ReWriting ShowAllData.aspx-------------------------------------
ShowAllData.aspx.cs---------------------------------- protected void Page_Load(object sender, EventArgs e) { if(IsPostBack==false) { dtlstproducts.DataSource = GetProductDataTable(); dtlstproducts.DataBind(); //Response.Redirect("ShowAllData"); } }
Disable cut, copy and paste in textbox using jquery, javascript

Disable cut, copy and paste in textbox using jquery, javascript

Disable cut, copy & paste using Javascript When we don't want to display any message on cut, copy & paste When we want to display an alert message on copy, paste and cut
Ajax CalendarExtender Example In Asp.Net

Ajax CalendarExtender Example In Asp.Net

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Ajax Calendar extendar control exmaple in asp.net</title> </head> <body> <form id="form1" runat="server"> <ajax:ToolkitScriptManager ID="toolkit1" runat="server"></ajax:ToolkitScriptManager> <table>…
C Sharp Delegates and Plug-in Methods with Delegates

C Sharp Delegates and Plug-in Methods with Delegates

A delegate is declared by using the keyword delegate, otherwise it resembles a method declaration. delegate int delegateAdd (int x); Instantiation: To create a delegate instance, we need to assign a method (which has same signature as delegate) to delegate. static int Add (int x,int y) { return x+y; } .. //create delegate instance delegateAdd objAdd= new delegateAdd (Add); //short hand for above statement delegateAdd objAdd=Add;
Difference between int, Int16, Int32 and Int64

Difference between int, Int16, Int32 and Int64

int It is a primitive data type defined in C#. It is mapped to Int32 of FCL type. It is a value type and represent System.Int32 struct. It is signed and takes 32 bits. It has minimum -2147483648 and maximum +2147483647 capacity. Int16 It is a FCL type. In C#, short is mapped to Int16. It is a value type and represent System.Int16 struct. It is signed and takes 16 bits.
Difference between Response.Redirect and Server.Transfer

Difference between Response.Redirect and Server.Transfer

Response.Redirect Response.Redirect() will send you to a new page, update the address bar and add it to the Browser History. On your browser you can click back. It redirects the request to some plain HTML pages on our server or to some other web server. It causes additional roundtrips to the server on each request. It doesn’t preserve Query String and Form Variables from the original request. It enables to see the new redirected URL where it is redirected in the browser (and be able to bookmark it if it’s necessary). Response. Redirect simply sends a message down to the (HTTP 302) browser.
SQL Server Basics and Types of Cursors

SQL Server Basics and Types of Cursors

Cursor is a database objects to retrieve data from a result set one row at a time, instead of the T-SQL commands that operate on all the rows in the result set at one time. We use cursor when we need to update records in a database table in singleton fashion means row by row. Life Cycle of Cursor Declare Cursor A cursor is declared by defining the SQL statement that returns a result set. Open A Cursor is opened and populated by executing the SQL statement defined by the cursor. Fetch
Different Types of SQL Server Functions

Different Types of SQL Server Functions

Types of Function System Defined Function These functions are defined by Sql Server for different purpose. We have two types of system defined function in Sql Server Scalar Function Scalar functions operates on a single value and returns a single value. Below is the list of some useful Sql Server Scalar functions. abs(-10.67)- This returns absolute number of the given number means 10.67. rand(10)-This will generate random number of 10 characters. round(17.56719,3)-This will round off the given number to 3 places of decimal means 17.567
SQL Server Exception Handling by TRY…CATCH

SQL Server Exception Handling by TRY…CATCH

TRY..CATCH Syntax BEGIN TRY --T-SQL statements --or T-SQL statement blocks END TRY BEGIN CATCH --T-SQL statements --or T-SQL statement blocks END CATCH Error Functions used within CATCH block ERROR_NUMBER() This returns the error number and its value is same as for @@ERROR function. ERROR_LINE() This returns the line number of T-SQL statement that caused error. ERROR_SEVERITY() This returns the severity level of the error. ERROR_STATE()