asp.net 4.0 demo
DESCRIPTION
ASP.NET 4.0 features with Dynamic Data Websites presented by me for DotNetFunda.comTRANSCRIPT
![Page 1: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/1.jpg)
ASP.NET 4.0 In-DepthBy
In case you are having issues regarding audio and video please contact at [email protected], these training are available as recordings later , please do not disturb during training.
• Please Mute your mic and mobile during training.
• Ask your question using the Q and A tab in live meeting.
• Speak one at a time so that every one is benefited.
This training session is
• sponsored by www.itfunda.com • supported and organized by www.questpond.com
Abhijit Jana & Abhishek SurIn Support with
DotNetFunda.Com
![Page 2: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/2.jpg)
Abhijit Jana & Abhishek Sur
![Page 3: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/3.jpg)
Agenda
ASP.NET 4.0ASP.NET 4.0
• Web form Routing• Meta description• Permanent
Redirection
• Web form Routing• Meta description• Permanent
Redirection
Search Engine OptimizationSearch Engine Optimization
• Controlling View State • Compression Enabled
Session • Output Caching
Extensibility
• Controlling View State • Compression Enabled
Session • Output Caching
Extensibility
State ManagementState Management
• Control over client id• Html encoded code
expressions• CSS improvements
• Control over client id• Html encoded code
expressions• CSS improvements
Client SideClient Side
• Smaller Web.config• Performance monitoring
for individual applicatiion• AutoStart application• increase url character• Web.Config
Transformation
• Smaller Web.config• Performance monitoring
for individual applicatiion• AutoStart application• increase url character• Web.Config
Transformation
DeploymentDeployment
• Enhancement in Listview control
• RadioButtonList and CheckBoxList
• CSS Friendly Menu Control
• Enhancement in Listview control
• RadioButtonList and CheckBoxList
• CSS Friendly Menu Control
Server Control EnhancementsServer Control Enhancements
Overview of Dynamic DataOverview of
Dynamic Data
Visual Studio 2010 Enhancement for ASP.NET 4.0Visual Studio 2010 Enhancement for ASP.NET 4.0
Multi targeting Multi targeting
Publish for Web AppPublish for Web App Code SnippetsCode Snippets
Diff. Integrated Web Server Diff. Integrated Web Server
Project TemplatesProject Templates JavaScript intellesenceJavaScript intellesence
![Page 4: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/4.jpg)
Session Flow
1. Discussion of current topic
2. Different Improvement areas
3. Quick Tips
1. Discussion of current topic
2. Different Improvement areas
3. Quick Tips
Demo of all the discussed TopicsDemo of all the
discussed Topics
Quick Recap on what we have
discussed till now
Quick Recap on what we have
discussed till now
Moving forwards to next session
Moving forwards to next session
QuestionsAnd
Answers
QuestionsAnd
Answers
![Page 5: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/5.jpg)
Visual Studio 2010 Enhancement for ASP.NET 4.0
Multi targeting Different Version of Integrated Web Server Code Snippets for Web designer Java script intellesence Project TemplatesPublish a web application
AbhijitJana.net & AbhishekSur.com
![Page 6: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/6.jpg)
Multi targeting
Key Notes : Multi-Targeting Support in VS 2008 Changes in Multi-Targeting in 2010 Convert ASP.NET application from
one framework to another framework
![Page 7: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/7.jpg)
Different Version of Integrated Web Server
Key Notes Visual studio used Integrated
ASP.NET engine to run ASP.NET Application from IDE
CLR version (CLR 2 and CLR 4) you have separate built-in ASP.NET Engine
Side by Side Execution of different framework
![Page 8: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/8.jpg)
Code Snippets for Web designer
Key Notes Code snippets for
– ASP.NET– HTML– ASP.NET AJAX– XML– ASP.NET MVC
Use Surround With Snippets Custom Code Snippet
![Page 9: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/9.jpg)
Java script intellesence
Key Notes Improvement like Code snippets in
ASP.NET Recognize dynamically generated
objects
![Page 10: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/10.jpg)
Project Templates
Key Notes Addition of new templates and
modification of existing templates– ASP.NET Empty Web Application– ASP.NET Web Application
![Page 11: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/11.jpg)
Publish a web application
Key Notes• Many New features added
for Web Site deployment in VS 2010
• One-click publishing• Web packaging• Web.config transformation• Database deployment
![Page 12: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/12.jpg)
DEMOVisual Studio 2010 Enhancement for ASP.NET 4.0
![Page 13: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/13.jpg)
QUICK RECAPVisual Studio 2010 Enhancement for ASP.NET 4.0
![Page 14: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/14.jpg)
QUESTIONS & ANSWERSVisual Studio 2010 Enhancement for ASP.NET 4.0
![Page 15: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/15.jpg)
Server Control Enhancement
RadioButtonList and Checkbox ListEnhancement in List view controlCSS Friendly Menu Control
![Page 16: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/16.jpg)
RadioButtonList and Checkbox ListKey Notes Checkbox list and radiobutton list both
having “RepeatLayout “ properties ASP.NET 3.5 supports “Flow” and “Table”
layout ASP.NET 4.0 added two new layout
“Orderedlist” “UnorderedList These layout has only “Vertical”
RepeatDirection for new layouts.
![Page 17: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/17.jpg)
CSS Friendly Menu Control
Key Notes ASP.NET Menu Control till Version 3.5
rendered as TABLE, TR, TD New Addition of “Rendering Mode”
properties Three Type of Render
Default List Table
![Page 18: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/18.jpg)
Enhancement in List view controlKey Notes Enhancement for layouts rendering ASP.NET 3.5 needs a place holder
inside LayoutTemplate ASP.NET 4.0 Listview doesn’t need
any LayoutTemplate
AbhijitJana.net & AbhishekSur.com
![Page 19: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/19.jpg)
DEMOServer Control Enhancement
![Page 20: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/20.jpg)
QUICK RECAPServer Control Enhancement
![Page 21: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/21.jpg)
QUESTIONS & ANSWERSServer Control Enhancement
![Page 22: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/22.jpg)
Search Engine Optimization
Meta DescriptionWeb Form RoutingPermanent Redirection
![Page 23: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/23.jpg)
Meta Description
Key Notes Search Engine looks for Meta tag of our
web page to get the details of page contents
Two New Properties for Page Class– MetaDescription – MetaKeywords
These can be defined from both code behind and from aspx page
Makes it easier to work with these than defining with HtmlMeta.
![Page 24: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/24.jpg)
Permanent Redirection
Key Notes Removes the problem of Temporary
redirection (302) using Response.Redirect and ensures Search engine updates its database about this redirection using Response.RedirectParmanent(301).
As the round trips will be minimized due to ParmanentRedirection, Page rank can be increased in Search Engines.
![Page 25: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/25.jpg)
Web Form Routing
Key Notes ASP.NET MVC 2 introduces Routing features
in .NET Framework 3.5 SP1. Route Module is been added to
System.Web.dll so it is available readily to any application.
ASP.NET 4.0 already implemented of IRouteHandler called PageRouteHandler, so we do not need to implement the same.
You need to register routes in global.asax or any custom module. Once you register, the routing will be available instantly.
RouteData is available from any page to access RouteTable.
Response.RedirectToRoute allows to use Route redirection from one page to another by calling either routeName of routeValues.
Support for Expression to generate RouteUrl
![Page 26: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/26.jpg)
DEMOSearch Engine Optimization
![Page 27: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/27.jpg)
QUICK RECAPSearch Engine Optimization
![Page 28: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/28.jpg)
QUESTIONS & ANSWERSSearch Engine Optimization
![Page 29: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/29.jpg)
State Management Improvement
Compression Enabled SessionBetter Control in View StateExtensibility in Output Caching
![Page 30: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/30.jpg)
Compression Enabled Session
Key Notes Session Mode
– In Process– Out Process
compressionEnabled attributes for Session State
compress / Decompress the session data during serialization / deserialzation of session data
System.IO.Compression.GZStream
![Page 31: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/31.jpg)
Better Control in View State
Key Notes “EnableViewState” Properties for both
Page Level and Server Control Page Level view state control treat as
highest priorities. ASP.NET 4.0 Introduced ViewStateMode
– Enabled – Disabled– Inherit
http://abhijitjana.net/2010/05/16/viewstate-control-in-asp-net-4-0/
![Page 32: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/32.jpg)
Output Cache ProviderOutput Cache Provider
Extensibility in Output Caching
Key Notes Till ASP.NET 3.5 System.Web.dll assembly
for caching ASP.NET 4.0 introduced
System.Runtime.Caching.dll assembly for caching
Supports Custom Cache Implementation In memory Cache Implementation
System.Runtime.Caching.MemoryCache
Both object caching and ASP.NET output caching will be pluggable
Using Sytem.Cache namespaces
Disk basedDisk
based
In-memor
y
In-memor
yAzureAzure
![Page 33: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/33.jpg)
DEMOState Management Improvement
![Page 34: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/34.jpg)
QUICK RECAPState Management Improvement
![Page 35: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/35.jpg)
QUESTIONS & ANSWERSState Management Improvement
![Page 36: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/36.jpg)
Deployment
Smaller Web.configWeb.config TransformationPerformance MonitoringAuto Start ApplicationIncrease URL LengthWeb Packaging & Publishing
![Page 37: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/37.jpg)
Smaller Web.config
Key Notes Grown considerably over time as ASP.NET
adds up features from 2.0. In 4.0 major portion of Web.config is
moved to machine.config and all the applications automatically inherits them.
Which means smaller web.config just shown in the figure.
![Page 38: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/38.jpg)
Performance Monitoring
Key Notes Performance monitoring of a single
application running under one worker process is difficult.
ASP.NET 4.0 allows you to configure ResourceMonitoring enabled from aspnet.config (Not web.config).
Managed Processor time and Managed Memory used can be checked from application performance option.
![Page 39: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/39.jpg)
Auto Start Application
Key Notes Huge load of initialization weak up asp.net
application for first web call. IIS 7.5 introduces Application warm up
module to ensure your application always keep running.
You can use applicationhost.config to configure your IIS worker process to keep warm up module in action
You can have managed hooks to the system to write your custom code during initialization using IProcessHostPreloadClient interface which will be called automatically before any HTTP request is processed.
![Page 40: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/40.jpg)
Web.config Transformation
Key Notes Separate Web.config files for Debug,
release, staging etc. Xdt:Transform and xdt:Locator lets you to
match certain portion of your config and allow automatic transformation of web.config.
Locator can be specified using XPath, Match, Condition allow you to find in config easily.
Transform includes Replace, Insert, InsertBefore, InsertAfter, Remove, RemoveAll etc.
![Page 41: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/41.jpg)
Increases URL length
Key Notes Previous static length of url to 260 characters (based on
NTFS file path limit) can be configured from application. You can change the maximum size of URL using
HttpRuntime configuration. requestPathInvalidChars lets you to prevent characters
in URL. Support for URL in different browsers:
1. 2083 characters for IE with less than 2048 characters in path portion of the url.
2. More than 100,000 characters are supported for Firefox but address bar can only display upto 65,536 characters. 3. 80,000 for Safari. 4. 190,000 characters for Opera
Still it is not recommended to use more than 2000 characters in URL
![Page 42: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/42.jpg)
WebPackaging & Publishing
Key Notes VS 2010 allows you to publish your application with a
single click. MSDeploy Publising, FTP, File System, FrontPage Server
Extensions. Packaging allows you to package your web application
into a compressed archive, which you later may use to deploy the application.
Allows you to deploy Files, Settings, Configuration, GAC, etc.
Sql Server deployment allows you to include SQL Scripts with your package.
![Page 43: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/43.jpg)
DEMODeployment
![Page 44: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/44.jpg)
QUICK RECAPDeployment
![Page 45: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/45.jpg)
QUESTIONS & ANSWERSDeployment
![Page 46: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/46.jpg)
Client Side Improvement
Control over Client IDHTML Encoded Code ExpressionCSS Improvements
AbhijitJana.net & AbhishekSur.com
![Page 47: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/47.jpg)
Control over Client ID
Key Notes All Server side control rendered as HTML
Control and need a ID to identify. This ID used to be auto generated New property introduced “ClientIDMode” Control.ClientIdMode
– AutoID– Static– Predictable– Inherit
![Page 48: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/48.jpg)
HTML Encoded Code ExpressionKey Notes Till ASP.NET 3.5 we have used <
%=expression%>
– Causes XSS ASP.NET 4 introduces the following new
syntax for code expressions.
– <%: expression %> – <%=
HttpUtility.HtmlEncode(expression) %>
<%: expression %> <%: expression %>
<%= HttpUtility.HtmlEncode(expression) %> <%= HttpUtility.HtmlEncode(expression) %>
![Page 49: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/49.jpg)
CSS Improvements
Key Notes VS 2010 has been updated to improve CSS
2.1 Standards. ASP.NET 4 has been to help render HTML
that is compliant with the latest HTML standards
Use of controlRenderingCompatibilityVersion
Default set to 4.0 for ASP.NET 4.0 applications
We can use 3.5 to support legacy markup
![Page 50: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/50.jpg)
DEMOClient Side Improvements
![Page 51: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/51.jpg)
QUICK RECAPClient Side Improvements
![Page 52: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/52.jpg)
QUESTIONS & ANSWERSClient Side Improvements
![Page 53: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/53.jpg)
Overview of Dynamic Data
Creates UI automatically that reacts on data.
Pages are created dynamically based on Data configured for the web site.
Linked pages holds relationship between data.
Support for both Linq to Sql and ADO.NET Data Entities.
![Page 54: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/54.jpg)
Open Discussion
AbhijitJana.net & AbhishekSur.com
![Page 55: ASP.NET 4.0 Demo](https://reader033.vdocument.in/reader033/viewer/2022052505/554ebdaeb4c905064d8b46e3/html5/thumbnails/55.jpg)
THANK YOU !
ASP.NET 4.0 Presenter : Abhijit Jana (http://abhijitjana.net)
Abhishek Sur ( http://abhisheksur.com)