Introduction
In this article you will learn how to edit, update and delete in ListView. First drag and drop ListView. In ListView, next open Default.aspx source code. To make a column in Listview use <LayoutTemplate>. Here first I created a table name 'Product' in my database. It contains 5 columns: ProductId, ProductName,ProductLocation,ProductQuantity, and ProductPrice.
- Download my sample.
- Inside that folder person.sql file will be there; execute it in your database.
- Change the connection string in web.config file
Building the Sample
This sample is written using three tier architecture so you have to add references.
UI->BusinessLogic
BusinessLogic->DataAccess back to BL
BusinessLogic->Commonfunctioon back to BL
BusinessLogic -> UI finally BL return data to UI
- /****** Object: Table [dbo].[Product] Script Date: 05/31/2013 10:56:27 ******/
- /****** Sathiyamoorthy.S ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- SET ANSI_PADDING ON
- GO
- CREATE TABLE [dbo].[Product](
- [pk_id] [int] IDENTITY(1,1) NOT NULL,
- [ProductId] [varchar](5) NULL,
- [ProductName] [varchar](50) NULL,
- [ProductPrice] [numeric](8, 2) NULL,
- [ProductLocation] [varchar](25) NULL,
- [ProductQuantity] [varchar](10) NULL,
- PRIMARY KEY CLUSTERED
- (
- [pk_id] 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
- select pk_id,ProductId,ProductName,ProductLocation,ProductQuantity,ProductPrice from Product




Join the conversation! Your thoughts help the community grow.