SlideShare a Scribd company logo
Erkan BALABAN
What’s new at a glance?
 Metakeyword & Metadescription
 ViewState
 ClientID
 Routing
 ListView, Formview, CheckBoxList, RadioButtonList
 Chart Control
 Web.config, Browser capabilities, Menu
 Extensible Output Caching
MetaKeyword & MetaDescription
protected void Page_Load(object sender, EventArgs e) {
Page.MetaDescription = "ASP.NET 4'ün yeni özellikleri";
Page.MetaKeywords = "ASP.NET 4";
}
<%@ Page Language="C#" AutoEventWireup="true"
MetaKeywords="ASP.NET 4" MetaDescription="ASP.NET
4'ün yeni özellikleri" CodeBehind="MetaKeyword.aspx.cs"
Inherits="ASPNET4.MetaKeyword" %>
MetaKeyword &MetaDescription
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> </title>
<meta name="description" content="ASP.NET 4’ün yeni
özellikleri" />
<meta name="keywords" content="ASP.NET 4" />
</head>
<body>
(Page Description overrides)
ViewState improvements
 ASP.NET 3.x
 EnableViewState (true, false)
 Page level, server level
 ASP.NET 4
 ViewStateMode
 Enabled
 Disabled
 Inherit (Default)
ViewState improvements
<%@ Page Language="C#" AutoEventWireup="true"
CodeBehind="ViewState.aspx.cs"
ViewStateMode="Disabled"
Inherits="ASPNET4.ViewState" %>
.....
<asp:Label ID="Label1" runat="server“
ViewStateMode="Enabled"
Text="Label"></asp:Label>
ViewState improvements
Code behind :
Label1.ViewStateMode = ViewStateMode.Disabled;
NOTE : If we disabled the viewstate through
EnableViewState property, setting any values for
ViewStateMode property will make no impact.
ClientID
ASP.NET 3.x and earlier versions
<input
name="ctl00$ContentPlaceHolder1$TextBox2"
type="text"
id="ctl00_ContentPlaceHolder1_TextBox2" />
ClientID
 ClientIDMode
 AutoID (Default, old name is Legacy)
 Inherit
 Predictable
 Static
ClientID (Demo)
public class Oyunlar
{
public string Isim { get; set; }
public string Sirket { get; set; }
}
List<Oyunlar> oyunListesi = new List<Oyunlar>
{
new Oyunlar { Isim = "Hitman", Sirket = "IO Interactive" },
new Oyunlar { Isim = "Crysis", Sirket = "Crytek Studios" },
new Oyunlar { Isim = "Assassin's Creed", Sirket = "Gingerbread Studios" },
new Oyunlar{ Isim = "Call of Duty", Sirket = "N-Space" }
};
ClientID (Demo)
<asp:GridView ID="GridView1" runat="server" ClientIDMode="AutoID"
AutoGenerateColumns="false">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:Label runat="server" ID="Label1" Text='<%# Bind("Isim") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Label runat="server" ID="Label2" Text='<%# Bind("Sirket") %>' />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
ClientIDMode="AutoID"
<span id="GridView1_ctl02_Label1“>Hitman</span>
<span id="GridView1_ctl02_Label2“>IO Interactive</span>
<span id="GridView1_ctl03_Label1">Crysis</span>
<span id="GridView1_ctl03_Label2">Crytek Studios</span>
<span id="GridView1_ctl04_Label1">Assassin's Creed</span>
<span id="GridView1_ctl04_Label2">Gingerbread Studios</span>
ClientIDMode="Inherit"
<span id="GridView2_Label3_0">Hitman</span>
<span id="GridView2_Label4_0">IO Interactive</span>
<span id="GridView2_Label3_1">Crysis</span>
<span id="GridView2_Label4_1">Crytek Studios</span>
<span id="GridView2_Label3_2">Assassin's Creed</span>
<span id="GridView2_Label4_2">Gingerbread Studios</span>
ClientIDMode="Predictable"
ClientIDRowSuffix="Isim”
<span id="GridView3_Label5_Hitman">Hitman</span>
<span id="GridView3_Label6_Hitman">IO Interactive</span>
<span id="GridView3_Label5_Crysis">Crysis</span>
<span id="GridView3_Label6_Crysis">Crytek Studios</span>
<span id="GridView3_Label5_Assassin's Creed">Assassin's Creed</span>
<span id="GridView3_Label6_Assassin's Creed">Gingerbread
Studios</span>
ClientIDMode="Static"
<span id="Label7">Hitman</span>
<span id="Label8">IO Interactive</span>
<span id="Label7">Crysis</span>
<span id="Label8">Crytek Studios</span>
ClientIDMode (Control Level)
<asp:GridView
ID="GridView1"
runat="server"
ClientIDMode="AutoID"
AutoGenerateColumns="false">
</asp:GridView>
ClientIDMode (Page Level)
<%@ Page Language="C#"
AutoEventWireup="true"
ClientIDMode="Predictable"
CodeBehind="ClientID2.aspx.cs"
Inherits="ASPNET4.ClientID2" %>
ClientIDMode (Application Level)
<system.web>
<pages clientIdMode="Predictable"></pages>
</system.web>
Routing
 ASP.NET MCV
 System.Web.Routing;
 http://www.mysite.com/products/software
 http://www.mysite.com/
products.aspx?category=software
Routing
void Application_Start(object sender, EventArgs e)
{
RouteTable.Routes.Add("Product",
new Route("Products/{category}",
new PageRouteHandler("~/Products.aspx")));
}
Routing
RouteParameter
<asp:SqlDataSource ID="SqlDataSource1" runat="server">
<SelectParameters>
<asp:RouteParameter Name="Category" RouteKey="category" />
</SelectParameters>
</asp:SqlDataSource>
Runat=“server”
 Is it dead?
 Code snippet
 Textbox + tab
 Label + tab
List View Control Enhancement
 Come with ASP.NET 3.5
 Does not require a layout template
 Has all the functionality of the GridView control
 Gives you complete control over the output
 <asp:ListView ID="ListView1" runat="server">
<ItemTemplate>
<% Eval(“Isim")%>
</ItemTemplate>
</asp:ListView>
Form View Control Enhancement
 .NET 3.x and earlier versions notation
<asp:FormView ID="FormView1" runat="server">
<ItemTemplate>ASP.NET 4</ItemTemplate>
</asp:FormView>
 At browser
<table cellspacing="0" border="0" id="FormView1"
style="border-collapse:collapse;">
<tr>
<td colspan="2"> ASP.NET 4</td>
</tr>
</table>
Form View Control Enhancement
New player : RenderOuterTable
<asp:FormView ID="FormView2" runat="server"
RenderOuterTable="false">
<ItemTemplate>ASP.NET 4</ItemTemplate>
</asp:FormView>
ASP.NET 4
CheckBoxList & RadioButtonList
 ASP.NET 3.x and earlier
 RepeatLayout
 Flow
 Table
 ASP.NET 4
 RepeatLayout
 Flow
 Table
 OrderedList
 UnorderedList
ChartControl
 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.
ChartControl
ChartControl
ChartControl
ChartControl
ChartControl
Web.config File Minification
 New .NET Framework bigger web.config
 Tell Visiual Studio which framework version targeting
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation targetFramework="4.0" />
</system.web>
</configuration>
 Major config elements moved to machine.config
Browser Capabilities
 HttpBrowserCapabilities
 Now supports for
 Google Chrome
 Research in Motion BlackBerry,
 Apple iPhone.
 Using for detect supporting Javascript version or page
requested by a mobile device.
Persisting Row Selection
in Data Controls
 Gridview and ListView
 EnablePersistedSelection
 <asp:GridView id="GridView2" runat="server"
EnablePersistedSelection="true"></asp:GridView>
Disabling Controls
 controlRenderingCompatibilityVersion
 Set to 4.0
 <span id="Label1" class="aspNetDisabled">Test</span>
 <asp:Label id="Label" runat="server" Text="Test"
Enabled="false">
 Set to 3.5
 <span id="Label1" disabled="disabled">Test</span>
Menu Control Improvements
Runders as unordered list
<div id="Menu1">
<ul>
<li><a href="#" onclick="...">Home</a></li>
<li><a href="#" onclick="...">About</a></li>
</ul>
</div>
Extensible Output Caching
 Enables you to configure one or more custom output-cache
providers
 Output-cache providers can use any storage mechanism to
persist HTML content including local or remote disks, cloud
storage, and distributed cache engines
 Output-cache providers can use any storage mechanism to
persist HTML content
 System.Web.Caching.OutputCacheProvider
Extensible Output Caching
<caching>
<outputCache defaultProvider="AspNetInternalProvider">
<providers>
<add name="DiskCache"
type="Test.OutputCacheEx.DiskOutputCacheProvider,
DiskCacheProvider"/>
</providers>
</outputCache>
</caching>
<%@ OutputCache Duration="60" VaryByParam="None“
providerName="DiskCache" %>
Extensible Output Caching
Global.asax :
public override string GetOutputCacheProviderName
(HttpContext context)
{
if (context.Request.Path.EndsWith("Advanced.aspx"))
return "DiskCache";
else
return
base.GetOutputCacheProviderName(context);
}
Permanently Redirecting a Page
 Response.Redirect : HTTP 302 (Temporary Redirect)
 RedirectPermanent : HTTP 301 (Permenant Redirect)
 RedirectPermanent("/newpath/foroldcontent.aspx");
 Search engines and other user agents that recognize
permanent redirects
Extensible Request Validation
 Cross-site scripting (XSS) attacks
 We can use custom request-validation logic
 <httpRuntime requestValidationType="Samples.MyValidator,
Samples" />
public class CustomRequestValidation : RequestValidator
{
protected override bool IsValidRequestString(
HttpContext context, string value,
RequestValidationSource requestValidationSource,
string collectionKey,
out int validationFailureIndex)
{...}
}
Contact :
erkan@erkanbalaban.com.tr

More Related Content

What's hot

Token Authentication in ASP.NET Core
Token Authentication in ASP.NET CoreToken Authentication in ASP.NET Core
Token Authentication in ASP.NET Core
Stormpath
 
JWT Authentication with AngularJS
JWT Authentication with AngularJSJWT Authentication with AngularJS
JWT Authentication with AngularJS
robertjd
 
Securing REST APIs
Securing REST APIsSecuring REST APIs
Securing REST APIs
Claire Hunsaker
 
What the Heck is OAuth and OpenID Connect - RWX 2017
What the Heck is OAuth and OpenID Connect - RWX 2017What the Heck is OAuth and OpenID Connect - RWX 2017
What the Heck is OAuth and OpenID Connect - RWX 2017
Matt Raible
 
Top Ten Web Application Defenses v12
Top Ten Web Application Defenses v12Top Ten Web Application Defenses v12
Top Ten Web Application Defenses v12
Jim Manico
 
Owasp top 10 2013
Owasp top 10 2013Owasp top 10 2013
Owasp top 10 2013
Edouard de Lansalut
 
RSA Europe 2013 OWASP Training
RSA Europe 2013 OWASP TrainingRSA Europe 2013 OWASP Training
RSA Europe 2013 OWASP Training
Jim Manico
 
Stateless authentication for microservices - GR8Conf 2015
Stateless authentication for microservices - GR8Conf 2015Stateless authentication for microservices - GR8Conf 2015
Stateless authentication for microservices - GR8Conf 2015
Alvaro Sanchez-Mariscal
 
2013 OWASP Top 10
2013 OWASP Top 102013 OWASP Top 10
2013 OWASP Top 10
bilcorry
 
An Introduction to OAuth2
An Introduction to OAuth2An Introduction to OAuth2
An Introduction to OAuth2
Aaron Parecki
 
Securing Web Applications with Token Authentication
Securing Web Applications with Token AuthenticationSecuring Web Applications with Token Authentication
Securing Web Applications with Token Authentication
Stormpath
 
ApacheCon 2014: Infinite Session Clustering with Apache Shiro & Cassandra
ApacheCon 2014: Infinite Session Clustering with Apache Shiro & CassandraApacheCon 2014: Infinite Session Clustering with Apache Shiro & Cassandra
ApacheCon 2014: Infinite Session Clustering with Apache Shiro & Cassandra
DataStax Academy
 
Top 10 Web Security Vulnerabilities
Top 10 Web Security VulnerabilitiesTop 10 Web Security Vulnerabilities
Top 10 Web Security Vulnerabilities
Carol McDonald
 
Smart Lock for Password @ Game DevFest Bangkok 2015
Smart Lock for Password @ Game DevFest Bangkok 2015Smart Lock for Password @ Game DevFest Bangkok 2015
Smart Lock for Password @ Game DevFest Bangkok 2015
Somkiat Khitwongwattana
 
Rest API Security
Rest API SecurityRest API Security
Rest API Security
Stormpath
 
Oauth 2.0 security
Oauth 2.0 securityOauth 2.0 security
Oauth 2.0 security
vinoth kumar
 
Node.js Authentication and Data Security
Node.js Authentication and Data SecurityNode.js Authentication and Data Security
Node.js Authentication and Data Security
Tim Messerschmidt
 
Spring4 security
Spring4 securitySpring4 security
Spring4 security
Sang Shin
 
Intro to Apache Shiro
Intro to Apache ShiroIntro to Apache Shiro
Intro to Apache Shiro
Claire Hunsaker
 
OAuth2 and Spring Security
OAuth2 and Spring SecurityOAuth2 and Spring Security
OAuth2 and Spring Security
Orest Ivasiv
 

What's hot (20)

Token Authentication in ASP.NET Core
Token Authentication in ASP.NET CoreToken Authentication in ASP.NET Core
Token Authentication in ASP.NET Core
 
JWT Authentication with AngularJS
JWT Authentication with AngularJSJWT Authentication with AngularJS
JWT Authentication with AngularJS
 
Securing REST APIs
Securing REST APIsSecuring REST APIs
Securing REST APIs
 
What the Heck is OAuth and OpenID Connect - RWX 2017
What the Heck is OAuth and OpenID Connect - RWX 2017What the Heck is OAuth and OpenID Connect - RWX 2017
What the Heck is OAuth and OpenID Connect - RWX 2017
 
Top Ten Web Application Defenses v12
Top Ten Web Application Defenses v12Top Ten Web Application Defenses v12
Top Ten Web Application Defenses v12
 
Owasp top 10 2013
Owasp top 10 2013Owasp top 10 2013
Owasp top 10 2013
 
RSA Europe 2013 OWASP Training
RSA Europe 2013 OWASP TrainingRSA Europe 2013 OWASP Training
RSA Europe 2013 OWASP Training
 
Stateless authentication for microservices - GR8Conf 2015
Stateless authentication for microservices - GR8Conf 2015Stateless authentication for microservices - GR8Conf 2015
Stateless authentication for microservices - GR8Conf 2015
 
2013 OWASP Top 10
2013 OWASP Top 102013 OWASP Top 10
2013 OWASP Top 10
 
An Introduction to OAuth2
An Introduction to OAuth2An Introduction to OAuth2
An Introduction to OAuth2
 
Securing Web Applications with Token Authentication
Securing Web Applications with Token AuthenticationSecuring Web Applications with Token Authentication
Securing Web Applications with Token Authentication
 
ApacheCon 2014: Infinite Session Clustering with Apache Shiro & Cassandra
ApacheCon 2014: Infinite Session Clustering with Apache Shiro & CassandraApacheCon 2014: Infinite Session Clustering with Apache Shiro & Cassandra
ApacheCon 2014: Infinite Session Clustering with Apache Shiro & Cassandra
 
Top 10 Web Security Vulnerabilities
Top 10 Web Security VulnerabilitiesTop 10 Web Security Vulnerabilities
Top 10 Web Security Vulnerabilities
 
Smart Lock for Password @ Game DevFest Bangkok 2015
Smart Lock for Password @ Game DevFest Bangkok 2015Smart Lock for Password @ Game DevFest Bangkok 2015
Smart Lock for Password @ Game DevFest Bangkok 2015
 
Rest API Security
Rest API SecurityRest API Security
Rest API Security
 
Oauth 2.0 security
Oauth 2.0 securityOauth 2.0 security
Oauth 2.0 security
 
Node.js Authentication and Data Security
Node.js Authentication and Data SecurityNode.js Authentication and Data Security
Node.js Authentication and Data Security
 
Spring4 security
Spring4 securitySpring4 security
Spring4 security
 
Intro to Apache Shiro
Intro to Apache ShiroIntro to Apache Shiro
Intro to Apache Shiro
 
OAuth2 and Spring Security
OAuth2 and Spring SecurityOAuth2 and Spring Security
OAuth2 and Spring Security
 

Similar to Aspnet 4 new features

ASP.NET Overview - Alvin Lau
ASP.NET Overview - Alvin LauASP.NET Overview - Alvin Lau
ASP.NET Overview - Alvin LauSpiffy
 
TechDays 2013 Jari Kallonen: What's New WebForms 4.5
TechDays 2013 Jari Kallonen: What's New WebForms 4.5TechDays 2013 Jari Kallonen: What's New WebForms 4.5
TechDays 2013 Jari Kallonen: What's New WebForms 4.5Tieturi Oy
 
Whats new in ASP.NET 4.0
Whats new in ASP.NET 4.0Whats new in ASP.NET 4.0
Whats new in ASP.NET 4.0
py_sunil
 
PrimeTime JSF with PrimeFaces - Dec 2014
PrimeTime JSF with PrimeFaces - Dec 2014PrimeTime JSF with PrimeFaces - Dec 2014
PrimeTime JSF with PrimeFaces - Dec 2014
cagataycivici
 
Developing your first application using FIWARE
Developing your first application using FIWAREDeveloping your first application using FIWARE
Developing your first application using FIWAREFIWARE
 
SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015
Pushkar Chivate
 
Integrating Wicket with Java EE 6
Integrating Wicket with Java EE 6Integrating Wicket with Java EE 6
Integrating Wicket with Java EE 6
Michael Plöd
 
AnkaraJUG Kasım 2012 - PrimeFaces
AnkaraJUG Kasım 2012 - PrimeFacesAnkaraJUG Kasım 2012 - PrimeFaces
AnkaraJUG Kasım 2012 - PrimeFaces
Ankara JUG
 
การเข ยนโปรแกรมต ดต_อฐานข_อม_ล
การเข ยนโปรแกรมต ดต_อฐานข_อม_ลการเข ยนโปรแกรมต ดต_อฐานข_อม_ล
การเข ยนโปรแกรมต ดต_อฐานข_อม_ลBongza Naruk
 
Solving anything in VCL
Solving anything in VCLSolving anything in VCL
Solving anything in VCL
Fastly
 
Asp.Net Ajax Component Development
Asp.Net Ajax Component DevelopmentAsp.Net Ajax Component Development
Asp.Net Ajax Component DevelopmentChui-Wen Chiu
 
Rich Portlet Development in uPortal
Rich Portlet Development in uPortalRich Portlet Development in uPortal
Rich Portlet Development in uPortal
Jennifer Bourey
 
E2 appspresso hands on lab
E2 appspresso hands on labE2 appspresso hands on lab
E2 appspresso hands on labNAVER D2
 
E3 appspresso hands on lab
E3 appspresso hands on labE3 appspresso hands on lab
E3 appspresso hands on labNAVER D2
 
Hdv309 - Real World Sandboxed Solutions
Hdv309 - Real World Sandboxed SolutionsHdv309 - Real World Sandboxed Solutions
Hdv309 - Real World Sandboxed Solutionswoutervugt
 
Workshop: Building Vaadin add-ons
Workshop: Building Vaadin add-onsWorkshop: Building Vaadin add-ons
Workshop: Building Vaadin add-ons
Sami Ekblad
 
Implementation of GUI Framework part3
Implementation of GUI Framework part3Implementation of GUI Framework part3
Implementation of GUI Framework part3
masahiroookubo
 
前端概述
前端概述前端概述
前端概述
Ethan Zhang
 

Similar to Aspnet 4 new features (20)

ASP.NET Overview - Alvin Lau
ASP.NET Overview - Alvin LauASP.NET Overview - Alvin Lau
ASP.NET Overview - Alvin Lau
 
TechDays 2013 Jari Kallonen: What's New WebForms 4.5
TechDays 2013 Jari Kallonen: What's New WebForms 4.5TechDays 2013 Jari Kallonen: What's New WebForms 4.5
TechDays 2013 Jari Kallonen: What's New WebForms 4.5
 
70562 (1)
70562 (1)70562 (1)
70562 (1)
 
Whats new in ASP.NET 4.0
Whats new in ASP.NET 4.0Whats new in ASP.NET 4.0
Whats new in ASP.NET 4.0
 
PrimeTime JSF with PrimeFaces - Dec 2014
PrimeTime JSF with PrimeFaces - Dec 2014PrimeTime JSF with PrimeFaces - Dec 2014
PrimeTime JSF with PrimeFaces - Dec 2014
 
Developing your first application using FIWARE
Developing your first application using FIWAREDeveloping your first application using FIWARE
Developing your first application using FIWARE
 
SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015SharePoint Saturday Atlanta 2015
SharePoint Saturday Atlanta 2015
 
Integrating Wicket with Java EE 6
Integrating Wicket with Java EE 6Integrating Wicket with Java EE 6
Integrating Wicket with Java EE 6
 
AnkaraJUG Kasım 2012 - PrimeFaces
AnkaraJUG Kasım 2012 - PrimeFacesAnkaraJUG Kasım 2012 - PrimeFaces
AnkaraJUG Kasım 2012 - PrimeFaces
 
การเข ยนโปรแกรมต ดต_อฐานข_อม_ล
การเข ยนโปรแกรมต ดต_อฐานข_อม_ลการเข ยนโปรแกรมต ดต_อฐานข_อม_ล
การเข ยนโปรแกรมต ดต_อฐานข_อม_ล
 
Solving anything in VCL
Solving anything in VCLSolving anything in VCL
Solving anything in VCL
 
Asp.Net Ajax Component Development
Asp.Net Ajax Component DevelopmentAsp.Net Ajax Component Development
Asp.Net Ajax Component Development
 
Rich Portlet Development in uPortal
Rich Portlet Development in uPortalRich Portlet Development in uPortal
Rich Portlet Development in uPortal
 
E2 appspresso hands on lab
E2 appspresso hands on labE2 appspresso hands on lab
E2 appspresso hands on lab
 
E3 appspresso hands on lab
E3 appspresso hands on labE3 appspresso hands on lab
E3 appspresso hands on lab
 
Biwug
BiwugBiwug
Biwug
 
Hdv309 - Real World Sandboxed Solutions
Hdv309 - Real World Sandboxed SolutionsHdv309 - Real World Sandboxed Solutions
Hdv309 - Real World Sandboxed Solutions
 
Workshop: Building Vaadin add-ons
Workshop: Building Vaadin add-onsWorkshop: Building Vaadin add-ons
Workshop: Building Vaadin add-ons
 
Implementation of GUI Framework part3
Implementation of GUI Framework part3Implementation of GUI Framework part3
Implementation of GUI Framework part3
 
前端概述
前端概述前端概述
前端概述
 

Recently uploaded

Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
CatarinaPereira64715
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 

Recently uploaded (20)

Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 

Aspnet 4 new features

  • 2. What’s new at a glance?  Metakeyword & Metadescription  ViewState  ClientID  Routing  ListView, Formview, CheckBoxList, RadioButtonList  Chart Control  Web.config, Browser capabilities, Menu  Extensible Output Caching
  • 3. MetaKeyword & MetaDescription protected void Page_Load(object sender, EventArgs e) { Page.MetaDescription = "ASP.NET 4'ün yeni özellikleri"; Page.MetaKeywords = "ASP.NET 4"; } <%@ Page Language="C#" AutoEventWireup="true" MetaKeywords="ASP.NET 4" MetaDescription="ASP.NET 4'ün yeni özellikleri" CodeBehind="MetaKeyword.aspx.cs" Inherits="ASPNET4.MetaKeyword" %>
  • 4. MetaKeyword &MetaDescription <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title> </title> <meta name="description" content="ASP.NET 4’ün yeni özellikleri" /> <meta name="keywords" content="ASP.NET 4" /> </head> <body> (Page Description overrides)
  • 5. ViewState improvements  ASP.NET 3.x  EnableViewState (true, false)  Page level, server level  ASP.NET 4  ViewStateMode  Enabled  Disabled  Inherit (Default)
  • 6. ViewState improvements <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ViewState.aspx.cs" ViewStateMode="Disabled" Inherits="ASPNET4.ViewState" %> ..... <asp:Label ID="Label1" runat="server“ ViewStateMode="Enabled" Text="Label"></asp:Label>
  • 7. ViewState improvements Code behind : Label1.ViewStateMode = ViewStateMode.Disabled; NOTE : If we disabled the viewstate through EnableViewState property, setting any values for ViewStateMode property will make no impact.
  • 8. ClientID ASP.NET 3.x and earlier versions <input name="ctl00$ContentPlaceHolder1$TextBox2" type="text" id="ctl00_ContentPlaceHolder1_TextBox2" />
  • 9. ClientID  ClientIDMode  AutoID (Default, old name is Legacy)  Inherit  Predictable  Static
  • 10. ClientID (Demo) public class Oyunlar { public string Isim { get; set; } public string Sirket { get; set; } } List<Oyunlar> oyunListesi = new List<Oyunlar> { new Oyunlar { Isim = "Hitman", Sirket = "IO Interactive" }, new Oyunlar { Isim = "Crysis", Sirket = "Crytek Studios" }, new Oyunlar { Isim = "Assassin's Creed", Sirket = "Gingerbread Studios" }, new Oyunlar{ Isim = "Call of Duty", Sirket = "N-Space" } };
  • 11. ClientID (Demo) <asp:GridView ID="GridView1" runat="server" ClientIDMode="AutoID" AutoGenerateColumns="false"> <Columns> <asp:TemplateField> <ItemTemplate> <asp:Label runat="server" ID="Label1" Text='<%# Bind("Isim") %>' /> </ItemTemplate> </asp:TemplateField> <asp:TemplateField> <ItemTemplate> <asp:Label runat="server" ID="Label2" Text='<%# Bind("Sirket") %>' /> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView>
  • 12. ClientIDMode="AutoID" <span id="GridView1_ctl02_Label1“>Hitman</span> <span id="GridView1_ctl02_Label2“>IO Interactive</span> <span id="GridView1_ctl03_Label1">Crysis</span> <span id="GridView1_ctl03_Label2">Crytek Studios</span> <span id="GridView1_ctl04_Label1">Assassin's Creed</span> <span id="GridView1_ctl04_Label2">Gingerbread Studios</span>
  • 13. ClientIDMode="Inherit" <span id="GridView2_Label3_0">Hitman</span> <span id="GridView2_Label4_0">IO Interactive</span> <span id="GridView2_Label3_1">Crysis</span> <span id="GridView2_Label4_1">Crytek Studios</span> <span id="GridView2_Label3_2">Assassin's Creed</span> <span id="GridView2_Label4_2">Gingerbread Studios</span>
  • 14. ClientIDMode="Predictable" ClientIDRowSuffix="Isim” <span id="GridView3_Label5_Hitman">Hitman</span> <span id="GridView3_Label6_Hitman">IO Interactive</span> <span id="GridView3_Label5_Crysis">Crysis</span> <span id="GridView3_Label6_Crysis">Crytek Studios</span> <span id="GridView3_Label5_Assassin's Creed">Assassin's Creed</span> <span id="GridView3_Label6_Assassin's Creed">Gingerbread Studios</span>
  • 15. ClientIDMode="Static" <span id="Label7">Hitman</span> <span id="Label8">IO Interactive</span> <span id="Label7">Crysis</span> <span id="Label8">Crytek Studios</span>
  • 17. ClientIDMode (Page Level) <%@ Page Language="C#" AutoEventWireup="true" ClientIDMode="Predictable" CodeBehind="ClientID2.aspx.cs" Inherits="ASPNET4.ClientID2" %>
  • 18. ClientIDMode (Application Level) <system.web> <pages clientIdMode="Predictable"></pages> </system.web>
  • 19. Routing  ASP.NET MCV  System.Web.Routing;  http://www.mysite.com/products/software  http://www.mysite.com/ products.aspx?category=software
  • 20. Routing void Application_Start(object sender, EventArgs e) { RouteTable.Routes.Add("Product", new Route("Products/{category}", new PageRouteHandler("~/Products.aspx"))); }
  • 21. Routing RouteParameter <asp:SqlDataSource ID="SqlDataSource1" runat="server"> <SelectParameters> <asp:RouteParameter Name="Category" RouteKey="category" /> </SelectParameters> </asp:SqlDataSource>
  • 22. Runat=“server”  Is it dead?  Code snippet  Textbox + tab  Label + tab
  • 23. List View Control Enhancement  Come with ASP.NET 3.5  Does not require a layout template  Has all the functionality of the GridView control  Gives you complete control over the output  <asp:ListView ID="ListView1" runat="server"> <ItemTemplate> <% Eval(“Isim")%> </ItemTemplate> </asp:ListView>
  • 24. Form View Control Enhancement  .NET 3.x and earlier versions notation <asp:FormView ID="FormView1" runat="server"> <ItemTemplate>ASP.NET 4</ItemTemplate> </asp:FormView>  At browser <table cellspacing="0" border="0" id="FormView1" style="border-collapse:collapse;"> <tr> <td colspan="2"> ASP.NET 4</td> </tr> </table>
  • 25. Form View Control Enhancement New player : RenderOuterTable <asp:FormView ID="FormView2" runat="server" RenderOuterTable="false"> <ItemTemplate>ASP.NET 4</ItemTemplate> </asp:FormView> ASP.NET 4
  • 26. CheckBoxList & RadioButtonList  ASP.NET 3.x and earlier  RepeatLayout  Flow  Table  ASP.NET 4  RepeatLayout  Flow  Table  OrderedList  UnorderedList
  • 27. ChartControl  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. Web.config File Minification  New .NET Framework bigger web.config  Tell Visiual Studio which framework version targeting <?xml version="1.0"?> <configuration> <system.web> <compilation targetFramework="4.0" /> </system.web> </configuration>  Major config elements moved to machine.config
  • 34. Browser Capabilities  HttpBrowserCapabilities  Now supports for  Google Chrome  Research in Motion BlackBerry,  Apple iPhone.  Using for detect supporting Javascript version or page requested by a mobile device.
  • 35. Persisting Row Selection in Data Controls  Gridview and ListView  EnablePersistedSelection  <asp:GridView id="GridView2" runat="server" EnablePersistedSelection="true"></asp:GridView>
  • 36. Disabling Controls  controlRenderingCompatibilityVersion  Set to 4.0  <span id="Label1" class="aspNetDisabled">Test</span>  <asp:Label id="Label" runat="server" Text="Test" Enabled="false">  Set to 3.5  <span id="Label1" disabled="disabled">Test</span>
  • 37. Menu Control Improvements Runders as unordered list <div id="Menu1"> <ul> <li><a href="#" onclick="...">Home</a></li> <li><a href="#" onclick="...">About</a></li> </ul> </div>
  • 38. Extensible Output Caching  Enables you to configure one or more custom output-cache providers  Output-cache providers can use any storage mechanism to persist HTML content including local or remote disks, cloud storage, and distributed cache engines  Output-cache providers can use any storage mechanism to persist HTML content  System.Web.Caching.OutputCacheProvider
  • 39. Extensible Output Caching <caching> <outputCache defaultProvider="AspNetInternalProvider"> <providers> <add name="DiskCache" type="Test.OutputCacheEx.DiskOutputCacheProvider, DiskCacheProvider"/> </providers> </outputCache> </caching> <%@ OutputCache Duration="60" VaryByParam="None“ providerName="DiskCache" %>
  • 40. Extensible Output Caching Global.asax : public override string GetOutputCacheProviderName (HttpContext context) { if (context.Request.Path.EndsWith("Advanced.aspx")) return "DiskCache"; else return base.GetOutputCacheProviderName(context); }
  • 41. Permanently Redirecting a Page  Response.Redirect : HTTP 302 (Temporary Redirect)  RedirectPermanent : HTTP 301 (Permenant Redirect)  RedirectPermanent("/newpath/foroldcontent.aspx");  Search engines and other user agents that recognize permanent redirects
  • 42. Extensible Request Validation  Cross-site scripting (XSS) attacks  We can use custom request-validation logic  <httpRuntime requestValidationType="Samples.MyValidator, Samples" /> public class CustomRequestValidation : RequestValidator { protected override bool IsValidRequestString( HttpContext context, string value, RequestValidationSource requestValidationSource, string collectionKey, out int validationFailureIndex) {...} }