Skip to main content

Posts

Showing posts from September, 2019

Asp.net Gridview basic CRUD example for insert update and delete the records

Asp.net Gridview basic CRUD example for insert update and delete the records an example about asp.net gridvew which covers the following points. Insert the data in database  Binding the data to gridview from database  Grid view row editing Updating the records in database Grid view row deleting and taking confirmation before deleting the record SQL query to create table tblCustomers: SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [dbo].[tblCustomers](       [CustomerID] [int] IDENTITY(1,1) NOT NULL,       [CustomerName] [varchar](50) NULL,       [PhoneNumber] [varchar](10) NULL,       [Address] [varchar](200) NULL,       [IsActive] [bit] NULL,  CONSTRAINT [PK_tblCustomers] PRIMARY KEY CLUSTERED (       [CustomerID] ASC )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY] ) ON [PRIMARY] GO SET ANSI_PADDING OFF GO . Gr

ASP.net page life cycle

ASP.Net Page Life Cycle What ASP.Net Page Life Cycle is   When a page is requested by the user from the browser, the request goes through a series of steps and many things happen in the background to produce the output or send the response back to the client. The periods between the request and response of a page is called the "Page Life Cycle". Request:  Start of the life cycle (sent by the user). Response:  End of the life cycle (sent by the server). Now let's see how to initiate a request.       Now we"ll see the entire process of the Page Life Cycle.   First the client requests a page or resource from the browser. The request is passed to the IIS server. The IIS server starts the initial processing of the request and one of the basic extensions, like .aspx or .ascx, loads the "ASPNET_ISAP.dll". The ASPNET_ISAP.dll generates the "HttpRuntime" class and assigns it to the worker process. The HttpRuntime class generates

Asp.net grid CRUD with ADO.NET

Asp.net grid CRUD with ADO.NET A GridView is a graphical control element that presents a tabular view of data. A typical Grid View also supports some or all of the following: Clicking a column header to change the sort order of the Grid. Dragging column headers to change their size and their order. The GridView control displays the values of a data source in a table. Each column represents a field, while each row represents a record. Support to data source controls, such as SqlDataSource. Support sort capabilities. Support update and delete capabilities. Support paging capabilities. Support row selection capabilities. Code behind feature access to the GridView object model to dynamically set properties, handle events, and so on. Many key fields. Many data fields for the hyperlink columns. Customized style layout through themes and styles using css and javascript. The following operations can be performed using GridView control in ASP.NET using C# code behind. Fea