Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Error with my data source for an Ajax Demo app - how to fix? (VS2008)

$
0
0

Here is the error message -- and below that is the connection string snippet to the sample DB from web.config and also all of Default.aspx (no .cs file - just ajax in the source) -- I'm using sql server 2008 RS (for desktop) and using VS2008 C# for the app -- how do I fix this error?

--web.config
...
<connectionStrings>
  <add name="DatabaseConnectionString" connectionString="Data Source=COMP10\SQL2008R2;Initial Catalog=AtlasAjaxDem;Integrated Security=True;"    providerName="System.Data.SqlClient" />
</connectionStrings>
...
-------------------------------------
--Default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
        <atlas:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"/>
       
        <atlas:UpdatePanel runat="server" ID="UpdatePanel1" Mode="Conditional">
            <ContentTemplate>
                &nbsp; &nbsp;&nbsp; &nbsp;
                <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
                    AutoGenerateColumns="False" DataKeyNames="EmployeeId" DataSourceID="ObjectDataSource1">
                    <Columns>
                        <asp:CommandField ShowEditButton="True" />
                        <asp:BoundField DataField="EmployeeId" HeaderText="EmployeeId" InsertVisible="False"
                            ReadOnly="True" SortExpression="EmployeeId" />
                        <asp:BoundField DataField="FirstName" HeaderText="FirstName" SortExpression="FirstName" />
                        <asp:BoundField DataField="LastName" HeaderText="LastName" SortExpression="LastName" />
                        <asp:BoundField DataField="Department" HeaderText="Department" SortExpression="Department" />
                    </Columns>
                </asp:GridView>
                <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="Delete"
                    InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData"
                    TypeName="DataSet1TableAdapters.EmployeesTableAdapter" UpdateMethod="Update">
                    <DeleteParameters>
                        <asp:Parameter Name="Original_EmployeeId" Type="Int16" />
                    </DeleteParameters>
                    <UpdateParameters>
                        <asp:Parameter Name="FirstName" Type="String" />
                        <asp:Parameter Name="LastName" Type="String" />
                        <asp:Parameter Name="Department" Type="String" />
                        <asp:Parameter Name="Original_EmployeeId" Type="Int16" />
                    </UpdateParameters>
                    <InsertParameters>
                        <asp:Parameter Name="FirstName" Type="String" />
                        <asp:Parameter Name="LastName" Type="String" />
                        <asp:Parameter Name="Department" Type="String" />
                    </InsertParameters>
                </asp:ObjectDataSource>
               
            </ContentTemplate>
        </atlas:UpdatePanel>      
    </form>

    <script type="text/xml-script">
        <page xmlns:script="http://schemas.microsoft.com/xml-script/2005">
            <references>
            </references>
            <components>
            </components>
        </page>
    </script>
</body>
</html>

 THANKS


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>