Download presentation
Presentation is loading. Please wait.
1
VTALKS #12 @Microsoft Thailand All Season Place
2
Agenda Web Forms Core Services Web Designer Improvement Web Application Deployment Dynamic Data AJAX Functionality in ASP.NET 4.0
3
ASP.NET 4.0 Web Forms Feature
4
Set meta tags on Web Forms Feature for Search Engine Optimize (SEO) Allow set page meta tags keywords description With Coding Demo this.MetaKeywords = "Greatfriends.biz, Visual Studio 2010,.NET, ASP.NET 4.0, SilverLight, Team System 2010"; this.MetaDescription = "VTALKS #12“;
5
View State for Individual Controls ViewStateMode tag Enabled (default value) Disabled Inherit Able to specify for each control Able to force all control at Page Directive Demo
6
Browser Capabilities Using determines browser that user is using browse to you site. To get user browser information HTML, XHTML support version JavaScript version Mobile Browser HttpBrowserCapabilities object after using this feature.
7
Browser Capabilities blackberry.browser chrome.browser Default.browser firefox.browser gateway.browser generic.browser ie.browser iemobile.browser iphone.browser opera.browser safari.browser New Browser Definition Files:
8
Using Browser Capabilities Providers Using ASP.NET Standard Browser Capabilities Use aspnet_regbrowsers.exe –i, It’s will create ASP.BrowserCapsFactory.dll and install to GAC Restart IIS iisreset Custom your Browser Capabilities Derived HttpCapabilitiesProvider Class Override GetBrowserCapabilities Method to return your BC. Register to web.config <browserCaps … Use in Global.asax Application_Start() Event
9
Browser Capabilities Providers HttpBrowserCapabilities object caching Extending ASP.NET Browser Capabilities Functionality Extending Browser Capabilities Functionality by Adding New Capabilities to Existing Capabilities Definitions
10
ASP.NET Web Forms Routing Let you configure new simple URL SEO Optimize It Likes ASP.NET MVC Routing Such as from http://website/products.aspx?categoryid=12 http://website/products.aspx?categoryid=12 To new URL http://website/products/software http://website/products/software
11
ASP.NET Web Forms Routing Map routing in Global.asax file on Application_Start() Event, Add RouteTable.Routes.MapPageRoute() method checkPhysicalUrlAccess for restrict URL access permission Reading Routing Information in a Web Forms Page Page.RouteData.Values["searchterm"] as string; value “http://localhost/search/scott/”
12
ASP.NET Web Forms Routing Accessing Routing Information in Markup ">Search for Scott value “http://localhost/search/scott/” Using Route Data for Data Source Control Parameters RouteParameter class lets you specify route data as a parameter value for queries in a data source control. It works much like FormParameter ” selectcommand="SELECT CompanyName,ShipperID FROM Shippers where CompanyName=@companyname“
13
ASP.NET 4.0 Client ID Control ID Feature ClientIDMode AutoID – Auto Generate by ASP.NET. Static – Fix ID Predictable – For repeating template control, in ClientIDRowSuffix should be PrimaryKey or Object ID Inherit –default behavior, same as its parent.
14
Persisting Row Selection in Data Controls Persist Selected Row Enabled for GridView and ListView controls Use EnablePersistedSelection
15
ASP.NET 4.0 Core Services Feature
16
Web.config File Minification Move major configuration to machine.config, and leave your new configuration only Able to override value on web.config
17
Extensible Output Caching Session State SQL Server State Output Cache Providers (New) Allow your set default cache provider Able to customize your output cache provider Able to configure one or more
18
New 4.0 Cache Functionality Cache Namespace System.Caching { } CacheProvider Disk based Windows Azure Distributed In- memory
19
New 4.0 Output Cache Functionality Namespace System.Web.Caching { } Disk based Windows Azure Distributed In- memory OutputCacheProvider Default.aspx Foo.ascx
20
Extensible Output Caching Add Output Cache Provider in web.config Can specify page to use output cache provider with Page and Control Directive Configure all in Global.asax public override string GetOutputCacheProviderName(HttpContext context)
21
Auto-Start Web Applications Many web app need to load initialize data. This expensive to do Solve the first requests Timeout problem Wake up asp.net app with your custom code on Application_Load Event in Global.asax file For ASP.NET 4.0 + IIS 7.5 + Win2K8 R2 Only Config in %Windows%\System32\inetsrv\config applicationHost.config
22
specify individual applications pool to be automatically started Auto-Start Web Applications <!-- Additional content <add name="PrewarmMyCache" type="MyNamespace.CustomInitialization, MyLibrary" />
23
Auto-Start Web Applications For implement PreloadProvider using System.Web.Hosting.IProcessHostPreloadClie nt public class CustomInitialization : System.Web.Hosting.IProcessHostPreloadClient { public void Preload(string[] parameters) { // Perform initialization. }
24
Permanently Redirecting a Page Feature for Search Engine Optimize (SEO) Generate Http 301 on response header and attached new URL of request page Just call this method Response. RedirectPermanent("/newpath/foroldcontent.aspx");
25
The Incredible Shrinking Session State Support both out-of-process and session- state providers Just configure in web.config <sessionState mode="SqlServer" sqlConnectionString="data source=dbserver;Initial Catalog=aspnetstate" allowCustomSqlDatabase="true" compressionEnabled="true" />
26
Expanding the Range of Allowable URLs Expand URL range from 260 characters (old asp.net) to customize value Customize request path validator,*,%,&,:,\" />
27
Extensible Request Validation Prevent Cross-site scripting (XSS) attacks Validate Process on HttpRuntime, add tag in web.config Customizable with your code public class CustomRequestValidation : RequestValidator { protected override bool IsValidRequestString( HttpContext context, string value, RequestValidationSource requestValidationSource, string collectionKey, out int validationFailureIndex) {... } }
28
Object Caching and Object Caching Extensibility New MemoryCache class in System.Runtime.Caching.dll Allow call from any Application Type without System.Web.dll dependency For do this required documentation for implement, Please wait!
29
Extensible HTML, URL, and HTTP Header Encoding System.Web.Util.HttpEncoder Extensible to create Custom Encoding on HttpRuntime Add custom encoding in web.config file
30
Performance Monitoring for Individual Applications in a Single Worker Process Diagnostic worker process feature by CRL Admin can configure in aspnet.config file
31
Multi-Targeting Allow to specify version of.NET framework …..
32
ASP.NET Chart Control 35 distinct chart types. An unlimited number of chart areas, titles, legends, and annotations. A wide variety of appearance settings for all chart elements. 3-D support for most chart types. Smart data labels that can automatically fit around data points. Strip lines, scale breaks, and logarithmic scaling. More than 50 financial and statistical formulas for data analysis and transformation. Simple binding and manipulation of chart data. Support for common data formats, such as dates, times, and currency. Support for interactivity and event-driven customization, including client click events using AJAX. State management. Binary streaming.
33
ASP.NET Chart Control
34
Visual Studio 2010 Web Designer Improvements Improved CSS Compatibility using CSS 2.1 HTML and JScript Snippets JScript IntelliSense Enhancements
35
Web Application Deployment with Visual Studio 2010 Web packaging 10 + 20 reasons why you should create a Web Package 10 + 20 reasons why you should create a Web Package Web.config Transformation Web Deployment: Web.Config Transformation Web Deployment: Web.Config Transformation Database deployment Database Deployment with VS 2010 Database Deployment with VS 2010 One-Click Publish for Web applications Web 1-Click Publish with VS 2010 Web 1-Click Publish with VS 2010
36
Resource Visual Studio 2010 Beta 1 http://go.microsoft.com/?linkid=9666892 http://go.microsoft.com/?linkid=9666892 ASP.NET 4.0 Beta 2 Documentation http://www.asp.net/learn/whitepapers/aspnet40 http://www.asp.net/learn/whitepapers/aspnet40 http://weblogs.asp.net/scottgu http://weblogs.asp.net/scottgu
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.