20
ASPNET ADVANCE TOPICS Injazat TDG

Asp Net Advance Topics

Embed Size (px)

Citation preview

Page 1: Asp Net Advance Topics

ASPNET ADVANCE TOPICS

Injazat TDG

Page 2: Asp Net Advance Topics

Contents

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

Page 3: Asp Net Advance Topics

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

Page 4: Asp Net Advance Topics

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

Page 5: Asp Net Advance Topics

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.

Page 6: Asp Net Advance Topics

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" %>

Page 7: Asp Net Advance Topics

Understanding Differences in:

Dates Numbers and Currencies Sorting Searching Time Zones

Page 8: Asp Net Advance Topics

ASP.NET 3.5 Resource Files

Local Resources Global Resource

Page 9: Asp Net Advance Topics

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

Page 10: Asp Net Advance Topics

ASP.Net 3.5 Providers

Page 11: Asp Net Advance Topics

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

Page 12: Asp Net Advance Topics

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……..

Page 13: Asp Net Advance Topics

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)

Page 14: Asp Net Advance Topics

Implement Role provider

Lets Try it……..

Page 15: Asp Net Advance Topics

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/

Page 16: Asp Net Advance Topics

Implement Profile provider

Lets Try it……..

Page 17: Asp Net Advance Topics

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

Page 18: Asp Net Advance Topics

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.

Page 19: Asp Net Advance Topics

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

Page 20: Asp Net Advance Topics

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/