Atlas Problem

G

GaryDean

I have an asp.net app using Atlas (july ctp) written from an example I
found at the 4guysfromrolla.com site. It's very much like the examples
I find at this site. I have pasted the body of the aspx page below.

As you can see it has the ScriptManager the page and then, inside an
UpdatePanel
it has a GridView and a datasource. The app runs but anytime an action
is taken such as a page change or an update it causes a normal klunky
postback just as though the Atlas components were not on the page.

So, it doesn't work as expected.

Can anyone tell me what is wrong?

Thanks,
Gary



<body>
<form id="form1" runat="server">
<atlas:ScriptManager ID="ScriptManager1" runat="server" />
&nbsp;
<atlas:UpdatePanel ID="UpdatePanel1" runat="server"
Mode="Conditional">
<ContentTemplate>
<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>
 
K

Ken Cox [Microsoft MVP]

Hi Gary,

The first thing I notice is that you aren't enabling partial page
rendering. I have no idea why this isn't the default, but try it this way:

<atlas:ScriptManager id="ScriptManager1" runat="server"
EnablePartialRendering="true"></atlas:ScriptManager>

Let us know if this helps?

Ken
Microsoft MVP [ASP.NET]
 
G

GaryDean

Ken,
Yes that was it. There was nothing wrong with the example at the website.
Just pilot error on my part.
This Atlas stuff really looks great.

--
Regards,
Gary Blakely
Ken Cox said:
Hi Gary,

The first thing I notice is that you aren't enabling partial page
rendering. I have no idea why this isn't the default, but try it this way:

<atlas:ScriptManager id="ScriptManager1" runat="server"
EnablePartialRendering="true"></atlas:ScriptManager>

Let us know if this helps?

Ken
Microsoft MVP [ASP.NET]

GaryDean said:
I have an asp.net app using Atlas (july ctp) written from an example I
found at the 4guysfromrolla.com site. It's very much like the examples
I find at this site. I have pasted the body of the aspx page below.

As you can see it has the ScriptManager the page and then, inside an
UpdatePanel
it has a GridView and a datasource. The app runs but anytime an action
is taken such as a page change or an update it causes a normal klunky
postback just as though the Atlas components were not on the page.

So, it doesn't work as expected.

Can anyone tell me what is wrong?

Thanks,
Gary



<body>
<form id="form1" runat="server">
<atlas:ScriptManager ID="ScriptManager1" runat="server" />
&nbsp;
<atlas:UpdatePanel ID="UpdatePanel1" runat="server"
Mode="Conditional">
<ContentTemplate>
<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>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top