Asp Net Advance Topics

Preview:

Citation preview

ASPNET ADVANCE TOPICS

Injazat TDG

Contents

Web Site & Web Project Localization ASP.Net 3.5 Providers Validation Server Controls User Controls Ajax & Ajax tool kit Caching Compact frame LINQ

Localization

Cultures and Regions NET runs under a culture setting defined

by the server. The .NET Framework defines cultures

and regions using the Request for Comments 1766

Description Culture Code

English language; United States en-US

English language; United Kingdom (Great Britain) en-GB

English language; Australia en-AU

English language; Canada en-CA

Arabic (UAE) ar-AE

Language-Region

Region neutral culture specific culture this Web page is

executed on a thread from the thread pool.

The thread has a culture associated with it.

To change the culture

System.Threading.Thread.CurrentThread.CurrentCulture = New CultureInfo(“ar-AE")

By configuration files<globalization requestEncoding="utf-8" responseEncoding="utf-8" fileEncoding=""

culture="" uiCulture="" enableClientBasedCulture="false"

responseHeaderEncoding="utf-8" resourceProviderFactoryType=""

enableBestFitResponseEncoding="false" />

By page directive<%@ Page Language="VB" UICulture="auto" Culture="auto" %>

Understanding Differences in:

Dates Numbers and Currencies Sorting Searching Time Zones

ASP.NET 3.5 Resource Files

Local Resources Global Resource

ASP.Net 3.5 Providers A provider is an object that allows for programmatic

access to data stores, processes, and more.

• Membership• Role management• Personalization• Web parts personalization• Site navigation• Health monitoring Web events• Configuration file protection

Note: et up the database using the aspnet_regsql.exe for SQL Store if needed

ASP.Net 3.5 Providers

Membership Providers

System.Web.Security.SqlMembershipProvider

Provides you with the capability to use the membership system to connect to Microsoft’s SQL Server 2000/2005/SQL Server Express Edition.

System.Web.Security.ActiveDirectoryMembershipProvider

Provides you with the capability to use the membership system to connect to Microsoft’s Active Directory.

Note: Both of these membership provider classes inherit from the Membership Provider base class

Implement Membership provider

1. Create a web project

2. Setup providers Database (if needed)

3. Add connection string to SQL /A.D.

4. Add membership configuration

5. Add needed controls and use the classes

Lets Try it……..

Role Providers System.Web.Security.SqlRoleProvider

Provides you with the capability to use the ASP.NET role management system to connect to Microsoft’s SQL Server.

System.Web.Security.WindowsTokenRoleProvider

Provides you with the capability to connect the ASP.NET role management system to the built-in Windows security group system. (Read only)

System.Web.Security.AuthorizationStoreRoleProvider

Provides you with the capability to connect the ASP.NET role management system to either an XML file, Active Directory, or in an Active Directory Application Mode (ADAM) store. (Read only)

Implement Role provider

Lets Try it……..

Profile (Personalization) Providers System.Web.Profile.SqlProfileProvider Provides you

with the capability to use the ASP.NET personalization system to connect to Microsoft’s SQL Server (Store data as XML data)

ASP.NET 2.0 SQL Table Profile :SqlStoredProcedureProfileProviderProvides you with the capability to use the ASP.NET personalization system to connect to Microsoft’s SQL Server and store information in a Custom Profile Table to use with your queries.

http://www.asp.net/downloads/sandbox/table-profile-provider-samples/

Implement Profile provider

Lets Try it……..

Web Parts

Web Parts are objects in the Portal Framework which the end user can open, close, minimize, maximize, or move from one part of the page to another

Web Parts Modes Normal Mode: Puts the page in a normal state, which means that the end user

cannot edit or move sections of the page. This is the mode used for standard page viewing.

Edit Mode: Enables end users to select particular sections on the page for editing. The selected section allows all types of editing capabilities from changing the part’s title, the part’s color, or even setting custom properties— such as allowing the end user to specify his zip code to pull up a customized weather report.

Design Mode: Enables end users to rearrange the order of the page’s modular components. The end user can bring items higher or lower within a zone, delete items from a zone, or move items from one page zone to another.

Catalog Mode: Displays a list of available sections (Web Parts) that can be placed in the page. Catalog mode also allows the end user to select in which zone on the page the items should appear.

Implement Web Parts Add Web Part Manager Add Web Part Zones

Add Controls to each zone

Allowing the User to Change the Mode of the PageAdd drop dropdown list for the modes

Add catalog ZonePageCatalogPart

Add Edit ZoneAdd Appearance Editor PartAdd Layout Editor PartAdd Behavior Editor PartAdd Property Grid Editor Part

References TDG Books

Professional ASP.NET 3.5 SP1 Edition In C# and VB.pdf Web Ref:

○ ASP.NET 2.0 SQL Table Profile http://www.asp.net/downloads/sandbox/table-profile-provider-samples/

Recommended