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" />
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" }
};
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