Transcript
Page 1: ASP:ListView ASP:DataPager ASP:LinqDataSource ASP:ListView Adventure Works Products Adventure Works Products Adventure Works Products Adventure Works

What’s New inASP.NET

Michael C. Neel

Page 2: ASP:ListView ASP:DataPager ASP:LinqDataSource ASP:ListView Adventure Works Products Adventure Works Products Adventure Works Products Adventure Works

New Tags

ASP:ListView

ASP:DataPager

ASP:LinqDataSource

Page 3: ASP:ListView ASP:DataPager ASP:LinqDataSource ASP:ListView Adventure Works Products Adventure Works Products Adventure Works Products Adventure Works

ASP:ListView<asp:ListView ID="lvProducts" runat="server“ GroupItemCount="3“ > <LayoutTemplate> <h3>Adventure Works Products</h3> <table>

<tr id="groupPlaceholder" runat="server” /> </table> </LayoutTemplate> <GroupTemplate> <tr> <td id="itemPlaceholder" runat="server" /> </tr> </GroupTemplate> <ItemTemplate> <td><%# Eval("Name") %></td> </ItemTemplate> <EmptyItemTemplate> <td>&nbsp;</td> </EmptyItemTemplate></asp:ListView>

<asp:ListView ID="lvProducts" runat="server“ GroupItemCount="3“ > <LayoutTemplate> <h3>Adventure Works Products</h3> <table>

<tr id="groupPlaceholder" runat="server” /> </table> </LayoutTemplate> <GroupTemplate> <tr> <td id="itemPlaceholder" runat="server" /> </tr> </GroupTemplate> <ItemTemplate> <td><%# Eval("Name") %></td> </ItemTemplate> <EmptyItemTemplate> <td>&nbsp;</td> </EmptyItemTemplate></asp:ListView>

<asp:ListView ID="lvProducts" runat="server“ GroupItemCount="3“ > <LayoutTemplate> <h3>Adventure Works Products</h3> <table>

<tr id="groupPlaceholder" runat="server” /> </table> </LayoutTemplate> <GroupTemplate> <tr> <td id="itemPlaceholder" runat="server" /> </tr> </GroupTemplate> <ItemTemplate> <td><%# Eval("Name") %></td> </ItemTemplate> <EmptyItemTemplate> <td>&nbsp;</td> </EmptyItemTemplate></asp:ListView>

<asp:ListView ID="lvProducts" runat="server“ GroupItemCount="3“ > <LayoutTemplate> <h3>Adventure Works Products</h3> <table>

<tr id="groupPlaceholder" runat="server” /> </table> </LayoutTemplate> <GroupTemplate> <tr> <td id="itemPlaceholder" runat="server" /> </tr> </GroupTemplate> <ItemTemplate> <td><%# Eval("Name") %></td> </ItemTemplate> <EmptyItemTemplate> <td>&nbsp;</td> </EmptyItemTemplate></asp:ListView>

<asp:ListView ID="lvProducts" runat="server“ GroupItemCount="3“ > <LayoutTemplate> <h3>Adventure Works Products</h3> <table>

<tr id="groupPlaceholder" runat="server” /> </table> </LayoutTemplate> <GroupTemplate> <tr> <td id="itemPlaceholder" runat="server" /> </tr> </GroupTemplate> <ItemTemplate> <td><%# Eval("Name") %></td> </ItemTemplate> <EmptyItemTemplate/> <InsertItemTemplate /> <EditItemTemplate /></asp:ListView>

Page 4: ASP:ListView ASP:DataPager ASP:LinqDataSource ASP:ListView Adventure Works Products Adventure Works Products Adventure Works Products Adventure Works

ASP:DataPager

<asp:DataPager ID="dpProducts" runat="server" PageSize="14" PagedControlID="lvProducts"> <Fields> <asp:NumericPagerField ButtonCount="10“ /> </Fields></asp:DataPager>

<asp:DataPager ID="dpProducts" runat="server" PageSize="14" PagedControlID="lvProducts"> <Fields> <asp:NumericPagerField ButtonCount="10“ /> </Fields></asp:DataPager>

<asp:DataPager ID="dpProducts" runat="server" PageSize="14" PagedControlID="lvProducts"> <Fields> <asp:NumericPagerField ButtonCount="10“ /> </Fields></asp:DataPager>

… 3 4 5 6 7 8 9 10 11 12 …

<asp:DataPager ID="dpProducts" runat="server" PageSize="14" PagedControlID="lvProducts"> <Fields> <asp:NextPreviousPagerField /> </Fields></asp:DataPager>

Previous Next

<asp:DataPager ID="dpProducts" runat="server" PageSize="14" PagedControlID="lvProducts"> <Fields> <asp:TemplatePagerField> <PagerTemplate> Page <%# Container.TotalRowCount>0 ? (Container.StartRowIndex / Container.PageSize) + 1 : 0 %> of <%# Math.Ceiling ((double)Container.TotalRowCount / Container.PageSize) %> ( <%# Container.TotalRowCount%> records ) </PagerTemplate> </asp:TemplatePagerField> </Fields></asp:DataPager>

Page 5 of 12 ( 167 records )

<asp:DataPager ID="dpProducts" runat="server" PageSize="14" PagedControlID="lvProducts"> <Fields> <asp:TemplatePagerField /> <asp:NextPreviousPagerField /> <asp:NumericPagerField /> <asp:NextPreviousPagerField /> </Fields></asp:DataPager>

Page 5: ASP:ListView ASP:DataPager ASP:LinqDataSource ASP:ListView Adventure Works Products Adventure Works Products Adventure Works Products Adventure Works

ASP:LinqDataSource

<asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="AWLinqDataContext" TableName="Products" Where="ThumbnailPhotoFileName != @ThumbnailPhotoFileName" EnableDelete="True" EnableInsert="True" EnableUpdate="True" OrderBy="ProductID"> <WhereParameters> <asp:Parameter DefaultValue="no_image_available_small.gif" Name="ThumbnailPhotoFileName" Type="String" /> </WhereParameters></asp:LinqDataSource>

<asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="AWLinqDataContext" TableName="Products" Where="ThumbnailPhotoFileName != @ThumbnailPhotoFileName" EnableDelete="True" EnableInsert="True" EnableUpdate="True" OrderBy="ProductID"> <WhereParameters> <asp:Parameter DefaultValue="no_image_available_small.gif" Name="ThumbnailPhotoFileName" Type="String" /> </WhereParameters></asp:LinqDataSource>

<asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="AWLinqDataContext" TableName="Products" Where="ThumbnailPhotoFileName != @ThumbnailPhotoFileName" EnableDelete="True" EnableInsert="True" EnableUpdate="True" OrderBy="ProductID"> <WhereParameters> <asp:Parameter DefaultValue="no_image_available_small.gif" Name="ThumbnailPhotoFileName" Type="String" /> </WhereParameters></asp:LinqDataSource>

<asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="AWLinqDataContext" TableName="Products" Where="ThumbnailPhotoFileName != @ThumbnailPhotoFileName" EnableDelete="True" EnableInsert="True" EnableUpdate="True" OrderBy="ProductID"> <WhereParameters> <asp:Parameter DefaultValue="no_image_available_small.gif" Name="ThumbnailPhotoFileName" Type="String" /> </WhereParameters></asp:LinqDataSource>

Page 6: ASP:ListView ASP:DataPager ASP:LinqDataSource ASP:ListView Adventure Works Products Adventure Works Products Adventure Works Products Adventure Works

JavaScriptDebugging

• Set IE as default browser in VS

• Enable script debugging in IE

• Launch Debugger (F5)

Page 7: ASP:ListView ASP:DataPager ASP:LinqDataSource ASP:ListView Adventure Works Products Adventure Works Products Adventure Works Products Adventure Works

C:\Program Files\Microsoft Visual Studio 9.0\VC>aspnet_merge -?Utility to merge precompiled ASP.NET assemblies. Version 3.5.21022.Copyright (c) Microsoft Corporation 2007. All rights reserved.

Usage:aspnet_merge [-?] applicationPath [-keyfile filename [-delaysign]] [-o assemblyname | -w assemblyname | -prefix prefix] [-copyattrs [assemblyfile]] [-debug] [-nologo] [-errorstack] [-r] [-xmldocs] [-a] [-log logfile] [-allowattrs filename]

-? Display this help text.applicationPath The physical path of the precompiled application.-keyfile The physical path to the strongly name keyfile.-delaysign Delay sign the merged assemblies.-o Merge the entire application into a single assembly with the given name. This option cannot be combined with the -prefix or -w options.-w Merge the application Web files into a single assembly with the given name. This option cannot be combined with the -o or -prefix options.-prefix Prefix the merged assembly names with a specified string. This option cannot be combined with the -o or -w options.-copyattrs Copy the assembly level attributes from the input assembly. If input assembly is not specified, the main App_Code assembly will be used instead.-debug Preserve debug information in the merged assembly. The default is to remove debug information.

aspnet_merge.exe

C:\Program Files\Microsoft Visual Studio 9.0\VC>aspnet_merge -?

webdeployment

projects

Page 8: ASP:ListView ASP:DataPager ASP:LinqDataSource ASP:ListView Adventure Works Products Adventure Works Products Adventure Works Products Adventure Works

New ASP.NETAJAX Support!

Page 9: ASP:ListView ASP:DataPager ASP:LinqDataSource ASP:ListView Adventure Works Products Adventure Works Products Adventure Works Products Adventure Works

ASP.NET 3.5 Extensions CTPClean up with

Dynamic Data Websites!

Now with 50% more Scaffolding!

Page 10: ASP:ListView ASP:DataPager ASP:LinqDataSource ASP:ListView Adventure Works Products Adventure Works Products Adventure Works Products Adventure Works

ASP.NET 3.5 Extensions CTP

But Wait!There’sMore

Instant REST withADO.Net Data Services!

Page 11: ASP:ListView ASP:DataPager ASP:LinqDataSource ASP:ListView Adventure Works Products Adventure Works Products Adventure Works Products Adventure Works

ASP.NET 3.5 Extensions CTPThe MVC Framework Will Save Us All

*Maybe…

*

Page 12: ASP:ListView ASP:DataPager ASP:LinqDataSource ASP:ListView Adventure Works Products Adventure Works Products Adventure Works Products Adventure Works

DYHAQFM?

Michael C. [email protected]

http://ViNull.Com


Top Related