Click here to Skip to main content
Click here to Skip to main content
Articles » Database » Database » ADO.NET » Downloads
Add your own
alternative version

A Beginner's Tutorial for Understanding Transactions and TransactionScope in ADO.NET

, 4 Jan 2013 CPOL
This article is a beginner's tutorial for understanding what are transactions and how can transactions be implemented using .Net framework and ADO.NET for any ASP.NET web application or any other database driven application.
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="DefaultSql.aspx.cs" Inherits="_DefaultSql" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html xmlns="" >
<head runat="server">
    <title>ADO.NET Transaction Demo</title>
    <form id="form1" runat="server">
        <asp:GridView ID="GridView1" runat="server" BorderWidth="1px" CellPadding="4" ForeColor="#333333">
            <RowStyle BackColor="#EFF3FB" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <EditRowStyle BackColor="#2461BF" />
            <AlternatingRowStyle BackColor="White" />
        <br />
        <br />
    <table width="600px" style="text-align:center;border-collapse:collapse;" border="1px">
    <td style="text-align: left">
        Enter Amount to Transfer</td>
    <td style="text-align: left">
                <asp:TextBox ID="txtAmount" runat="server"></asp:TextBox></td>
            <td style="text-align: left">
            <td style="text-align: left">
                <asp:Button ID="btnAccount1" runat="server" Text="Account 1 to Account 2" OnClick="btnAccount1_Click" /></td>
            <td style="text-align: left">
                <asp:Button ID="btnAccount2" runat="server" Text="Account 2 to Account 1" OnClick="btnAccount2_Click" /></td>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Rahul Rajat Singh
India India
I Started my Programming career with C++. Later got a chance to develop Windows Form applications using C#. Currently using C#, ASP.NET & ASP.NET MVC to create Information Systems, e-commerce/e-governance Portals and Data driven websites.

My interests involves Programming, Website development and Learning/Teaching subjects related to Computer Science/Information Systems. IMO, C# is the best programming language and I love working with C# and other Microsoft Technologies.
  • Microsoft Certified Technology Specialist (MCTS): Web Applications Development with Microsoft .NET Framework 4
  • Microsoft Certified Technology Specialist (MCTS): Accessing Data with Microsoft .NET Framework 4
  • Microsoft Certified Technology Specialist (MCTS): Windows Communication Foundation Development with Microsoft .NET Framework 4
If you like my articles, please visit my website for more:[^]
Follow on   Twitter   Google+   LinkedIn

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.150123.1 | Last Updated 5 Jan 2013
Article Copyright 2013 by Rahul Rajat Singh
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid