3-Tier architecture is a very well know buzz word in the world of software development whether it web based or desktop based. Below is the code for BAL (Your can overwrite your default written code for the class file by pasting this code). You can also navigate to another page your created (list.aspx) and try updating, deleting records.

This enables you to provide an event-handling method that performs a custom routine, such as canceling the update operation, whenever this event occurs.

A Grid View Update Event Args object is passed to the event-handling method, which enables you to determine the index of the current row and to indicate that the update operation should be canceled.

Everything is working fine, but the Grid View is Updating the Database with the Value that is already there instead of the new one that is entered into the Edit Textbox.

I've been staring at this for a whole day and can't figure anything out.

Do not bind the Grid View on every Post Back as it gets populated again when you Post Back the page and the data you have entered whilein edit mode got lost as the Grid binds again. Is Post Back) block, you will not get the issue there after.

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment.

To cancel the update operation, set the collections, if necessary, before the values are passed to the data source.

A common way to use these collections is to HTML-encode the values supplied by the user before they are stored in the data source.

I'm using a sqldatasource control to populate the grid and want to write the update code in the Row Updating event. I can get the value of the first field using string old_Category = e.

To String(); it returns an error message Index was out of range. ID="Grid View1" runat="server" Auto Generate Columns="False" Data Source ID="Sql Data Source1" Border Width="0px" Border Style="None" Width="100%" Cell Padding="2" Page Size="25" On Row Deleting="Project List Grid View_Row Deleting" onrowdatabound="Grid View1_Row Data Bound" onrowupdating="Grid View1_Row Updating" onrowediting="Grid View1_Row Editing" ID="Drop Down List1" runat="server" Data Source ID="sds Ddl Projects Edit" Data Text Field="Project Name" Data Value Field="Project ID" Auto Post Back="True" onselectedindexchanged="Drop Down List1_Selected Index Changed" " Select Command="SELECT @Week Ending Week Ending , Project , Project ID , Category , Category ID ,isnull([1], 0) Sun ,isnull([2], 0) Mon ,isnull([3], 0) Tue ,isnull([4], 0) Wed ,isnull([5], 0) Thu ,isnull([6], 0) Fri ,isnull([7], 0) Sat from (select P.

Time Entry Duration Hours FROM dbo.aspnet_starterkits_Time Entry TE inner join dbo.aspnet_starterkits_Project Categories CAT on TE. Category ID inner join dbo.aspnet_starterkits_Projects P on CAT.