Probl

Sep 15 2008 4:00 AM
Hi!      I am facing problem in INSERT statement of SQL 2005 express. Actually I want to save data from one table to other two tables using SQL statement. I want to do something like that, when I will press Create button from DataGride Column. The data of that row of that Registration  table will insert in some other table like Account and Directory. I have tried but I cannot do it. Please help me.
<%@ Page Language="C#" MasterPageFile="~/Admin.master" AutoEventWireup="true" CodeFile="AControlAccounts.aspx.cs" Inherits="Default2" Title="Untitled Page" %><asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"><table><tr><td style="width: 713px"></td></tr><tr><td style="width: 713px">    </td>
khalid bhai
<%@ Page Language="C#" MasterPageFile="~/Admin.master" AutoEventWireup="true" CodeFile="AControlAccounts.aspx.cs" Inherits="Default2" Title="Untitled Page" %><asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"><table><tr><td style="width: 713px"></td></tr>
<asp:TemplateField HeaderText="Delete"><ItemTemplate><asp:LinkButton ID="Delete" runat="server" OnClientClick="return confirm ('Are you sure, you want to delete the record?');" CommandName="Delete" Font-Bold="true" Font-Size="Small"> Delete</asp:LinkButton></ItemTemplate></asp:TemplateField></Columns>    <HeaderStyle BackColor="#E0E0E0" Wrap="False" /></asp:GridView>    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:connectionString %>"        SelectCommand="SELECT [RegId], [UserName], [Password], [FullName], [EMail], [City], [Country] FROM [Registration]"         DeleteCommand="DELETE FROM Registration WHERE (RegId = @RegId)"