tag:blogger.com,1999:blog-63108104946450866892024-02-19T00:12:05.396-08:00TechnowalletIn search of Hidden EntitiesAnonymoushttp://www.blogger.com/profile/12208411882007072995noreply@blogger.comBlogger69125tag:blogger.com,1999:blog-6310810494645086689.post-43001476897254822252018-01-30T01:11:00.000-08:002018-01-30T01:11:01.379-08:00User Control Viewer<div dir="ltr" style="text-align: left;" trbidi="on">
using System;<br />
using System.ComponentModel;<br />
using System.Web;<br />
using System.Web.UI;<br />
using System.Web.UI.WebControls;<br />
using System.Web.UI.WebControls.WebParts;<br />
using Microsoft.SharePoint;<br />
using Microsoft.SharePoint.WebControls;<br />
<br />
namespace UserControlViewer<br />
{<br />
[ToolboxItemAttribute(false)]<br />
public class UserControlViewer : Microsoft.SharePoint.WebPartPages.WebPart<br />
{<br />
private Control _childControl = null;<br />
private string _userControlVirtualPath = "/_controltemplates/Sample.ascx";<br />
private string _errMessage = string.Empty;<br />
<br />
[Personalizable(), Category("User Control Path"), DefaultValue(""),<br />
WebBrowsable(true),WebDescription("User Control Virtual Path"),<br />
WebDisplayName("User Control Virtual Path")]<br />
public string UserControlVirtualPath<br />
{<br />
get { return _userControlVirtualPath; }<br />
set { _userControlVirtualPath = value; }<br />
}<br />
<br />
public UserControlViewer()<br />
{<br />
<br />
}<br />
<br />
protected override void CreateChildControls()<br />
{<br />
base.CreateChildControls();<br />
if (_userControlVirtualPath != string.Empty)<br />
{<br />
if (_childControl != null) return;<br />
_childControl = Page.LoadControl(_userControlVirtualPath);<br />
if (_childControl != null)<br />
Controls.AddAt(0, _childControl);<br />
}<br />
}<br />
<br />
protected override void RenderWebPart(HtmlTextWriter output)<br />
{<br />
if (_errMessage != string.Empty) output.Write(_errMessage);<br />
if (_userControlVirtualPath != string.Empty ||<br />
_userControlVirtualPath.Equals("") == false)<br />
RenderChildren(output);<br />
}<br />
<br />
protected override void RenderChildren(HtmlTextWriter output)<br />
{<br />
try<br />
{<br />
this.EnsureChildControls();<br />
if (this._childControl != null)<br />
this._childControl.RenderControl(output);<br />
}<br />
catch (Exception ex)<br />
{<br />
_errMessage = string.Format(<br />
"Exception Message (RenderWebPart) = {0}<br />
", ex.Message);<br />
}<br />
}<br />
<br />
public override void Dispose()<br />
{<br />
<br />
}<br />
<br />
}<br />
}<br />
<div>
<br /></div>
</div>
Anonymoushttp://www.blogger.com/profile/12208411882007072995noreply@blogger.com0tag:blogger.com,1999:blog-6310810494645086689.post-89341536472832552092015-06-03T00:40:00.000-07:002015-06-03T00:40:21.538-07:00SharePoint Site Template Builder Helper<div dir="ltr" style="text-align: left;" trbidi="on">
using System;<br />
using System.Collections.Generic;<br />
using System.Linq;<br />
using System.Text;<br />
using Microsoft.SharePoint;<br />
using Microsoft.SharePoint.WebPartPages;<br />
using Microsoft.SharePoint.Publishing;<br />
using System.Web.UI.WebControls.WebParts;<br />
<br />
namespace SPHelper<br />
{<br />
class Helper<br />
{<br />
public static void AddLibrary(SPWeb web, string libraryname, string description, string docTemplateName, string listTemplateName)<br />
{<br />
web.AllowUnsafeUpdates = true;<br />
<br />
SPDocTemplateCollection docColl = web.DocTemplates;<br />
SPDocTemplate WebpartPagetemplate = null;<br />
<br />
SPListTemplateCollection tem = web.ListTemplates;<br />
SPListTemplate lstTemplate = null;<br />
<br />
foreach (SPDocTemplate doctemplate in docColl)<br />
{<br />
if (doctemplate.Name.Equals(docTemplateName))<br />
{<br />
WebpartPagetemplate = doctemplate;<br />
}<br />
}<br />
<br />
foreach (SPListTemplate template in tem)<br />
{<br />
if (template.Name.Equals(listTemplateName))<br />
{<br />
lstTemplate = template;<br />
}<br />
}<br />
<br />
web.Lists.Add(libraryname, description, lstTemplate, WebpartPagetemplate);<br />
web.Update();<br />
}<br />
<br />
public static void AddPage(SPWeb web, string pagename,string pagelayoutname)<br />
{<br />
PageLayout currPageLayout = null;<br />
web.AllowUnsafeUpdates = true;<br />
PublishingWeb publishingWeb = PublishingWeb.GetPublishingWeb(web);<br />
string pageName = pagename;<br />
PageLayout[] pageLayouts = publishingWeb.GetAvailablePageLayouts();<br />
foreach (PageLayout pagelayout in pageLayouts)<br />
{<br />
if (pagelayout.Name.Equals(pagelayoutname))<br />
{<br />
currPageLayout = pagelayout;<br />
}<br />
}<br />
PublishingPageCollection pages = publishingWeb.GetPublishingPages();<br />
PublishingPage newPage = pages.Add(pageName, currPageLayout);<br />
newPage.ListItem[FieldId.PublishingPageContent] = string.Empty;<br />
newPage.ListItem.Update();<br />
newPage.Update();<br />
newPage.CheckIn(string.Empty);<br />
}<br />
<br />
public static void AddWebPartToPage(SPWeb web, string pageurl, string ucpath, string wptitle, string zoneid, int zoneIndex)<br />
{<br />
using (SPLimitedWebPartManager wpManager = web.GetLimitedWebPartManager(pageurl, PersonalizationScope.Shared))<br />
{<br />
UserControlViewer.UserControlViewer webpart = new UserControlViewer.UserControlViewer();<br />
webpart.UserControlVirtualPath = ucpath;<br />
webpart.ZoneID = zoneid;<br />
webpart.Title = wptitle;<br />
wpManager.AddWebPart(webpart, zoneid, zoneIndex);<br />
}<br />
}<br />
<br />
public const string doctemplatename = "Web Part page";<br />
public const string listtemplatename = "Document Library";<br />
public const string pagelayout = "BlankWebPartPage.aspx";<br />
<br />
//Helper.AddLibrary(properties.Web, "Default", "Annonymouns Access files are available in this Library",Helper.doctemplatename,Helper.listtemplatename);<br />
//Helper.AddPage(properties.Web, "EURegister.aspx", Helper.pagelayout);<br />
//Helper.AddPage(properties.Web, "PeopleAwards.aspx", Helper.pagelayout);<br />
//Helper.AddPage(properties.Web, "NPOAwards.aspx", Helper.pagelayout);<br />
//Helper.AddPage(properties.Web, "RCIAwards.aspx", Helper.pagelayout);<br />
<br />
}<br />
}<br />
<div>
<br /></div>
</div>
Anonymoushttp://www.blogger.com/profile/12208411882007072995noreply@blogger.com0tag:blogger.com,1999:blog-6310810494645086689.post-52255581211204572232013-03-16T08:53:00.002-07:002014-07-07T05:34:00.340-07:00SharePoint 2010 - Web Application Management<br />
<div align="center" class="MsoNormal" style="text-align: center;">
</div>
<div align="center" class="MsoNormal">
</div>
<div align="center" class="MsoNormal">
</div>
<div align="center" class="MsoNormal">
<b>SharePoint Training – Web Application
Management.<o:p></o:p></b></div>
<div class="MsoNormal">
<b>Introduction</b>:<o:p></o:p></div>
<div class="MsoNormal" style="text-align: justify;">
SharePoint
2010 Central Administration Provides the Interface to Create Web Applications,
Site Collections and to manage them. In this Article we’ll look at a brief on
how to create and manage Web Applications and Site Collections in SharePoint
Server Using Central Administration.<o:p></o:p></div>
<div class="MsoNormal" style="text-align: justify;">
Terms:<o:p></o:p></div>
<ul style="margin-top: 0in;" type="disc">
<li class="MsoNormal" style="text-align: justify;"><b>Web Application</b>: Web Application is a top level
site in SharePoint Server hosted in IIS. Web Application behaves as a
container for the Site Collections and Other Sub Sites. In other words Web
Application hosts the Site Collections and sub sites in the SharePoint. <b>SPWebApplication</b> object represents
a Web Application in SharePoint.<o:p></o:p></li>
<li class="MsoNormal" style="text-align: justify;"><b>Site Collection</b>: A site collection is a grouping
of websites under a common top-level site that have the same owner and
share administration settings, for example, permissions. When you create a
site collection, a top-level site is automatically created in the site
collection.<o:p></o:p></li>
<li class="MsoNormal" style="text-align: justify;"><b>Sub Site: </b>Sub Site is equivalent to a
general asp.net site under a given Site Collection.<b> </b>We can have ‘n’ number
of Sub Sites for a give Site Collection. In general <b>SPWeb </b>object represents the current site (which can be a
top-level site or a sub-site).<b><o:p></o:p></b></li>
</ul>
<div class="MsoNormal" style="text-align: justify;">
In this Article we’ll go through the
steps for creating a Web Application, Site Collection and a Sub Site
respectively.<o:p></o:p></div>
<div class="MsoNormal" style="text-align: justify;">
<b>Creating
a Web Application:<o:p></o:p></b></div>
<ol start="1" style="margin-top: 0in;" type="1">
<li class="MsoNormal" style="text-align: justify;">Go to Start
-> All Programs -> Microsoft SharePoint 2010 Products ->
SharePoint 2010 Central Administration.<o:p></o:p></li>
<li class="MsoNormal" style="text-align: justify;">By clicking
on SharePoint 2010 Central Administration. Central Administration Web Site
is opened in the browser as shown below.<o:p></o:p></li>
<li class="MsoNormal" style="text-align: justify;">The Central
Administration Web Site allows the management of the following settings
and services.<o:p></o:p></li>
<ol start="1" style="margin-top: 0in;" type="a">
<li class="MsoNormal" style="text-align: justify;">Application
Management.<o:p></o:p></li>
<li class="MsoNormal" style="text-align: justify;">System
Settings.<o:p></o:p></li>
<li class="MsoNormal" style="text-align: justify;">Monitoring<o:p></o:p></li>
<li class="MsoNormal" style="text-align: justify;">Backup and
Restore<o:p></o:p></li>
<li class="MsoNormal" style="text-align: justify;"> Security<o:p></o:p></li>
<li class="MsoNormal" style="text-align: justify;">Upgrade and
Monitoring<o:p></o:p></li>
<li class="MsoNormal" style="text-align: justify;">General
Application Settings<o:p></o:p></li>
<li class="MsoNormal" style="text-align: justify;">Configuration
Wizards. <o:p></o:p></li>
</ol>
<li class="MsoNormal" style="text-align: justify;">Application
management section of Central Administration allows us to create and
manage the Web Applications and Site Collections.<o:p></o:p></li>
<li class="MsoNormal" style="text-align: justify;">Under
Application Management Section of Central Administration, choose ‘Manage
Web Applications’.<o:p></o:p></li>
</ol>
<div class="MsoNormal" style="margin-left: 0.5in; text-align: justify;">
<!--[if gte vml 1]><v:shapetype id="_x0000_t75"
coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe"
filled="f" stroked="f">
<v:stroke joinstyle="miter"/>
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0"/>
<v:f eqn="sum @0 1 0"/>
<v:f eqn="sum 0 0 @1"/>
<v:f eqn="prod @2 1 2"/>
<v:f eqn="prod @3 21600 pixelWidth"/>
<v:f eqn="prod @3 21600 pixelHeight"/>
<v:f eqn="sum @0 0 1"/>
<v:f eqn="prod @6 1 2"/>
<v:f eqn="prod @7 21600 pixelWidth"/>
<v:f eqn="sum @8 21600 0"/>
<v:f eqn="prod @7 21600 pixelHeight"/>
<v:f eqn="sum @10 21600 0"/>
</v:formulas>
<v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/>
<o:lock v:ext="edit" aspectratio="t"/>
</v:shapetype><v:shape id="_x0000_i1026" type="#_x0000_t75" style='width:393pt;
height:178.5pt'>
<v:imagedata src="file:///C:\Users\SAICHA~1\AppData\Local\Temp\msohtmlclip1\01\clip_image001.png"
o:title=""/>
</v:shape><![endif]--><!--[if !vml]--><!--[endif]--><o:p></o:p></div>
<div class="MsoNormal" style="margin-left: 0.5in; text-align: justify;">
<br /></div>
<ol start="6" style="margin-top: 0in;" type="1">
<li class="MsoNormal" style="text-align: justify;">On the
Ribbon menu click on New Button which displays ‘Create New Web
Application’ Window.<o:p></o:p></li>
</ol>
<div class="MsoNormal" style="margin-left: 0.5in; text-align: justify;">
<!--[if gte vml 1]><v:shape id="_x0000_i1025"
type="#_x0000_t75" style='width:323.25pt;height:181.5pt'>
<v:imagedata src="file:///C:\Users\SAICHA~1\AppData\Local\Temp\msohtmlclip1\01\clip_image002.png"
o:title=""/>
</v:shape><![endif]--><!--[if !vml]--><!--[endif]--><o:p></o:p></div>
<ol start="7" style="margin-top: 0in;" type="1">
<li class="MsoNormal" style="text-align: justify;">Choose the
following options in the window:<o:p></o:p></li>
<ol start="1" style="margin-top: 0in;" type="a">
<li class="MsoNormal" style="text-align: justify;">Authentication-Mode:
Classic Mode for Windows Authentication <o:p></o:p></li>
</ol>
</ol>
<div class="MsoNormal" style="margin-left: 0.5in; text-align: justify;">
Claims Based for FBA Authentication.<o:p></o:p></div>
<ol start="7" style="margin-top: 0in;" type="1">
<ol start="2" style="margin-top: 0in;" type="a">
<li class="MsoNormal" style="text-align: justify;">IIS Web
Site: Create New/ Add to Existing ISS Web Site. Specify the port number.<o:p></o:p></li>
</ol>
<li class="MsoNormal" style="text-align: justify;">Security
Configuration: Choose - Negotiate (Kerberos).<o:p></o:p></li>
<li class="MsoNormal" style="text-align: justify;">And
similarly provide Application Pool and Database Name for the Web Application
to be created.<o:p></o:p></li>
</ol>
<div class="MsoNormal" style="text-align: justify;">
<b><!--[if gte vml 1]><v:shape
id="_x0000_i1027" type="#_x0000_t75" style='width:530.25pt;height:226.5pt'>
<v:imagedata src="file:///C:\Users\SAICHA~1\AppData\Local\Temp\msohtmlclip1\01\clip_image003.png"
o:title="step3"/>
</v:shape><![endif]--><!--[if !vml]--><!--[endif]--><o:p></o:p></b></div>
<ol start="10" style="margin-top: 0in;" type="1">
<li class="MsoNormal" style="text-align: justify;">Under *Service
Application Connections bind the required Service(s) for the Web
Application. <o:p></o:p></li>
</ol>
<div class="MsoNormal" style="margin-left: 0.5in; text-align: justify;">
<!--[if gte vml 1]><v:shape id="_x0000_i1028"
type="#_x0000_t75" style='width:332.25pt;height:248.25pt'>
<v:imagedata src="file:///C:\Users\SAICHA~1\AppData\Local\Temp\msohtmlclip1\01\clip_image005.png"
o:title="step4"/>
</v:shape><![endif]--><!--[if !vml]--><!--[endif]--><o:p></o:p></div>
<ol start="11" style="margin-top: 0in;" type="1">
<li class="MsoNormal" style="text-align: justify;">This
completes the creation the Web Application in SharePoint.<o:p></o:p></li>
</ol>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<b>Creating
a Site Collection:<o:p></o:p></b></div>
<ol start="1" style="margin-top: 0in;" type="1">
<li class="MsoNormal" style="text-align: justify;">Under
Application Management section of Central Administration, click on ‘Create
Site Collection’ option available in Site Collections section.<o:p></o:p></li>
<li class="MsoNormal" style="text-align: justify;">Provide the
following options in the opened window in order to create site collection.<o:p></o:p></li>
<ol start="1" style="margin-top: 0in;" type="a">
<li class="MsoNormal" style="text-align: justify;">Choose Web
Application:- Choose one Web Application from the available web
applications dropdown list.<o:p></o:p></li>
<li class="MsoNormal" style="text-align: justify;">Provide the
Title and Description for the Site Collection.<o:p></o:p></li>
<li class="MsoNormal" style="text-align: justify;">Provide the
Web Site Address.<o:p></o:p></li>
<li class="MsoNormal" style="text-align: justify;">Choose the
Template from the list of available templates in the provided tabbed
window.<o:p></o:p></li>
<li class="MsoNormal" style="text-align: justify;">Provide
Primary and Secondary Site Collection Administrator for the Site
Collection.<o:p></o:p></li>
<li class="MsoNormal" style="text-align: justify;">Choose the
**Quota Template if required.<o:p></o:p></li>
</ol>
<li class="MsoNormal" style="text-align: justify;">Repeat the
same steps in order to create other Site Collections under Same/Different
Web Application.<o:p></o:p></li>
<li class="MsoNormal" style="text-align: justify;">By now a Web
Application and Site Collection has been created. Now we can browse the
created Site Collection and we can create any number of Sub Sites in it.<o:p></o:p></li>
</ol>
<div class="MsoNormal" style="text-align: justify;">
<b>Creating
a Sub Site:<o:p></o:p></b></div>
<ol start="1" style="margin-top: 0in;" type="1">
<li class="MsoNormal" style="text-align: justify;">Browse
through the available Site Collection in SharePoint.<b><o:p></o:p></b></li>
<li class="MsoNormal" style="text-align: justify;">Click<b> </b>on the Site Actions Ribbon of the
SharePoint Site and from the dropdown list click on New Site option, which
displays the create window.<b><o:p></o:p></b></li>
<li class="MsoNormal" style="text-align: justify;">From the
available templates choose ‘Team Site’ template and provide the title and
description values. The more options button provides the option to have
same set of permission or new set of Permissions for the sub site.<b><o:p></o:p></b></li>
<li class="MsoNormal" style="text-align: justify;">The
Following options are available in the Create window of a site:<b><o:p></o:p></b></li>
<ol start="1" style="margin-top: 0in;" type="a">
<li class="MsoNormal" style="text-align: justify;">Title and
Description.<b><o:p></o:p></b></li>
<li class="MsoNormal" style="text-align: justify;">Web Site
Address. URL to navigate through the crated sub site.<b><o:p></o:p></b></li>
<li class="MsoNormal" style="text-align: justify;">Permissions.
<i>Use Unique Permissions</i> Option
provides to have new set of permissions for the created sub site. <i>Use
Same Permissions</i> options will inherit the Parent site permissions for
the sub site.<b><o:p></o:p></b></li>
<li class="MsoNormal" style="text-align: justify;">Navigation
Inheritance. Provides the navigation options. One can display the parent
navigation in current site or only current site navigation.<b><o:p></o:p></b></li>
</ol>
</ol>
<div class="MsoNormal" style="text-align: justify;">
* Service Application Connections:
SharePoint provides lot of services that provides most of the out of the box
features of SharePoint. More information on SharePoint Application Services is
available in the next article.<o:p></o:p></div>
<div class="MsoNormal" style="text-align: justify;">
** Quota Templates: SharePoint allows
the users to allot some kind of limitation on the usage of space for a
particular Web Application. This functionality is achieved by using ‘Quota
Templates’. More information on Quota templates is available in the article.<o:p></o:p></div>
<div class="MsoNormal" style="text-align: justify;">
Now coming back to Web Application
Management, as we have already created a Web Application, now we can go head
and manage the available Web Applications using Central Administration site.<o:p></o:p></div>
<div class="MsoNormal" style="text-align: justify;">
<b> </b>Under the Application Management click
on Manage web applications and then select a web application. Once the web
application is selected the options are enabled in the ribbon.<o:p></o:p></div>
<div class="MsoNormal" style="text-align: justify;">
The following are the options
available for the web application.<o:p></o:p></div>
<div class="MsoNormal" style="margin-left: 39pt; text-align: justify; text-indent: -0.25in;">
<!--[if !supportLists]-->a)<span style="font-size: 7pt;"> </span><!--[endif]-->General Settings<o:p></o:p></div>
<div class="MsoNormal" style="margin-left: 39pt; text-align: justify; text-indent: -0.25in;">
<!--[if !supportLists]-->b)<span style="font-size: 7pt;"> </span><!--[endif]-->Manage Features<o:p></o:p></div>
<div class="MsoNormal" style="margin-left: 39pt; text-align: justify; text-indent: -0.25in;">
<!--[if !supportLists]-->c)<span style="font-size: 7pt;"> </span><!--[endif]-->Manage Paths<o:p></o:p></div>
<div class="MsoNormal" style="margin-left: 39pt; text-align: justify; text-indent: -0.25in;">
<!--[if !supportLists]-->d)<span style="font-size: 7pt;"> </span><!--[endif]-->Service Connections<o:p></o:p></div>
<div class="MsoNormal" style="margin-left: 39pt; text-align: justify; text-indent: -0.25in;">
<!--[if !supportLists]-->e)<span style="font-size: 7pt;"> </span><!--[endif]-->Authentication Providers<o:p></o:p></div>
<div class="MsoNormal" style="margin-left: 39pt; text-align: justify; text-indent: -0.25in;">
<!--[if !supportLists]-->f)<span style="font-size: 7pt;"> </span><!--[endif]-->Self-Service Site Creation<o:p></o:p></div>
<div class="MsoNormal" style="margin-left: 39pt; text-align: justify; text-indent: -0.25in;">
<!--[if !supportLists]-->g)<span style="font-size: 7pt;"> </span><!--[endif]-->Blocked File Types.<o:p></o:p></div>
<div class="MsoNormal" style="margin-left: 39pt; text-align: justify; text-indent: -0.25in;">
<!--[if !supportLists]-->h)<span style="font-size: 7pt;"> </span><!--[endif]-->User Permissions.<o:p></o:p></div>
<div class="MsoNormal" style="margin-left: 39pt; text-align: justify; text-indent: -0.25in;">
<!--[if !supportLists]-->i)<span style="font-size: 7pt;">
</span><!--[endif]-->Web
part Security <o:p></o:p></div>
<div class="MsoNormal" style="margin-left: 39pt; text-align: justify; text-indent: -0.25in;">
<!--[if !supportLists]-->j)<span style="font-size: 7pt;">
</span><!--[endif]-->User
Policy, Anonymous Policy and Permission Policy.<o:p></o:p></div>
<div class="MsoNormal" style="text-align: justify;">
<b>General
Settings:<o:p></o:p></b></div>
<div class="MsoNormal" style="text-align: justify;">
The
General Setting tab has the following options:<o:p></o:p></div>
<div class="MsoNormal" style="margin-left: 22.5pt; text-align: justify; text-indent: 0in;">
<!--[if !supportLists]-->1.<span style="font-size: 7pt;"> </span><!--[endif]-->General Settings.<o:p></o:p></div>
<div class="MsoNormal" style="margin-left: 22.5pt; text-align: justify; text-indent: 0in;">
<!--[if !supportLists]-->2.<span style="font-size: 7pt;"> </span><!--[endif]-->Resource Throttling.<o:p></o:p></div>
<div class="MsoNormal" style="margin-left: 22.5pt; text-align: justify; text-indent: 0in;">
<!--[if !supportLists]-->3.<span style="font-size: 7pt;"> </span><!--[endif]-->Workflow.<o:p></o:p></div>
<div class="MsoNormal" style="margin-left: 22.5pt; text-align: justify; text-indent: 0in;">
<!--[if !supportLists]-->4.<span style="font-size: 7pt;"> </span><!--[endif]-->Outgoing E-Mail settings.<o:p></o:p></div>
<div class="MsoNormal" style="margin-left: 22.5pt; text-align: justify; text-indent: 0in;">
<!--[if !supportLists]-->5.<span style="font-size: 7pt;"> </span><!--[endif]-->Mobile Account.<o:p></o:p></div>
<div class="MsoNormal" style="margin-left: 22.5pt; text-align: justify; text-indent: 0in;">
<!--[if !supportLists]-->6.<span style="font-size: 7pt;"> </span><!--[endif]-->SharePoint Designer.<o:p></o:p></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<b>1.
General Settings: The following Screen Shots shows the available options in the
general settings.<o:p></o:p></b></div>
<div class="MsoNormal" style="text-align: justify;">
<b><!--[if gte vml 1]><v:shape
id="_x0000_i1029" type="#_x0000_t75" style='width:348pt;height:297.75pt'>
<v:imagedata src="file:///C:\Users\SAICHA~1\AppData\Local\Temp\msohtmlclip1\01\clip_image007.png"
o:title=""/>
</v:shape><![endif]--><!--[if !vml]--><!--[endif]--><o:p></o:p></b></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
The following window shows the blocked
file types where we can mention the file type extension which we can prevent
from uploading to the server.<o:p></o:p></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<br />
<br />
<br />
Anonymoushttp://www.blogger.com/profile/12208411882007072995noreply@blogger.com0tag:blogger.com,1999:blog-6310810494645086689.post-61131758383347396272013-01-31T02:56:00.000-08:002014-07-07T05:34:06.597-07:00direction service<br />
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><</span><span style="background: white; color: maroon; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">script</span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">type</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">="text/javascript"></span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">var</span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> map; </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">var</span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> drds = []; </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">var</span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> drdds = []; </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">var</span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> rqs = [];<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> window.onload = </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">function</span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> () {<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">var</span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> chicago = </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">new</span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> google.maps.LatLng(41.850033, -87.6500523);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">var</span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> mapOptions = {<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> zoom: 7,<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> mapTypeId:
google.maps.MapTypeId.ROADMAP,<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> center: chicago<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> map = </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">new</span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> google.maps.Map(document.getElementById(</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">'map_canvas'</span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;">),
mapOptions);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">var</span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> ltlgn = [</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">"Hyderabad"</span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;">, </span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">"Mumabai"</span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;">, </span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">"Pune"</span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;">, </span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">"Shirdi"</span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;">, </span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">"Bangalore"</span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;">];<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">for</span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> (</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">var</span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> i = 0; i < ltlgn.length; i++) {<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">var</span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> request = {<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> origin: ltlgn[i],<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> destination: ltlgn[i + 1],<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> travelMode:
google.maps.DirectionsTravelMode.DRIVING<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> };<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> rqs.push(request);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">for</span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> (</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">var</span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> i = 0; i < 3; i++) {<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">var</span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> directionsDisplay = directionsDisplay + i;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> directionsDisplay = </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">new</span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;">
google.maps.DirectionsRenderer();<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> directionsDisplay.setMap(map);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> drds.push(directionsDisplay);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">var</span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> directionsService = directionsService + i;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> directionsService = </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">new</span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;">
google.maps.DirectionsService();<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> drdds.push(directionsService);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> setTimeout(d(i), 2000)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">function</span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> d(i) {<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> drdds[i].route(rqs[i], </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">function</span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> (response, status)
{<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">if</span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> (status == google.maps.DirectionsStatus.OK) {<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;">
drds[i].setDirections(response);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> });<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"></</span><span style="background: white; color: maroon; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">script</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">></span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;"><</span><span style="background: white; color: maroon; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">div</span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: red; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">id</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">=""></</span><span style="background: white; color: maroon; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">div</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">></span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal">
<br /></div>
<br />
Anonymoushttp://www.blogger.com/profile/12208411882007072995noreply@blogger.com0tag:blogger.com,1999:blog-6310810494645086689.post-91763463655198293602012-07-12T07:50:00.000-07:002012-07-12T07:50:26.903-07:00What does my blog says about me?<div dir="ltr" style="text-align: left;" trbidi="on">
It' been really long time that i have posted something on my blogger. Recently i have come across some kind of interesting stuff across the web saying<br />
<h1 style="border-bottom-color: rgb(204, 204, 204); border-bottom-style: dotted; border-bottom-width: 1px; color: #333333; font-family: Arial, Tahoma, Verdana; font-size: 20px; font-weight: normal; line-height: 20px; margin: 0px 0px 10px; padding: 0px 0px 5px; text-align: -webkit-auto;">
What does my blog says about me?</h1>
<div>
After reading i have tried the same thing for my blog and i have found the following results which i am posting here...! and the link for the site is <a href="http://www.typealyzer.com/?lang=en" style="color: #008dcf; font-family: Arial, Tahoma, Verdana; font-size: 12px; line-height: 20px; outline: none; text-align: -webkit-auto;">http://www.typealyzer.com</a>.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZHhNsB_rahrCriFyGuHzX4wdk0DJ06wL5jeC0xmd7kSyNNmbCdEi4W_oGCXlCIU4fo604kZRc-X8XYZfyFDwzl8fKfyw0-q7CPG4FbLnbiZXS7TFTj2wEZvqLyFxn05EdePNL13yVgSpC/s1600/untitled.bmp" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZHhNsB_rahrCriFyGuHzX4wdk0DJ06wL5jeC0xmd7kSyNNmbCdEi4W_oGCXlCIU4fo604kZRc-X8XYZfyFDwzl8fKfyw0-q7CPG4FbLnbiZXS7TFTj2wEZvqLyFxn05EdePNL13yVgSpC/s1600/untitled.bmp" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoqCyCIfwZNiZWzzxPweigPCqip4FJJUcHWceHSLOSAqrtPMT8X_Vrmuu6duCEfRduUVtZwnmuuBRUM3xi5xpxhIO9BU2m7ZdKCqkpQ3zdyehB1RA4NKVZSbnBVhZKxdkjyYfsK17M_in0/s1600/untitled2.bmp" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoqCyCIfwZNiZWzzxPweigPCqip4FJJUcHWceHSLOSAqrtPMT8X_Vrmuu6duCEfRduUVtZwnmuuBRUM3xi5xpxhIO9BU2m7ZdKCqkpQ3zdyehB1RA4NKVZSbnBVhZKxdkjyYfsK17M_in0/s1600/untitled2.bmp" /></a></div>
<div>
<br /></div>
</div>Anonymoushttp://www.blogger.com/profile/12208411882007072995noreply@blogger.com0tag:blogger.com,1999:blog-6310810494645086689.post-30009595231904560912012-05-10T08:16:00.001-07:002012-05-10T08:18:44.505-07:00Javascript Tabs<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
The following Code is used to develop a Simple Tabbed Navigation Using Javascript:<br />
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><br /></span><br />
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"> var</span><span style="font-family: Consolas; font-size: 9.5pt;"> tabs = [<span style="color: maroon;">"tab1"</span>,
<span style="color: maroon;">"tab2"</span>, <span style="color: maroon;">"tab3"</span>];</span><br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">function</span> showtab(e) {<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">for</span> (<span style="color: blue;">var</span> i = 0; i
< 3; i++) {<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;">
hide(tabs[i]);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">for</span> (<span style="color: blue;">var</span> i = 0; i
< 3; i++) {<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;">
<span style="color: blue;">if</span> (e == i) {<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;">
toggle(tabs[e]);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;">
}<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }</span><br />
<a name='more'></a><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"> function</span><span style="font-family: Consolas; font-size: 9.5pt;"> toggle(e) {<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">var</span> x = document.getElementById(e);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">if</span> (x.style.display == <span style="color: maroon;">"none"</span>)
{<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;">
x.style.display = <span style="color: maroon;">"block"</span>;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">else</span> {<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> x.style.display = <span style="color: maroon;">"none"</span>;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"> function</span><span style="font-family: Consolas; font-size: 9.5pt;"> hide(e) {<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">var</span> x = document.getElementById(e);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;">
x.style.display = <span style="color: maroon;">"none"</span>;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
</div>
The HTML Code is as shown below:
<br />
<br />
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"> <</span><span style="color: maroon; font-family: Consolas; font-size: 9.5pt;">div</span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;">></span><span style="font-family: Consolas; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;"><</span><span style="color: maroon;">a</span> <span style="color: red;">href</span> <span style="color: blue;">="#"</span> <span style="color: red;">onclick</span> <span style="color: blue;">="showtab(0)"></span>Tab1<span style="color: blue;"><span style="color: maroon;">a</span><span style="color: blue;">></span><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;"><</span><span style="color: maroon;">a</span> <span style="color: red;">href</span> <span style="color: blue;">="#"</span> <span style="color: red;">onclick</span> <span style="color: blue;">="showtab(1)"></span>Tab2<span style="color: blue;"><span style="color: maroon;">a</span><span style="color: blue;">></span><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;"><</span><span style="color: maroon;">a</span> <span style="color: red;">href</span> <span style="color: blue;">="#"</span> <span style="color: red;">onclick</span> <span style="color: blue;">="showtab(2)"></span>Tab3<span style="color: blue;"><span style="color: maroon;">a</span><span style="color: blue;">></span><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;"><span style="color: maroon;">div</span><span style="color: blue;">></span><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;"><</span><span style="color: maroon;">table</span><span style="color: blue;">></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;"><</span><span style="color: maroon;">tr</span><span style="color: blue;">></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;"><</span><span style="color: maroon;">td</span><span style="color: blue;">><</span><span style="color: maroon;">div</span> <span style="color: red;">id</span> <span style="color: blue;">="tab1"</span> <span style="color: red;">style</span> <span style="color: blue;">="</span><span style="color: red;">display</span><span style="color: blue;">:block"></span>hello
World this is div1.<span style="color: blue;"><span style="color: maroon;">div</span><span style="color: blue;">><span style="color: maroon;">td</span><span style="color: blue;">></span><o:p></o:p></span></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;"><</span><span style="color: maroon;">td</span><span style="color: blue;">><</span><span style="color: maroon;">div</span> <span style="color: red;">id</span> <span style="color: blue;">="tab2"</span> <span style="color: red;">style</span> <span style="color: blue;">="</span><span style="color: red;">display</span><span style="color: blue;">:none"></span>hello
World this is div2.<span style="color: blue;"><span style="color: maroon;">div</span><span style="color: blue;">><span style="color: maroon;">td</span><span style="color: blue;">></span><o:p></o:p></span></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;"><</span><span style="color: maroon;">td</span><span style="color: blue;">><</span><span style="color: maroon;">div</span> <span style="color: red;">id</span> <span style="color: blue;">="tab3"</span> <span style="color: red;">style</span> <span style="color: blue;">="</span><span style="color: red;">display</span><span style="color: blue;">:none"></span>hello
World this is div3.<span style="color: blue;"><span style="color: maroon;">div</span><span style="color: blue;">><span style="color: maroon;">td</span><span style="color: blue;">></span><o:p></o:p></span></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;"><span style="color: maroon;">tr</span><span style="color: blue;">></span><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;"><span style="color: maroon;">table</span><span style="color: blue;">><o:p></o:p></span></span></span></div>
<div class="MsoNormal">
<br /></div>
</div>Anonymoushttp://www.blogger.com/profile/12208411882007072995noreply@blogger.com2Hyderabad, Andhra Pradesh, India17.385044 78.48667117.142593 78.170814000000007 17.627495 78.802528tag:blogger.com,1999:blog-6310810494645086689.post-79892792696619719182012-05-10T08:10:00.002-07:002012-05-10T08:12:53.308-07:00Hide/Show a Div using Java Script<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: x-small;"><b><u>The following code is used to show/hide a div using JavaScript:</u></b></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">function</span><span style="font-family: Consolas; font-size: 9.5pt;"> toggle(e) {<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">var</span> x = document.getElementById(e);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">if</span> (x.style.display == <span style="color: maroon;">"none"</span>)
{<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;">
x.style.display = <span style="color: maroon;">"block"</span>;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">else</span> {<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;">
x.style.display = <span style="color: maroon;">"none"</span>;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;">}<o:p></o:p></span></div>
</div>Anonymoushttp://www.blogger.com/profile/12208411882007072995noreply@blogger.com0Hyderabad, Andhra Pradesh, India17.385044 78.48667117.142593 78.170814000000007 17.627495 78.802528tag:blogger.com,1999:blog-6310810494645086689.post-6973736497255752852012-04-25T08:35:00.001-07:002012-05-10T08:24:41.016-07:00Send Mail in asp.net using c#<div dir="ltr" style="text-align: left;" trbidi="on">
<u><b>Send Mail in asp.net using c#:</b></u><br />
<br />
The following code snippet is used to send an email in asp.net using c#. The code itself is self explanatory. The comments in the code help you to understand the code.<br />
<br />
<a name='more'></a><br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">protected</span><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">void</span>
btnmail_Click(<span style="color: blue;">object</span> sender, <span style="color: #2b91af;">EventArgs</span> e)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: green;">// System.Web.Mail.SmtpMail.SmtpServer is obsolete in 2.0</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: green;">// System.Net.Mail.SmtpClient is the alternate class for
this in 2.0</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: #2b91af;">SmtpClient</span> smtpClient = <span style="color: blue;">new</span>
<span style="color: #2b91af;">SmtpClient</span>();<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: #2b91af;">MailMessage</span> message = <span style="color: blue;">new</span>
<span style="color: #2b91af;">MailMessage</span>();<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">try</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: #2b91af;">MailAddress</span> fromAddress = <span style="color: blue;">new</span>
<span style="color: #2b91af;">MailAddress</span>(<span style="color: #a31515;">"someone@gmail.com"</span>,<span style="color: #a31515;">"username"</span>);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: green;">// You can specify the host name or ipaddress of your
server</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: green;">// Default in IIS will be localhost </span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;">
smtpClient.Host = <span style="color: #a31515;">"smtp.gmail.com"</span>;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: green;">//Default port will be 25</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;">
smtpClient.Port = 587;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: green;">//From address will be given as a MailAddress Object</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;">
message.From = fromAddress;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: #2b91af;">NetworkCredential</span> credential = <span style="color: blue;">new</span> <span style="color: #2b91af;">NetworkCredential</span>();<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;">
credential.UserName = <span style="color: #a31515;">"username"</span>;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> credential.Password = <span style="color: #a31515;">"password"</span>;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;">
smtpClient.Credentials = credential;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;">
smtpClient.EnableSsl = <span style="color: blue;">true</span>;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: green;">// To address collection of MailAddress</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;">
message.To.Add(txttomail.Text);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;">
message.Subject = Getdata();<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: green;">//Body can be Html or text format</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: green;">//Specify true if it
is html message</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;">
message.IsBodyHtml = <span style="color: blue;">true</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: green;">// Message body content</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;">
message.Body = txtsubject.Text;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: green;">// Send SMTP mail</span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;">
smtpClient.Send(message);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">catch</span> (<span style="color: #2b91af;">Exception</span>
ex)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
</div>Anonymoushttp://www.blogger.com/profile/12208411882007072995noreply@blogger.com1Hyderabad, Andhra Pradesh, India17.385044 78.48667117.142593 78.170814000000007 17.627495 78.802528tag:blogger.com,1999:blog-6310810494645086689.post-71093435167938400912012-03-22T08:12:00.000-07:002012-04-16T03:39:50.931-07:00Overview of Embedded Development<div dir="ltr" style="text-align: left;" trbidi="on">
<b><u>Micro Processor
and Micro Controller:</u></b><br />
<br />
<div class="MsoListParagraphCxSpFirst" style="margin-left: 0.25in; text-indent: -13.5pt;">
<b>1.<span style="font-family: 'Times New Roman'; font-size: 7pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></b><b>Getting Started</b></div>
<div class="MsoListParagraphCxSpMiddle">
What
do I need to know to get started with embedded development? Who should learn
Embedded Development? Why should I learn Embedded Programming? These are quite
simple and straight forward questions. Students, Professionals, hobbyists or
anyone can learn embedded programming and there is no restriction. If you have
an experience of high level programming, then u would be comfortable with the
embedded development and don’t worry if you don’t even written any kind of
computer program till date.</div>
<div class="MsoListParagraphCxSpMiddle">
<br />
<a name='more'></a><br /></div>
<div class="MsoListParagraphCxSpMiddle">
<b>What is an Embedded System?</b></div>
<div class="MsoListParagraphCxSpMiddle">
An
<b>embedded system</b> is a computer system designed for specific control
functions within a larger system, often with real-time computing constraints.
It is <i>embedded</i> as part of a complete device often including hardware and
mechanical parts. By contrast, a general-purpose computer, such as a personal
computer (PC), is designed to be flexible and to meet a wide range of end-user
needs. Embedded systems control many devices in common use today</div>
<div class="MsoListParagraphCxSpMiddle">
<br /></div>
<div class="MsoListParagraphCxSpMiddle">
<b>Applications
of Embedded Systems:</b></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1in; text-indent: -0.25in;">
<span style="font-family: Symbol;">·<span style="font-family: 'Times New Roman'; font-size: 7pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span>Industrial Automation Systems.</div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1in; text-indent: -0.25in;">
<span style="font-family: Symbol;">·<span style="font-family: 'Times New Roman'; font-size: 7pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span>Security Systems.</div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1in; text-indent: -0.25in;">
<span style="font-family: Symbol;">·<span style="font-family: 'Times New Roman'; font-size: 7pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span>Military and aerospace embedded software
applications.</div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1in; text-indent: -0.25in;">
<span style="font-family: Symbol;">·<span style="font-family: 'Times New Roman'; font-size: 7pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span>Medical electronics technology.</div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1in; text-indent: -0.25in;">
<span style="font-family: Symbol;">·<span style="font-family: 'Times New Roman'; font-size: 7pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span>Communications applications.</div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1in; text-indent: -0.25in;">
<span style="font-family: Symbol;">·<span style="font-family: 'Times New Roman'; font-size: 7pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span>Electronics applications and consumer devices.</div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1in; text-indent: -0.25in;">
<span style="font-family: Symbol;">·<span style="font-family: 'Times New Roman'; font-size: 7pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span>Industrial automation and process control
software.</div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1in;">
And
the list goes on……………………..</div>
<div class="MsoListParagraphCxSpMiddle">
<br /></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 0.25in; text-indent: -13.5pt;">
<b>2.<span style="font-family: 'Times New Roman'; font-size: 7pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></b><b>Languages and Tools</b></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 0.25in;">
<b> </b>The
basic core elements of developing an Embedded System include a compiler,
debugger and an assembler (as just like in any other development environment).
You need to have the following tools to get started with the development.</div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 0.25in;">
Languages: c, 8085/8086 assembly
language programming.</div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 0.25in;">
Emulator: Keil compiler or any other compiler/ emulator
which you feel comfortable with and a </div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 0.25in;">
Development Board: There are
wide ranges of development boards available in the market, you can choose one. Some of most popular boards
are shown here. </div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 0.25in;">
<b> </b></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 0.25in; text-indent: -13.5pt;">
<b>3.<span style="font-family: 'Times New Roman'; font-size: 7pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></b><b>Development Board’s.</b></div>
<div align="center" class="MsoListParagraphCxSpMiddle" style="margin-left: 0.25in; text-align: center;">
<b><i><span style="color: #4f81bd;">MCB900 Evaluation Board</span></i></b></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 0.25in;">
<b> </b></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUjAEj4ls4aTA6X3Rjt04hryrfavQwfYAH1C6fuW2IS3wS8dG4fQl2K_Qtd5VMzSlVGV8Usawpw0IxFA6ZPHAWkaXNTmc3WAuCtggGBgxjAzEzyCyFVYyjkcT4vnSCt00l2-Wwrx_OefGg/s1600/devlopmentborad1.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="210" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUjAEj4ls4aTA6X3Rjt04hryrfavQwfYAH1C6fuW2IS3wS8dG4fQl2K_Qtd5VMzSlVGV8Usawpw0IxFA6ZPHAWkaXNTmc3WAuCtggGBgxjAzEzyCyFVYyjkcT4vnSCt00l2-Wwrx_OefGg/s400/devlopmentborad1.bmp" width="400" /></a></div>
<div class="MsoListParagraphCxSpLast" style="margin-left: 0.25in;">
<br /></div>
<h4 align="center" style="text-align: center;">
M1AFS-EMBEDDED-KIT</h4>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis8w-fNBR9FieTaDuOH4F_yFPybf6tgzCMwOFu1y6e8jEX3BJf6axx111SXqs5BL4UTpKwAqqP2RbT-rzaZ9iOpVkVvV6EmfmGJDu_FG6HcWO-BYAWW8qZbbWlLgkFR2EWrZIWvkBQ0ABL/s1600/devlopmentborad2.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="287" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis8w-fNBR9FieTaDuOH4F_yFPybf6tgzCMwOFu1y6e8jEX3BJf6axx111SXqs5BL4UTpKwAqqP2RbT-rzaZ9iOpVkVvV6EmfmGJDu_FG6HcWO-BYAWW8qZbbWlLgkFR2EWrZIWvkBQ0ABL/s400/devlopmentborad2.bmp" width="400" /></a></div>
<div class="MsoListParagraphCxSpFirst" style="margin-left: 0.25in;">
<b> </b></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 0.25in;">
</div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 0.25in;">
</div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 0.25in;">
<br /></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 0.25in; text-indent: -13.5pt;">
<b>4.<span style="font-family: 'Times New Roman'; font-size: 7pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></b><b>Online Resources</b></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 0.25in;">
The following sites provide
you with the required documentation, programming model and instruction set
details.</div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 0.75in; text-indent: -0.25in;">
<span style="font-family: Symbol;">·<span style="font-family: 'Times New Roman'; font-size: 7pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span><a href="http://www.atmel.com/products/microcontrollers/8051architecture/default.aspx">http://www.atmel.com/products/microcontrollers/8051architecture/default.aspx</a></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 0.75in; text-indent: -0.25in;">
<span style="font-family: Symbol;">·<span style="font-family: 'Times New Roman'; font-size: 7pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span><a href="http://www.intel.com/intelpress/">http://www.intel.com/intelpress/</a></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 0.75in; text-indent: -0.25in;">
<span class="MsoHyperlink"><span style="color: windowtext; font-family: Symbol; text-decoration: none;">·<span style="font-family: 'Times New Roman'; font-size: 7pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span></span><a href="http://www.cavehill.uwi.edu/fpas/cmp/online/el21c/micro.html">http://www.cavehill.uwi.edu/fpas/cmp/online/el21c/micro.html</a><span class="MsoHyperlink"><span style="color: windowtext; text-decoration: none;"></span></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 0.75in;">
<br /></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 0.25in; text-indent: -13.5pt;">
<b>5.<span style="font-family: 'Times New Roman'; font-size: 7pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></b><b>Discussion Forums</b></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 0.25in;">
<b> </b><a href="http://forums.devshed.com/embedded-programming-163/"><b>http://forums.devshed.com/embedded-programming-163/</b></a><span class="MsoHyperlink"></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 0.25in;">
<br /></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 0.25in; text-indent: -13.5pt;">
<b>6.<span style="font-family: 'Times New Roman'; font-size: 7pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></b><b>EBooks</b></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: medium none; margin-left: 0.25in;">
<tbody>
<tr>
<td style="border: 1pt solid windowtext; padding: 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div align="center" class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin: 0in 0in 0.0001pt; text-align: center;">
</div>
<div align="center" class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin: 0in 0in 0.0001pt; text-align: center;">
<b>Assembly Language Step-By-Step </b><i>by </i></div>
<div align="center" class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin: 0in 0in 0.0001pt; text-align: center;">
<b><i>Jeff
Duntemann</i></b></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQsvOwkQ7JOZOWtbo2PBrltcH2s9t9UZxXAUJKkfWLJdE94uuQ4OwZj9HrSsHBMQea_fvzfOfIDrVER1p8pyZagdr8VtKMAEn23PSQ6aZoy5hgRRN6OckfaCbVYyBG8NcW1NUQDdqilAvT/s1600/Ebook1.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQsvOwkQ7JOZOWtbo2PBrltcH2s9t9UZxXAUJKkfWLJdE94uuQ4OwZj9HrSsHBMQea_fvzfOfIDrVER1p8pyZagdr8VtKMAEn23PSQ6aZoy5hgRRN6OckfaCbVYyBG8NcW1NUQDdqilAvT/s1600/Ebook1.bmp" /></a></div>
<div align="center" class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin: 0in 0in 0.0001pt; text-align: center;">
<br /></div>
</td>
<td style="border-color: windowtext windowtext windowtext -moz-use-text-color; border-style: solid solid solid none; border-width: 1pt 1pt 1pt medium; padding: 0in 5.4pt; width: 239.4pt;" valign="top" width="319"><div align="center" class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin: 0in 0in 0.0001pt; text-align: center;">
<b></b></div>
<div align="center" class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin: 0in 0in 0.0001pt 0.25in; text-align: center;">
<b> Professional Assembly Language </b><i>by </i></div>
<div align="center" class="MsoListParagraphCxSpLast" style="line-height: normal; margin: 0in 0in 0.0001pt 0.25in; text-align: center;">
<b><i>Richard Blum</i></b></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEil1oVsje9AoerGPI0ovxnoPSlYhA-wCSzoRUh036KhmTl-M8KsbCxDjbAybOJ913ShxjIash8dcku0tL1VZND3qo2W6ulJZ0uBR9FiWsvx8CjWHpnuJ8LdbxIzeD0i8l5Qk_LWYP6FRALA/s1600/Ebook2.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEil1oVsje9AoerGPI0ovxnoPSlYhA-wCSzoRUh036KhmTl-M8KsbCxDjbAybOJ913ShxjIash8dcku0tL1VZND3qo2W6ulJZ0uBR9FiWsvx8CjWHpnuJ8LdbxIzeD0i8l5Qk_LWYP6FRALA/s1600/Ebook2.bmp" /></a></div>
<div align="center" class="MsoListParagraphCxSpLast" style="line-height: normal; margin: 0in 0in 0.0001pt 0.25in; text-align: center;">
<br /></div>
</td>
</tr>
</tbody></table>
<div class="MsoListParagraphCxSpFirst" style="margin-left: 0.25in;">
<br /></div>
<div class="MsoListParagraphCxSpLast" style="margin-left: 0.25in; text-indent: -13.5pt;">
<b>7.<span style="font-family: 'Times New Roman'; font-size: 7pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></b><b>Projects</b></div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><u>Microsoft Development
Network:</u></b><br />
<br /></div>
<div class="MsoNormal">
Enter the new world of embedded programming. The development frameworks and tools
provided by Microsoft. In this section
we will see the latest products released by the Microsoft for the Embedded
Development.</div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: medium none; width: 703px;">
<tbody>
<tr style="height: 17.5pt;">
<td style="border: 1pt solid windowtext; height: 17.5pt; padding: 0in 5.4pt; width: 198.9pt;" valign="top" width="265"><h1>
<span style="font-size: 12pt;">Windows
Embedded Compact 7 (CE) </span></h1>
</td>
<td style="border-color: windowtext windowtext windowtext -moz-use-text-color; border-style: solid solid solid none; border-width: 1pt 1pt 1pt medium; height: 17.5pt; padding: 0in 5.4pt; width: 2.5in;" valign="top" width="240"><div class="MsoNormal" style="line-height: normal;">
<b><span style="font-family: 'Times New Roman', serif; font-size: 12pt;">Windows Embedded Standard 7 (XPE) </span></b></div>
</td>
<td style="border-color: windowtext windowtext windowtext -moz-use-text-color; border-style: solid solid solid none; border-width: 1pt 1pt 1pt medium; height: 17.5pt; padding: 0in 5.4pt; width: 148.5pt;" valign="top" width="198"><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<b><span style="font-size: 12pt;">.Net
Micro Framework</span></b></div>
</td>
</tr>
<tr>
<td style="border-color: -moz-use-text-color windowtext windowtext; border-style: none solid solid; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 198.9pt;" valign="top" width="265"><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
Windows Embedded Standard 7 delivers the power, familiarity, and
reliability of the Windows 7 operating system in a componentized form for
developers to create advanced commercial and consumer devices running
thousands of existing Windows applications and drivers.</div>
</td>
<td style="border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 2.5in;" valign="top" width="240"><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
Windows Embedded Compact is the evolution of Windows Embedded CE.
Compact is a componentized, real-time operating system used to create a wide
range of small footprint enterprise and consumer devices.</div>
</td>
<td style="border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 148.5pt;" valign="top" width="198"><div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
The .NET Micro Framework is .NET for small and resource constrained
devices. It offers a complete and innovative development and execution
environment that brings the productivity of modern computing tools to this
class of devices</div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Languages and Tools:</b> </div>
<div class="MsoNormal" style="line-height: normal;">
Languages:
c#(c sharp).</div>
<div class="MsoNormal" style="line-height: normal;">
Tools:
Visual Studio IDE.</div>
<div class="MsoNormal">
<b>Environmental set up:</b><br />
<b> </b>Download the required software’s
from the below links:</div>
<div class="MsoNormal">
Requirements
for Embedded<span style="font-size: 12pt; line-height: 115%;"> Compact 7:</span></div>
<div class="MsoNormal">
<a href="http://www.microsoft.com/windowsembedded/en-us/downloads/download-windows-embedded-compact-ce.aspx">http://www.microsoft.com/windowsembedded/en-us/downloads/download-windows-<span style="text-decoration: none;"></span>embedded-compact-ce.aspx</a></div>
<div class="MsoNormal">
Requirements
for <span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 115%;">Embedded Standard 7:</span></div>
<div class="MsoNormal">
<a href="http://www.microsoft.com/windowsembedded/en-us/downloads/download-windows-embedded-standard-7.aspx"><span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 115%;">http://www.microsoft.com/windowsembedded/en-us/downloads/download-windows-</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 115%;">embedded-standard-7.aspx</span></a><span style="font-family: 'Times New Roman', serif; font-size: 12pt; line-height: 115%;"> </span></div>
<div class="MsoNormal">
Requirements
for <b><span style="font-size: 12pt; line-height: 115%;">.</span></b><span style="font-size: 12pt; line-height: 115%;">Net
Micro Framework:</span></div>
<div class="MsoNormal">
<a href="http://www.microsoft.com/en-us/netmf/default.aspx">http://www.microsoft.com/en-us/netmf/default.aspx</a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Development Board’s:</b></div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>EBooks:</b></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: medium none;">
<tbody>
<tr>
<td style="border: 1pt solid windowtext; padding: 0in 5.4pt; width: 243.9pt;" valign="top" width="325"><div align="center" class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: center;">
</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: center;">
<b>Expert .NET Micro Framework </b>by</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: center;">
<b><i>Jens Kühner</i></b></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirIy-aGw76dGgUnSmKOiV6smc7cbI_RZ3OINWQihaVEnzRG_AsPEoB7nLfW5bIYVypgSb2-dsgRJrPZ2v3pcpX2deEhHLpkPynaGEV7SK-xIScbhEqePJJ9h3UtqzX2I0pQ0XPm-eT0XIW/s1600/Ebook3.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirIy-aGw76dGgUnSmKOiV6smc7cbI_RZ3OINWQihaVEnzRG_AsPEoB7nLfW5bIYVypgSb2-dsgRJrPZ2v3pcpX2deEhHLpkPynaGEV7SK-xIScbhEqePJJ9h3UtqzX2I0pQ0XPm-eT0XIW/s1600/Ebook3.bmp" /></a></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: center;">
<br /></div>
</td>
<td style="border-color: windowtext windowtext windowtext -moz-use-text-color; border-style: solid solid solid none; border-width: 1pt 1pt 1pt medium; padding: 0in 5.4pt; width: 234.9pt;" valign="top" width="313"><div align="center" class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: center;">
</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: center;">
<b><i>Pro Windows Embedded Compact 7</i></b><i> by </i></div>
<div>
</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: center;">
<b><i><span style="color: windowtext; text-decoration: none;">Abraham
Kcholi</span></i></b></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_lFDM1WHhlZ7uckxSBxBFcLQ-XWZkr6ZO8hlK_QRSgF8Ae0x7Rgt05WxPVQI_uAt0PSlx6ixwsv_hNMtV083k4iLRDMgXgtMrbAXBQy9_MsjR5LuUjljWYqPAcmsHTAIUZcVrYDhAKz-N/s1600/Ebook4.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_lFDM1WHhlZ7uckxSBxBFcLQ-XWZkr6ZO8hlK_QRSgF8Ae0x7Rgt05WxPVQI_uAt0PSlx6ixwsv_hNMtV083k4iLRDMgXgtMrbAXBQy9_MsjR5LuUjljWYqPAcmsHTAIUZcVrYDhAKz-N/s1600/Ebook4.bmp" /></a></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: center;">
<br /></div>
</td>
</tr>
<tr>
<td style="border-color: -moz-use-text-color windowtext windowtext; border-style: none solid solid; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 243.9pt;" valign="top" width="325"><div align="center" class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: center;">
<b><i></i></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: center;">
<b>Professional Microsoft Windows Embedded CE 6.0 </b>by <b><i>Samuel
Phung</i></b></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-1TcSg4dUQYJJoNHVFIkIbdsjGTlC3Eek34ss2JbnXTjLq_1IeXhO2iuKbuhIPcpor0kS74uBNuI01AfLQRhYNAaUMGTS5X2bYvraB5dxsomR0hDKGvP9pOtYnplcM1wq8LhYD6bFKNwj/s1600/Ebook5.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-1TcSg4dUQYJJoNHVFIkIbdsjGTlC3Eek34ss2JbnXTjLq_1IeXhO2iuKbuhIPcpor0kS74uBNuI01AfLQRhYNAaUMGTS5X2bYvraB5dxsomR0hDKGvP9pOtYnplcM1wq8LhYD6bFKNwj/s1600/Ebook5.bmp" /></a></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: center;">
<br /></div>
</td>
<td style="border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 234.9pt;" valign="top" width="313"><div align="center" class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: center;">
</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<b>Windows Embedded CE 6.0 Fundamentals </b>by</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<b><i>Stanislav Pavlov and Pavel Belevsky</i></b></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwMVUARF6aJQKo6UqDmm4sTcfrPxhaS2Cxe6i1HBPgiluovPmrQPnq2ItL7XSrJZb5mZv2kX-Qp9kwJWMsj5b_Xf3C5S6N5H4HjUuVGqHuiia5iSu9Ycv7MHslqKMbebHLmvNZ1HFQHDb2/s1600/Ebook6.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwMVUARF6aJQKo6UqDmm4sTcfrPxhaS2Cxe6i1HBPgiluovPmrQPnq2ItL7XSrJZb5mZv2kX-Qp9kwJWMsj5b_Xf3C5S6N5H4HjUuVGqHuiia5iSu9Ycv7MHslqKMbebHLmvNZ1HFQHDb2/s1600/Ebook6.bmp" /></a></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<br /></div>
</td>
</tr>
<tr>
<td style="border-color: -moz-use-text-color windowtext windowtext; border-style: none solid solid; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 243.9pt;" valign="top" width="325"><div align="center" class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: center;">
</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: center;">
<b>Professional's Guide to Windows® Embedded Standard 7 </b>by <b><i><span style="color: windowtext; text-decoration: none;">Sean D.
Liming</span></i></b></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP5P3ti8c6xdGxKBe07LuHGGpZ9RLiR6z9c9Hnr8_kyLnnCMxg9O6t_LHIBoeXavWwzsWGwQEDdG4yj8lFbI78dCNW3oDIxzF7N7AZIFj8v8foxT2or88WHUEWVf55VqNLiF_D8dRXU9Fz/s1600/Ebook7.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP5P3ti8c6xdGxKBe07LuHGGpZ9RLiR6z9c9Hnr8_kyLnnCMxg9O6t_LHIBoeXavWwzsWGwQEDdG4yj8lFbI78dCNW3oDIxzF7N7AZIFj8v8foxT2or88WHUEWVf55VqNLiF_D8dRXU9Fz/s1600/Ebook7.bmp" /></a></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: center;">
<b><i><span style="color: windowtext; text-decoration: none;"></span></i></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<br /></div>
</td>
<td style="border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 234.9pt;" valign="top" width="313"><div align="center" class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: center;">
<br /></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
<br /></div>
</div>Anonymoushttp://www.blogger.com/profile/12208411882007072995noreply@blogger.com1Hyderabad, Andhra Pradesh, India17.385044 78.48667117.142593 78.170814000000007 17.627495 78.802528tag:blogger.com,1999:blog-6310810494645086689.post-42796149149971858072012-03-02T05:57:00.001-08:002012-03-02T05:57:44.703-08:008051 (8 bit) Micro processer Instruction Set Reference:<div dir="ltr" style="text-align: left;" trbidi="on">
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0in;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
table.MsoTableGrid
{mso-style-name:"Table Grid";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-priority:59;
mso-style-unhide:no;
border:solid windowtext 1.0pt;
mso-border-alt:solid windowtext .5pt;
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-border-insideh:.5pt solid windowtext;
mso-border-insidev:.5pt solid windowtext;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
</style>
<![endif]-->
<br />
<div class="MsoNormal">
<b><u>8051 (8 bit) Micro
processer <span> </span>Instruction Set Reference:</u></b></div>
<div class="MsoNormal">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: medium none;">
<tbody>
<tr>
<td style="border: 1pt solid windowtext; padding: 0in 5.4pt; width: 98.95pt;" valign="top" width="132">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
Data Transfer<span> </span></div>
</td>
<td style="border-color: windowtext windowtext windowtext -moz-use-text-color; border-style: solid solid solid none; border-width: 1pt 1pt 1pt medium; padding: 0in 5.4pt; width: 101.95pt;" valign="top" width="136">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
Arithmetic</div>
</td>
<td style="border-color: windowtext windowtext windowtext -moz-use-text-color; border-style: solid solid solid none; border-width: 1pt 1pt 1pt medium; padding: 0in 5.4pt; width: 101.2pt;" valign="top" width="135">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
Branching</div>
</td>
<td style="border-color: windowtext windowtext windowtext -moz-use-text-color; border-style: solid solid solid none; border-width: 1pt 1pt 1pt medium; padding: 0in 5.4pt; width: 88.35pt;" valign="top" width="118">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
LOGICAL INSTRUCTIONS</div>
</td>
</tr>
<tr>
<td style="border-color: -moz-use-text-color windowtext windowtext; border-style: none solid solid; border-width: medium 1pt 1pt; padding: 0in 5.4pt; width: 98.95pt;" valign="top" width="132">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
MOV </div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;"> MVI</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">LDA</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">LDAX</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">LXI</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">LHLD</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">STA</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">STAX</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">SHLD</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">XCHG</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">SPHL</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">XTHL</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">PUSH</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">POP</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">OUT</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">IN</span></strong></div>
</td>
<td style="border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 101.95pt;" valign="top" width="136">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">ADD</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">ADC</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">ADI</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">ACI</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">LXI</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">DAD</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">SUB</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">SBB</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">SUI</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">SBI</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">INR</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">INX</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">DCR</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">DCX</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">DAA</span></strong></div>
</td>
<td style="border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 101.2pt;" valign="top" width="135">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">JC
<span> </span>RC</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">JNC
<span> </span>RNC</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">JP<span> </span>RP</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">JM<span> </span>RM</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">JZ<span> </span>RZ</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">JNZ<span> </span>RNZ</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">JPE<span> </span>RPE</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">JPO
RPO</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">CC<span> </span>RET</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">CP</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">CM</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">CZ</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">CNZ</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">CPE</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">CPO</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<br /></div>
</td>
<td style="border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-style: none solid solid none; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 88.35pt;" valign="top" width="118">
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">CMP</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">CPI</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">ANA</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">ANI</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">XRA</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">XRI</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">ORA</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">ORI</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">RLC</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">RRC</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">RAL</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">RAR</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">CMA</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">CMC</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<strong><span style="font-family: "Calibri","sans-serif"; font-weight: normal;">STC</span></strong></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<br /></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal">
<br /></div>
</div>Anonymoushttp://www.blogger.com/profile/12208411882007072995noreply@blogger.com0tag:blogger.com,1999:blog-6310810494645086689.post-12201448611467146482011-12-20T02:28:00.000-08:002011-12-20T02:28:22.237-08:00IComparer<div dir="ltr" style="text-align: left;" trbidi="on">
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0in;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
</style>
<![endif]-->
<br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">class</span><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: #2b91af;">MessageCompare</span> : <span style="color: #2b91af;">IComparer</span><Messages></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;">{</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span> </span><span style="color: blue;">public</span> <span style="color: blue;">int</span>
Compare(Messages x, Messages y)</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span> </span>{</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span> </span><span style="color: blue;">if</span> (y.Date.CompareTo(x.Date) != 0)</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span> </span>{</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span> </span><span style="color: blue;">return</span> y.Date.CompareTo(x.Date);</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span> </span>}</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span> </span><span style="color: blue;">else</span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span> </span>{</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span> </span><span style="color: blue;">return</span> 0;</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span> </span>}</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span> </span>}</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;">}</span></div>
<div class="MsoNormal">
<br /></div>
</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6310810494645086689.post-72201961012196639302011-12-09T01:59:00.001-08:002012-04-01T10:05:02.329-07:00Google Maps API V3 for ASP.NET<div dir="ltr" style="text-align: left;" trbidi="on">
<div>
<span id="ArticleContent">
</span><br />
<h2>
<span id="ArticleContent">
Introduction</span></h2>
<span id="ArticleContent">
Google Maps provides a flexible way to integrate maps to provide directions, location information, and any other kind of stuff provided by the Google Maps API
in your web application. Although there are some articles in CP explaining about maps, in my article I am going to provide information about the latest Google
Maps API V3 version. In this article, we will see some of the common techniques that are used with Google Maps. In order to work with
the code sample explained below, you need to have some basic knowledge about JavaScript and C#.</span><br />
<a name='more'></a><span id="ArticleContent"><br />
</span><br />
<h3>
<span id="ArticleContent">
Your First Google Maps Map</span></h3>
<span id="ArticleContent">
In the earlier versions of the Google Maps API, as a developer we need to register the web application with Google and we were supposed to get an API key.
However with the release of the new version, key registration has been eliminated for a few days for now, but recently, Google has come up with some kind of traffic limitations
and we are supposed to register the application with an API Key. You can get more information about the usage of the API and the terms at this link:
<a href="http://code.google.com/apis/maps/documentation/javascript/usage.html#usage_limits">http://code.google.com/apis/maps/documentation/javascript/usage.html#usage_limits</a>.
Now we will start our work and create a simple Google Maps map that can be integrated into our site. The following script is used to connect to the Google Maps API:<br />
<pre class="prettyprint"><script type="text/javascript"
src="http://maps.googleapis.com/maps/api/js?sensor=false">
</script></pre>
In order to create a simple Google Map map, you can use the following JavaScript code:<br />
<pre class="prettyprint">function InitializeMap()
{
var latlng = new google.maps.LatLng(-34.397, 150.644);
var myOptions =
{
zoom: 8,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map"), myOptions);
}
window.onload = InitializeMap;</pre>
</span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5j9-56IBUG19Ke48TKOJ5_sHCVQ04irGCijgh8XKCDblrNbyuTatJS0s8cTLHe7lfETdeyPvSaFS2KIa8Z4QLPSspGMuVg8oQCdyM5Gp6pnS1-EE8hwTHHmuw71ZWNmO01_CFyS_zF0FH/s1600/FirstGoogleMap.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5j9-56IBUG19Ke48TKOJ5_sHCVQ04irGCijgh8XKCDblrNbyuTatJS0s8cTLHe7lfETdeyPvSaFS2KIa8Z4QLPSspGMuVg8oQCdyM5Gp6pnS1-EE8hwTHHmuw71ZWNmO01_CFyS_zF0FH/s1600/FirstGoogleMap.JPG" /></a><span id="ArticleContent">
<h3>
Google Maps Options</h3>
In the above example, we used the <code>Map</code> class which takes options and an HTML ID as parameters. Now moving further, we will look at the map options:<br />
<pre class="prettyprint">function initialize() {
var latlng = new google.maps.LatLng(-34.397, 150.644);
var options =
{
zoom: 3,
center: new google.maps.LatLng(37.09, -95.71),
mapTypeId: google.maps.MapTypeId.ROADMAP,
mapTypeControl: true,
mapTypeControlOptions:
{
style: google.maps.MapTypeControlStyle.DROPDOWN_MENU,
poistion: google.maps.ControlPosition.TOP_RIGHT,
mapTypeIds: [google.maps.MapTypeId.ROADMAP,
google.maps.MapTypeId.TERRAIN,
google.maps.MapTypeId.HYBRID,
google.maps.MapTypeId.SATELLITE]
},
navigationControl: true,
navigationControlOptions:
{
style: google.maps.NavigationControlStyle.ZOOM_PAN
},
scaleControl: true,
disableDoubleClickZoom: true,
draggable: false,
streetViewControl: true,
draggableCursor: 'move'
};
var map = new google.maps.Map(document.getElementById("map"), options);
}
window.onload = initialize;</pre>
In the above example, all the properties of <code>Map</code> have been used. You can set the map options depending on your requirements.<br />
</span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSLFwRfeNPgQiPpuMBrqkw39XZ87JkQ5sl0-C6eqytQARzmcPY5UQAPpLuD2psMlZW_XQLKVOx5jE905J0p6p_A_q6HKmbh9OTR8rgL-jM6qc4SUmFRZTmcVdkYpS2cFtqC55Np9rxIHqa/s1600/Mapoptions.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="342" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSLFwRfeNPgQiPpuMBrqkw39XZ87JkQ5sl0-C6eqytQARzmcPY5UQAPpLuD2psMlZW_XQLKVOx5jE905J0p6p_A_q6HKmbh9OTR8rgL-jM6qc4SUmFRZTmcVdkYpS2cFtqC55Np9rxIHqa/s400/Mapoptions.JPG" width="400" /></a><br />
<span id="ArticleContent">
The properties of the <code>Map</code> class are summarized in the following table:<br />
</span><br />
<table class="ArticleTable">
<thead>
<tr>
<td valign="top" width="319">Property</td>
<td valign="top" width="319">Class</td>
</tr>
</thead>
<tbody>
<tr>
<td valign="top" width="319"><code>MapTypeControl:true/false</code></td>
<td valign="top" width="319"><code>mapTypeControlOptions</code>
<br />
<table class="ArticleTable">
<thead>
<tr>
<td valign="top" width="152">Property</td>
<td valign="top" width="152">Constants/Values</td>
</tr>
</thead>
<tbody>
<tr>
<td valign="top" width="152"><code>style</code></td>
<td valign="top" width="152"><code>DEFAULT<br />
HORIZONTAL_BAR<br />
DROPDOWN_MENU</code></td>
</tr>
<tr>
<td valign="top" width="152"><code>position</code></td>
<td valign="top" width="152"><code>BOTTOM<br />
BOTTOM_LEFT<br />
BOTTOM_RIGHT <br />
LEFT<br />
RIGHT<br />
TOP<br />
TOP_LEFT<br />
TOP_RIGHT</code></td>
</tr>
<tr>
<td valign="top" width="152"><code>mapTypeIds</code></td>
<td valign="top" width="152"><code>ROADMAP<br />
SATELLITE<br />
Hybrid<br />
Terrain</code></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td valign="top" width="319"><code>navigationControl:true/false</code></td>
<td valign="top" width="319"><code>navigationControlOptions</code>
<br />
<table class="ArticleTable">
<thead>
<tr>
<td valign="top" width="152">Property</td>
<td valign="top" width="152">Constants/Values</td>
</tr>
</thead>
<tbody>
<tr>
<td valign="top" width="152"><code>Position</code></td>
<td valign="top" width="152"><code>BOTTOM<br />
BOTTOM_LEFT<br />
BOTTOM_RIGHT<br />
LEFT<br />
RIGHT<br />
TOP<br />
TOP_LEFT<br />
TOP_RIGHT T</code></td>
</tr>
<tr>
<td valign="top" width="152"><code>style</code></td>
<td valign="top" width="152"><code>DEFAULT<br />
SMALL<br />
ANDROID</code></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td valign="top" width="319"><code>scaleControl:true/false</code></td>
<td valign="top" width="319"><code>scaleControlOptions</code>: <code>scalecontroloptions</code> has the same properties as navigation control
options (<code>position</code>, style) and behavior is also the same.</td>
</tr>
<tr>
<td valign="top" width="319"><code>disableDoubleClickZoom: true/false</code></td>
<td valign="top" width="319"><br /></td>
</tr>
<tr>
<td valign="top" width="319"><code>scrollwheel: true/false</code></td>
<td valign="top" width="319"><br /></td>
</tr>
<tr>
<td valign="top" width="319"><code>draggable: true/false</code></td>
<td valign="top" width="319"><br /></td>
</tr>
<tr>
<td valign="top" width="319"><code>streetViewControl: true/false</code></td>
<td valign="top" width="319"><br /></td>
</tr>
</tbody>
</table>
<span id="ArticleContent">
</span><br />
<h3>
<span id="ArticleContent">
Map Marker</span></h3>
<span id="ArticleContent">
The <code>Marker</code> class provides you with an option to display a marker to the user for a given location. Use of the marker is a very general task that we will use often
in our application. The following example shows you how to create a simple marker.<br />
</span><br />
<pre class="prettyprint"><span id="ArticleContent">var marker = new google.maps.Marker
(
{
position: new google.maps.LatLng(-34.397, 150.644),
map: map,
title: 'Click me'
}
);</span></pre>
<span id="ArticleContent">
</span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdkzNxfmKPdcIPqieIOfKWKHKoXfjuSX97bagRFBIAM_ek4zWqJh41xOdv8xqCHD6eq-sKIQDyHdF2SvSi-uCZdQNG23tf4M2JMbR_2i-MadlSuqOxg_e0r9xjVHM-oavM7I33Ili67KES/s1600/Marker.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="289" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdkzNxfmKPdcIPqieIOfKWKHKoXfjuSX97bagRFBIAM_ek4zWqJh41xOdv8xqCHD6eq-sKIQDyHdF2SvSi-uCZdQNG23tf4M2JMbR_2i-MadlSuqOxg_e0r9xjVHM-oavM7I33Ili67KES/s320/Marker.JPG" width="320" /></a><span id="ArticleContent">
<h3>
Info Window</h3>
With the marker displayed on the map, you create an <code>onclick</code> event which provides the user with a popup window showing the information about the place.
You can create an info window as shown below:<br />
<pre class="prettyprint">var infowindow = new google.maps.InfoWindow({
content: 'Location info:
Country Name:
LatLng:'
});
google.maps.event.addListener(marker, 'click', function () {
// Calling the open method of the infoWindow
infowindow.open(map, marker);
});</pre>
Combining them:<br />
<pre class="prettyprint">var map;
function initialize() {
var latlng = new google.maps.LatLng(-34.397, 150.644);
var myOptions = {
zoom: 8,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map(document.getElementById("map"), myOptions);
var marker = new google.maps.Marker
(
{
position: new google.maps.LatLng(-34.397, 150.644),
map: map,
title: 'Click me'
}
);
var infowindow = new google.maps.InfoWindow({
content: 'Location info:<br/>Country Name:<br/>LatLng:'
});
google.maps.event.addListener(marker, 'click', function () {
// Calling the open method of the infoWindow
infowindow.open(map, marker);
});
}
window.onload = initialize;</pre>
With this complete, you are going to create a map and then locate the region of the user, load the map with a marker and the info window.<br />
</span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEin5Wr_M2XIiZTwjCblzFz4XA1GGTZshCa-P6un9drAGu5EPf_mbx5843V43wj1OoguCA4VNoeSUAyaYl3iet2aRkUmytokAMLVbACQUkp5o-fkVGU52XFok_lPwTzOXkpcbvm_-vXTS47D/s1600/Infowindow.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="151" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEin5Wr_M2XIiZTwjCblzFz4XA1GGTZshCa-P6un9drAGu5EPf_mbx5843V43wj1OoguCA4VNoeSUAyaYl3iet2aRkUmytokAMLVbACQUkp5o-fkVGU52XFok_lPwTzOXkpcbvm_-vXTS47D/s320/Infowindow.JPG" width="320" /></a><br />
<span id="ArticleContent">
</span><br />
<h3>
<span id="ArticleContent">
Multiple Markers</span></h3>
<span id="ArticleContent">
In some cases, if you want to handle multiple markers, you achieve this like the following:<br />
</span><br />
<pre class="prettyprint"><span id="ArticleContent">function markicons() {
InitializeMap();
var ltlng = [];
ltlng.push(new google.maps.LatLng(40.756, -73.986));
ltlng.push(new google.maps.LatLng(37.775, -122.419));
ltlng.push(new google.maps.LatLng(47.620, -122.347));
ltlng.push(new google.maps.LatLng(-22.933, -43.184));
for (var i = 0; i <= ltlng.length; i++) {
marker = new google.maps.Marker({
map: map,
position: ltlng[i]
});
(function (i, marker) {
google.maps.event.addListener(marker, 'click', function () {
if (!infowindow) {
infowindow = new google.maps.InfoWindow();
}
infowindow.setContent("Message" + i);
infowindow.open(map, marker);
});
})(i, marker);
}
}</span></pre>
<span id="ArticleContent">
</span><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwPeLBTU2ujPr3zwgXr3RNAsSaLIx7tFXLfMdQEJu-7d6ySy_08ZcJJ2z-Kjccav5UYWs8ztYtGcuNBalGKrJx3s6ZZeGuDX5JpnTeHlYUW9TM7F2my_28I4weCBwgiVjSHXT61tE6ludk/s1600/mulitplemarkers.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="259" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwPeLBTU2ujPr3zwgXr3RNAsSaLIx7tFXLfMdQEJu-7d6ySy_08ZcJJ2z-Kjccav5UYWs8ztYtGcuNBalGKrJx3s6ZZeGuDX5JpnTeHlYUW9TM7F2my_28I4weCBwgiVjSHXT61tE6ludk/s320/mulitplemarkers.JPG" width="320" /></a><span id="ArticleContent">
<h3>
Directions</h3>
One of the most useful features of the Google Maps API is it can be used to provide directions for any given location(s). The following code is used to accomplish this task:<br />
<pre class="prettyprint">var directionsDisplay;
var directionsService = new google.maps.DirectionsService();
function InitializeMap() {
directionsDisplay = new google.maps.DirectionsRenderer();
var latlng = new google.maps.LatLng(-34.397, 150.644);
var myOptions =
{
zoom: 8,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map"), myOptions);
directionsDisplay.setMap(map);
directionsDisplay.setPanel(document.getElementById('directionpanel'));
var control = document.getElementById('control');
control.style.display = 'block';
}
function calcRoute() {
var start = document.getElementById('startvalue').value;
var end = document.getElementById('endvalue').value;
var request = {
origin: start,
destination: end,
travelMode: google.maps.DirectionsTravelMode.DRIVING
};
directionsService.route(request, function (response, status) {
if (status == google.maps.DirectionsStatus.OK) {
directionsDisplay.setDirections(response);
}
});
}
function Button1_onclick() {
calcRoute();
}
window.onload = InitializeMap;</pre>
</span><span id="ArticleContent"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_7ZZSNBRupulIOuhM036mH4PxxHsT_qXJct4LdPwubVTUTRPtR8H6vZymIABSav7-NPt5fLeyLKnAm8JiQJLMPnQgMSksSMQlHy0BgSV1sS9OF5Lm3O39GY4mOS-dQTBtmvM7_CfjWQXu/s1600/Directions.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="185" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_7ZZSNBRupulIOuhM036mH4PxxHsT_qXJct4LdPwubVTUTRPtR8H6vZymIABSav7-NPt5fLeyLKnAm8JiQJLMPnQgMSksSMQlHy0BgSV1sS9OF5Lm3O39GY4mOS-dQTBtmvM7_CfjWQXu/s400/Directions.JPG" width="400" /></a></span><span id="ArticleContent">
<h3>
Layers</h3>
The Google Maps API provides you with multiple layer options of which one is bicycle. By using the bicycle layer, you can show bicycle paths for a particular location on the map to users.
The following code snippet allows you to add a bicycle layer to a map.<br />
<pre class="prettyprint">var map
function InitializeMap() {
var latlng = new google.maps.LatLng(-34.397, 150.644);
var myOptions = {
zoom: 8,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map(document.getElementById("map"), myOptions);
}
window.onload = InitializeMap;
var bikeLayer = new google.maps.BicyclingLayer();
bikeLayer.setMap(map);</pre>
<h3>
Gecoding</h3>
So far we have learned the basic concepts of creating Google maps and displaying information about a location to the user.
Now we will see how we can calculate/find a location specified by the user. Geocoding is nothing but the process of finding out the latitude and longitude
for a given region. The following API code shows you how to find the latitude and longitude for a location.<br />
<pre class="prettyprint">geocoder.geocode({ 'address': address }, function (results, status) {
if (status == google.maps.GeocoderStatus.OK) {
map.setCenter(results[0].geometry.location);
var marker = new google.maps.Marker({
map: map,
position: results[0].geometry.location
});
}
else {
alert("Geocode was not successful for the following reason: " + status);
}
});</pre>
<h3>
Geocoding C#</h3>
The same calculation can also be performed by using C#:<br />
<pre class="prettyprint">public static Coordinate GetCoordinates(string region)
{
using (var client = new WebClient())
{
string uri = "http://maps.google.com/maps/geo?q='" + region +
"'&output=csv&key=ABQIAAAAzr2EBOXUKnm_jVnk0OJI7xSosDVG8KKPE1" +
"-m51RBrvYughuyMxQ-i1QfUnH94QxWIa6N4U6MouMmBA";
string[] geocodeInfo = client.DownloadString(uri).Split(',');
return new Coordinate(Convert.ToDouble(geocodeInfo[2]),
Convert.ToDouble(geocodeInfo[3]));
}
}
public struct Coordinate
{
private double lat;
private double lng;
public Coordinate(double latitude, double longitude)
{
lat = latitude;
lng = longitude;
}
public double Latitude { get { return lat; } set { lat = value; } }
public double Longitude { get { return lng; } set { lng = value; } }
}</pre>
<h3>
Reverse Geocoding</h3>
As the name indicates, it is the reverse process of geocoding; that is depending on the latitude and longitude, we can find the location name.
This can be achieved using the following code:<br />
<pre class="prettyprint">var map;
var geocoder;
function InitializeMap() {
var latlng = new google.maps.LatLng(-34.397, 150.644);
var myOptions =
{
zoom: 8,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP,
disableDefaultUI: true
};
map = new google.maps.Map(document.getElementById("map"), myOptions);
}
function FindLocaiton() {
geocoder = new google.maps.Geocoder();
InitializeMap();
var address = document.getElementById("addressinput").value;
geocoder.geocode({ 'address': address }, function (results, status) {
if (status == google.maps.GeocoderStatus.OK) {
map.setCenter(results[0].geometry.location);
var marker = new google.maps.Marker({
map: map,
position: results[0].geometry.location
});
if (results[0].formatted_address) {
region = results[0].formatted_address + '<br/>';
}
var infowindow = new google.maps.InfoWindow({
content: 'Location info:<br/>Country Name:' + region +
'<br/>LatLng:' + results[0].geometry.location + ''
});
google.maps.event.addListener(marker, 'click', function () {
// Calling the open method of the infoWindow
infowindow.open(map, marker);
});
}
else {
alert("Geocode was not successful for the following reason: " + status);
}
});
}</pre>
<h3>
Reverse Geocoding in C#</h3>
The following C# code shows you the reverse geocoding technique:<br />
<pre class="prettyprint">static string baseUri =
"http://maps.googleapis.com/maps/api/geocode/xml?latlng={0},{1}&sensor=false";
string location = string.Empty;
public static void RetrieveFormatedAddress(string lat, string lng)
{
string requestUri = string.Format(baseUri, lat, lng);
using (WebClient wc = new WebClient())
{
string result = wc.DownloadString(requestUri);
var xmlElm = XElement.Parse(result);
var status = (from elm in xmlElm.Descendants() where
elm.Name == "status" select elm).FirstOrDefault();
if (status.Value.ToLower() == "ok")
{
var res = (from elm in xmlElm.Descendants() where
elm.Name == "formatted_address" select elm).FirstOrDefault();
requestUri = res.Value;
}
}
}</pre>
<h2>
Conclusion</h2>
In this article, I have tried to explain some of the basic and most frequently used tasks of the Google Maps API V3. Hope this article will help you in completing your tasks.
Further, there are lot more things in the API which I have not discussed and I would try to include them in my future updates of this article. Any comments and feedback are always welcome.<br />
<h2>
External Resources</h2>
<ul>
<li><a href="http://code.google.com/apis/maps/documentation/javascript/reference.html">Google Maps API Reference</a></li>
<li><a href="http://code.google.com/apis/maps/documentation/javascript/examples/index.html">Google Map Examples</a></li>
</ul>
</span>
</div>
</div>Unknownnoreply@blogger.com4tag:blogger.com,1999:blog-6310810494645086689.post-18255288606048545012011-11-27T11:30:00.000-08:002012-04-09T04:59:52.604-07:00Master Pages and Themes<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="MsoNormal" style="line-height: normal;">
<b><span style="font-family: 'Times New Roman', serif; font-size: 18pt;">Introduction:</span></b></div>
<div class="MsoNormal" style="line-height: normal; text-align: justify;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;">Master
Pages in Asp.net allows you to control the layout, design and common controls
of all the pages in the website/web application. With a single master page you
can define the look and feel of your application which includes multiple
content place holders. Along with Master Pages you can work with themes to
provide the user with great User Interface. In this article we see an overview
of how to </span></div>
<ol start="1" type="1">
<li class="MsoNormal" style="line-height: normal; text-align: justify;"><span style="font-family: 'Times New Roman', serif; font-size: 12pt;">Create a Master page with
single and multiple content place holders,</span></li>
<li class="MsoNormal" style="line-height: normal; text-align: justify;"><span style="font-family: 'Times New Roman', serif; font-size: 12pt;">Add Content Pages,</span></li>
<li class="MsoNormal" style="line-height: normal; text-align: justify;"><span style="font-family: 'Times New Roman', serif; font-size: 12pt;">Nested Master Pages.</span></li>
<li class="MsoNormal" style="line-height: normal; text-align: justify;"><span style="font-family: 'Times New Roman', serif; font-size: 12pt;">Programming the Master Page, </span></li>
<li class="MsoNormal" style="line-height: normal; text-align: justify;"><span style="font-family: 'Times New Roman', serif; font-size: 12pt;">Creating themes for the
application and </span></li>
<li class="MsoNormal" style="line-height: normal; text-align: justify;"><span style="font-family: 'Times New Roman', serif; font-size: 12pt;">Finally we will see how we can
work with multiple themes.<a name='more'></a> </span></li>
</ol>
<div class="MsoNormal" style="line-height: normal; text-align: justify;">
<a href="http://www.blogger.com/blogger.g?blogID=6310810494645086689" name="_Creating_a_Master_Page:"></a><b><span style="font-family: 'Times New Roman', serif; font-size: 13.5pt;">Creating
a Master Page:</span></b><br />
<b><span style="font-family: 'Times New Roman', serif; font-size: 13.5pt;"><br /></span></b></div>
<div class="MsoNormal" style="line-height: normal; text-align: justify;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;">Creating
a master page is very simple. Just in your website, right Click on the solution
explorer, select add new item and then select the Master page from the Pop up
window, as shown in the figure. Master page comes with extension .master which
consists of all the common elements (a template/layout) for the site.</span><br />
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6LTgZvOQC3MEAhEgbOOkpU3Qog4XkA5Ff8oqZty8M8YAr2lJgWGn3poqSq0IvaWwGtBJkxWh0Ng-Q9kPG65qQ5lmxdJV9sRFH8L3jhP4i8IjDw9n98PzMbhSYil_uiagpAWKmI5oTehMo/s1600/MasterPage.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="459" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6LTgZvOQC3MEAhEgbOOkpU3Qog4XkA5Ff8oqZty8M8YAr2lJgWGn3poqSq0IvaWwGtBJkxWh0Ng-Q9kPG65qQ5lmxdJV9sRFH8L3jhP4i8IjDw9n98PzMbhSYil_uiagpAWKmI5oTehMo/s640/MasterPage.JPG" width="640" /></a></div>
<div align="center" class="MsoNormal" style="line-height: normal; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6LTgZvOQC3MEAhEgbOOkpU3Qog4XkA5Ff8oqZty8M8YAr2lJgWGn3poqSq0IvaWwGtBJkxWh0Ng-Q9kPG65qQ5lmxdJV9sRFH8L3jhP4i8IjDw9n98PzMbhSYil_uiagpAWKmI5oTehMo/s1600/MasterPage.JPG"><span style="font-family: 'Times New Roman', serif; font-size: 12pt; text-decoration: none;"><br /></span></a><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; text-align: justify;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;">By
default the master page comes with two content place holders place in it. The
code of the master page is as follows:</span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="background-attachment: scroll; background-clip: initial; background-color: yellow; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat; font-size: 9.5pt;"><%</span><span style="color: blue; font-size: 9.5pt;">@</span><span style="font-size: 9.5pt;"> <span style="color: maroon;">Master</span> <span style="color: red;">Language</span><span style="color: blue;">="C#"</span>
<span style="color: red;">AutoEventWireup</span><span style="color: blue;">="true"</span>
<span style="color: red;">CodeFile</span><span style="color: blue;">="MasterPage.master.cs"</span>
<span style="color: red;">Inherits</span><span style="color: blue;">="MasterPage"</span>
<span style="background-attachment: scroll; background-clip: initial; background-color: yellow; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat;">%></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; text-align: justify;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;">In
the above @ Master directive identifies it as master pages, whereas all other
pages have @page directive.</span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: blue; font-size: 9.5pt;"><</span><span style="color: maroon; font-size: 9.5pt;">html</span><span style="font-size: 9.5pt;">
<span style="color: red;">xmlns</span><span style="color: blue;">="http://www.w3.org/1999/xhtml"></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: blue; font-size: 9.5pt;"><</span><span style="color: maroon; font-size: 9.5pt;">head</span><span style="font-size: 9.5pt;">
<span style="color: red;">runat</span><span style="color: blue;">="server"></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: blue;"><</span><span style="color: maroon;">title</span><span style="color: blue;">></span><span style="color: maroon;">title</span><span style="color: blue;">></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: blue;"><</span><span style="color: maroon;">asp</span><span style="color: blue;">:</span><span style="color: maroon;">ContentPlaceHolder</span>
<span style="color: red;">id</span><span style="color: blue;">="head"</span>
<span style="color: red;">runat</span><span style="color: blue;">="server"></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: maroon;">asp</span><span style="color: blue;">:</span><span style="color: maroon;">ContentPlaceHolder</span><span style="color: blue;">></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: maroon; font-size: 9.5pt;">head</span><span style="color: blue; font-size: 9.5pt;">></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: blue; font-size: 9.5pt;"><</span><span style="color: maroon; font-size: 9.5pt;">body</span><span style="color: blue; font-size: 9.5pt;">></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: blue;"><</span><span style="color: maroon;">form</span> <span style="color: red;">id</span><span style="color: blue;">="form1"</span> <span style="color: red;">runat</span><span style="color: blue;">="server"></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: blue;"><</span><span style="color: maroon;">div</span><span style="color: blue;">></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: blue;"><</span><span style="color: maroon;">asp</span><span style="color: blue;">:</span><span style="color: maroon;">ContentPlaceHolder</span>
<span style="color: red;">id</span><span style="color: blue;">="content"</span>
<span style="color: red;">runat</span><span style="color: blue;">="server"></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: maroon;">asp</span><span style="color: blue;">:</span><span style="color: maroon;">ContentPlaceHolder</span><span style="color: blue;">></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: maroon;">div</span><span style="color: blue;">></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: maroon;">form</span><span style="color: blue;">></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: maroon; font-size: 9.5pt;">body</span><span style="color: blue; font-size: 9.5pt;">></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: maroon; font-size: 9.5pt;">html</span><span style="color: blue; font-size: 9.5pt;">></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; text-align: justify;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;">The
content place holders in the above are used to place the static content or
dynamic content by using the asp.net server controls in the site. The content
place holder is placed in the header section and in the form tags which in
general allows the users to place each page content in the header and body
part, but there is no such a restriction to place a content place under a
particular tag nor there is an restriction for the number of content place
holders to be used. In the later part of the article we will see in details
about the layout and usage of the content place holder.</span></div>
<div class="MsoNormal" style="line-height: normal; text-align: justify;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;">
Content Place holder allows the user to flexibly maintain the site content with
a common page layout.</span></div>
<div class="MsoNormal" style="line-height: normal;">
<a href="http://www.blogger.com/blogger.g?blogID=6310810494645086689" name="_Adding_Content_Place_Holder:"></a><b><span style="font-family: 'Times New Roman', serif; font-size: 13.5pt;">Adding Content Place Holder:</span></b><br />
<b><span style="font-family: 'Times New Roman', serif; font-size: 13.5pt;"><br /></span></b></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;">By this time as we have created a
Master page, now we need to add a content place holder to the site. Right click
on the Solution explorer, select add new item and then select content place
holder from the pop up window:</span><br />
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;"><br /></span></div>
<div align="center" class="MsoNormal" style="line-height: normal; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlA7zrsyAGSTkl1AZVNcI3qzu_yzZW-49ZNA8nlnR_S7C3FuFVBobqQBiPmTpqktIUXE-WPMX4kKqaYmyLTYaeMBM46UeJT-ELY5TZrsnHB-2GF9oKY-FdvB4VOqa3QG6oGGbOFNSW8eel/s1600/AddContentPage.JPG"><span style="font-family: 'Times New Roman', serif; font-size: 12pt; text-decoration: none;"></span></a><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlA7zrsyAGSTkl1AZVNcI3qzu_yzZW-49ZNA8nlnR_S7C3FuFVBobqQBiPmTpqktIUXE-WPMX4kKqaYmyLTYaeMBM46UeJT-ELY5TZrsnHB-2GF9oKY-FdvB4VOqa3QG6oGGbOFNSW8eel/s1600/AddContentPage.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="465" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlA7zrsyAGSTkl1AZVNcI3qzu_yzZW-49ZNA8nlnR_S7C3FuFVBobqQBiPmTpqktIUXE-WPMX4kKqaYmyLTYaeMBM46UeJT-ELY5TZrsnHB-2GF9oKY-FdvB4VOqa3QG6oGGbOFNSW8eel/s640/AddContentPage.JPG" width="640" /></a></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;">This adds the content place holder
to the site with the following code:</span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="background-attachment: scroll; background-clip: initial; background-color: yellow; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat; font-size: 9.5pt;"><%</span><span style="color: blue; font-size: 9.5pt;">@</span><span style="font-size: 9.5pt;"> <span style="color: maroon;">Page</span> <span style="color: red;">Title</span><span style="color: blue;">=""</span> <span style="color: red;">Language</span><span style="color: blue;">="C#"</span>
<span style="color: red;">MasterPageFile</span><span style="color: blue;">="~/MasterPage.master"</span>
<span style="color: red;">AutoEventWireup</span><span style="color: blue;">="true"</span>
<span style="color: red;">CodeFile</span><span style="color: blue;">="Default2.aspx.cs"</span>
<span style="color: red;">Inherits</span><span style="color: blue;">="Default2"</span>
<span style="background-attachment: scroll; background-clip: initial; background-color: yellow; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat;">%></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: blue; font-size: 9.5pt;"><</span><span style="color: maroon; font-size: 9.5pt;">asp</span><span style="color: blue; font-size: 9.5pt;">:</span><span style="color: maroon; font-size: 9.5pt;">Content</span><span style="font-size: 9.5pt;">
<span style="color: red;">ID</span><span style="color: blue;">="Content1"</span>
<span style="color: red;">ContentPlaceHolderID</span><span style="color: blue;">="ContentPlaceHolder1"</span>
<span style="color: red;">Runat</span><span style="color: blue;">="Server"></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: maroon; font-size: 9.5pt;">asp</span><span style="color: blue; font-size: 9.5pt;">:</span><span style="color: maroon; font-size: 9.5pt;">Content</span><span style="color: blue; font-size: 9.5pt;">></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<a href="http://www.blogger.com/blogger.g?blogID=6310810494645086689" name="_Creating_a_Nested_Master_Page:"></a><b><span style="font-family: 'Times New Roman', serif; font-size: 13.5pt;">Creating
a Nested Master Page:</span></b><br />
<b><span style="font-family: 'Times New Roman', serif; font-size: 13.5pt;"><br /></span></b></div>
<div class="MsoNormal" style="line-height: normal; text-align: justify;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;">In
order to create a nested master page follow the below steps. Repeat the above
previous steps to add a master page and then again right click on the solution
explorer and select add new item and select master page from the installed
templates and then select the ‘select master page’ checkbox and name the master
page as nestedmaster.master, as shown in the below figure. </span><br />
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT4Drw2HDQjJ_OYutmv4OE5iVsrLOC_2i5PXacUuPc9I_ie9dOeCm9oW5l4VSDHhz72aA1HWXHId5HHTTwKRjtnOK1UtXfK_HCn9JGE3Qj20UsS-q05G2wZZQh7k0nKMYaJOs-0ludqtYE/s1600/NestedMasterPage.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="460" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT4Drw2HDQjJ_OYutmv4OE5iVsrLOC_2i5PXacUuPc9I_ie9dOeCm9oW5l4VSDHhz72aA1HWXHId5HHTTwKRjtnOK1UtXfK_HCn9JGE3Qj20UsS-q05G2wZZQh7k0nKMYaJOs-0ludqtYE/s640/NestedMasterPage.JPG" width="640" /></a></div>
<div class="MsoNormal" style="line-height: normal; text-align: justify;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;"><br /></span><br />
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;"><br /></span><br />
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;"><br /></span><br />
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;"><br /></span><br />
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;"><br /></span><br />
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;">From
the below code we can observe the difference a master page, content page and
nested master page.</span></div>
<div class="MsoNormal" style="line-height: normal; text-align: justify;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;"><br /></span><br />
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;">Master
Page:</span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="background-attachment: scroll; background-clip: initial; background-color: yellow; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat; font-size: 9.5pt;"><%</span><span style="color: blue; font-size: 9.5pt;">@</span><span style="font-size: 9.5pt;"> <span style="color: maroon;">Master</span> <span style="color: red;">Language</span><span style="color: blue;">="C#"</span>
<span style="color: red;">AutoEventWireup</span><span style="color: blue;">="true"</span>
<span style="color: red;">CodeFile</span><span style="color: blue;">="MasterPage.master.cs"</span>
<span style="color: red;">Inherits</span><span style="color: blue;">="MasterPage"</span>
<span style="background-attachment: scroll; background-clip: initial; background-color: yellow; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat;">%></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; text-align: justify;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;">Nested
master Page:</span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="background-attachment: scroll; background-clip: initial; background-color: yellow; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat; font-size: 9.5pt;"><%</span><span style="color: blue; font-size: 9.5pt;">@</span><span style="font-size: 9.5pt;"> <span style="color: maroon;">Master</span> <span style="color: red;">Language</span><span style="color: blue;">="C#"</span>
<span style="color: red;">MasterPageFile</span><span style="color: blue;">="~/MasterPage.master"</span>
<span style="color: red;">AutoEventWireup</span><span style="color: blue;">="true"</span>
<span style="color: red;">CodeFile</span><span style="color: blue;">="NestedMaster.master.cs"</span>
<span style="color: red;">Inherits</span><span style="color: blue;">="NestedMaster"</span>
<span style="background-attachment: scroll; background-clip: initial; background-color: yellow; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat;">%></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; text-align: justify;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;">Content
Page:</span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="background-attachment: scroll; background-clip: initial; background-color: yellow; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat; font-size: 9.5pt;"><%</span><span style="color: blue; font-size: 9.5pt;">@</span><span style="font-size: 9.5pt;"> <span style="color: maroon;">Page</span> <span style="color: red;">Title</span><span style="color: blue;">=""</span> <span style="color: red;">Language</span><span style="color: blue;">="C#"</span>
<span style="color: red;">MasterPageFile</span><span style="color: blue;">="~/MasterPage.master"</span>
<span style="color: red;">AutoEventWireup</span><span style="color: blue;">="true"</span>
<span style="color: red;">CodeFile</span><span style="color: blue;">="Default2.aspx.cs"</span>
<span style="color: red;">Inherits</span><span style="color: blue;">="Default2"</span>
<span style="background-attachment: scroll; background-clip: initial; background-color: yellow; background-image: none; background-origin: initial; background-position: 0% 0%; background-repeat: repeat repeat;">%></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; text-align: justify;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;"><br /></span><br />
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;">By
this we have created a nested master page for the site. Now wee need design the
child master page.</span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: blue; font-size: 9.5pt;"><br /></span><br />
<span style="color: blue; font-size: 9.5pt;"><</span><span style="color: maroon; font-size: 9.5pt;">asp</span><span style="color: blue; font-size: 9.5pt;">:</span><span style="color: maroon; font-size: 9.5pt;">Content</span><span style="font-size: 9.5pt;">
<span style="color: red;">ID</span><span style="color: blue;">="Content1"</span>
<span style="color: red;">ContentPlaceHolderID</span><span style="color: blue;">="ContentPlaceHolder1"</span>
<span style="color: red;">Runat</span><span style="color: blue;">="Server"></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: blue;"><</span><span style="color: maroon;">div</span><span style="color: blue;">></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: blue; font-size: 9.5pt;"><</span><span style="color: maroon; font-size: 9.5pt;">h1</span><span style="color: blue; font-size: 9.5pt;">></span><span style="font-size: 9.5pt;">Image
Slide Show<span style="color: maroon;">h1</span><span style="color: blue;">></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: blue; font-size: 9.5pt;"><</span><span style="color: maroon; font-size: 9.5pt;">h3</span><span style="color: blue; font-size: 9.5pt;">></span><span style="font-size: 9.5pt;">Product's
Show Case:<span style="color: maroon;">h3</span><span style="color: blue;">></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: blue;"><</span><span style="color: maroon;">asp</span><span style="color: blue;">:</span><span style="color: maroon;">Image</span> <span style="color: red;">ID</span><span style="color: blue;">="Image1"</span> <span style="color: red;">runat</span><span style="color: blue;">="server"</span>
<span style="color: red;">ImageUrl</span> <span style="color: blue;">="~/Blue
hills.jpg"</span> <span style="color: red;">Height</span><span style="color: blue;">="173px"</span> </span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">Width</span><span style="color: blue;">="287px"</span>
<span style="color: blue;">/></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: blue;"><</span><span style="color: maroon;">asp</span><span style="color: blue;">:</span><span style="color: maroon;">ContentPlaceHolder</span>
<span style="color: red;">ID</span><span style="color: blue;">="ContentPlaceHolder1"</span>
<span style="color: red;">runat</span><span style="color: blue;">="server"></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: maroon;">asp</span><span style="color: blue;">:</span><span style="color: maroon;">ContentPlaceHolder</span><span style="color: blue;">></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: maroon; font-size: 9.5pt;">div</span><span style="color: blue; font-size: 9.5pt;">></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: maroon; font-size: 9.5pt;">asp</span><span style="color: blue; font-size: 9.5pt;">:</span><span style="color: maroon; font-size: 9.5pt;">Content</span><span style="color: blue; font-size: 9.5pt;">></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span><br />
<span style="color: blue; font-size: 9.5pt;"><br /></span></div>
<div class="MsoNormal" style="line-height: normal;">
<a href="http://www.blogger.com/blogger.g?blogID=6310810494645086689" name="_Programming_with_Master_Page:"></a><b><span style="font-family: 'Times New Roman', serif; font-size: 13.5pt;">Programming with Master Page:</span></b><br />
<b><span style="font-family: 'Times New Roman', serif; font-size: 13.5pt;"><br /></span></b></div>
<div class="MsoNormal" style="line-height: normal;">
<h2 style="text-align: left;">
<b><span style="font-family: 'Times New Roman', serif; font-size: large;">Activity: Developing a Theme Manager application</span><span style="font-size: large;">.</span></b></h2>
<b><span style="font-family: 'Times New Roman', serif; font-size: 13.5pt;">Creating Page Layout:</span></b></div>
<div class="MsoNormal" style="line-height: normal; text-align: justify;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;">As
we have already seen how to create a master page for our application. We will
start with creating a page layout. We can create a page layout by using
different techniques and tools. We can create the Page Layout by using html and
CSS or by using a web design tool like Photoshop or any other. In our example
we will create a page template by using Html and CSS. We can create a simple
two column page layout by using either div tags of the html or in design view
just by dragging the table from the toolbox. The later one you can try it by yourself,
here we will design the page layout by using div tags and CSS. The following
html code shows you the two column page layout and the design effects for the
layout are applied by using the CSS code as shown below:</span></div>
<div class="MsoNormal" style="line-height: normal;">
<b><span style="font-family: 'Times New Roman', serif; font-size: 12pt;">HTML Layout:</span></b><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"> </span></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;"> </span><span style="color: blue; font-size: 9.5pt;"><</span><span style="color: maroon; font-size: 9.5pt;">div</span><span style="font-size: 9.5pt;"> <span style="color: red;">id</span> <span style="color: blue;">=</span> <span style="color: blue;">"Container"></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: blue;"><</span><span style="color: maroon;">div</span> <span style="color: red;">id</span> <span style="color: blue;">="Container"></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: blue;"><</span><span style="color: maroon;">div</span> <span style="color: red;">id</span><span style="color: blue;">="header"></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: maroon;">div</span><span style="color: blue;">></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: blue;"><</span><span style="color: maroon;">div</span> <span style="color: red;">id</span><span style="color: blue;">="SideBar"></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: maroon;">div</span><span style="color: blue;">></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: blue;"><</span><span style="color: maroon;">div</span> <span style="color: red;">id</span><span style="color: blue;">="Content"></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: maroon;">div</span><span style="color: blue;">></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: blue;"><</span><span style="color: maroon;">div</span> <span style="color: red;">id</span><span style="color: blue;">="Footer"></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: maroon;">div</span><span style="color: blue;">></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: maroon;">div</span><span style="color: blue;">></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;">From the div tags id it is clear
that now we have header, side navigation, content and footer. </span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;">Now by using the following CSS we
can arrange the div’s in the Page. </span></div>
<ol start="1" type="1">
<li class="MsoNormal" style="line-height: normal;"><span style="font-family: 'Times New Roman', serif; font-size: 12pt;">Right click on the solution explorer select add new
item and then select StyleSheet from the pop up window.</span></li>
<li class="MsoNormal" style="line-height: normal;"><span style="font-family: 'Times New Roman', serif; font-size: 12pt;">Name the file as ‘AcquaStyleSheet.css’</span></li>
<li class="MsoNormal" style="line-height: normal;"><span style="font-family: 'Times New Roman', serif; font-size: 12pt;">Copy and paste the below code to your stylesheet.</span></li>
</ol>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCUS7WoXO9zS7OpOhLJiROJLIuIawe7hLEScP-q2E1bcqFJIFh0m2LxuLRqN8_PYoM4udJscHyrS1frv8rAtuJSbD2sF1Ax1ZOXP6M7Q9HGYOWrH4DiNVyYASNrmiWgSMnJk3DsqMEecbT/s1600/AddingStylesheet.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="457" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCUS7WoXO9zS7OpOhLJiROJLIuIawe7hLEScP-q2E1bcqFJIFh0m2LxuLRqN8_PYoM4udJscHyrS1frv8rAtuJSbD2sF1Ax1ZOXP6M7Q9HGYOWrH4DiNVyYASNrmiWgSMnJk3DsqMEecbT/s640/AddingStylesheet.JPG" width="640" /></a></div>
<div align="center" class="MsoNormal" style="line-height: normal; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCUS7WoXO9zS7OpOhLJiROJLIuIawe7hLEScP-q2E1bcqFJIFh0m2LxuLRqN8_PYoM4udJscHyrS1frv8rAtuJSbD2sF1Ax1ZOXP6M7Q9HGYOWrH4DiNVyYASNrmiWgSMnJk3DsqMEecbT/s1600/AddingStylesheet.JPG"><span style="font-family: 'Times New Roman', serif; font-size: 12pt; text-decoration: none;"><br /></span></a><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<b><span style="font-family: 'Times New Roman', serif; font-size: 12pt;">CSS Code:</span></b><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"> </span></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: maroon; font-size: 9.5pt;">body</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">{</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: red;">margin</span>:<span style="color: blue;">20px</span> <span style="color: blue;">20px</span> <span style="color: blue;">20px</span> <span style="color: blue;">20px</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: red;">padding</span>: <span style="color: blue;">0</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: red;">font-family</span>: <span style="color: blue;">Georgia,</span> <span style="color: blue;">Times,</span> <span style="color: blue;">"Times New
Roman",</span> <span style="color: blue;">serif</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: red;">color</span>: <span style="color: blue;">black</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: red;">width</span>: <span style="color: blue;">960px</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: red;">border-right</span>: <span style="color: blue;">1px</span> <span style="color: blue;">solid</span> <span style="color: blue;">black</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: red;">background-color</span>:<span style="color: blue;">#98B3F6</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">}</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: maroon; font-size: 9.5pt;">#header</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">{</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: red;">background-color</span>:<span style="color: blue;">#1B7DCE</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: red;">margin</span>:<span style="color: blue;">10px</span> <span style="color: blue;">10px</span> <span style="color: blue;">0px</span> <span style="color: blue;">10px</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: red;">height</span>:<span style="color: blue;">120px</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: red;">overflow</span>:<span style="color: blue;">hidden</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">}</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: maroon; font-size: 9.5pt;">#SideBar</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">{</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: red;">float</span>: <span style="color: blue;">left</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: red;">width</span>: <span style="color: blue;">160px</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: red;">margin-left</span>: <span style="color: blue;">10px</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: red;">padding-top</span>: <span style="color: blue;">1em</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">height</span>:<span style="color: blue;">900px</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">}</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: maroon; font-size: 9.5pt;">#Content</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">{</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: red;">padding-top</span>: <span style="color: blue;">1em</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: red;">margin</span>: <span style="color: blue;">0</span> <span style="color: blue;">12px</span> <span style="color: blue;">0</span> <span style="color: blue;">180px</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: red;">background-color</span>:<span style="color: blue;">White</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: red;">overflow</span>:<span style="color: blue;">hidden</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">}</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: maroon; font-size: 9.5pt;">#Footer</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">{</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: red;">clear</span>: <span style="color: blue;">both</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: red;">background-color</span>: <span style="color: blue;">#62645C</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: red;">padding-bottom</span>: <span style="color: blue;">1em</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: red;">border-top</span>: <span style="color: blue;">1px</span> <span style="color: blue;">solid</span> <span style="color: blue;">#333</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: red;">padding-left</span>: <span style="color: blue;">200px</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">} </span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;">Now moving further we add some more
common features that we will available through the website, the title, tag-line
and Menu.</span></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<b><span style="font-family: 'Times New Roman', serif; font-size: 12pt;">Title and Tag Line:</span></b><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;">Add the following html code inside
the header div tag which displays the title and tag line of your site.</span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: blue; font-size: 9.5pt;"><</span><span style="color: maroon; font-size: 9.5pt;">h1</span><span style="font-size: 9.5pt;">
<span style="color: red;">class</span> <span style="color: blue;">="Title"></span>Mysite
Title<span style="color: maroon;">h1</span><span style="color: blue;">></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: blue; font-size: 9.5pt;"><</span><span style="color: maroon; font-size: 9.5pt;">span</span><span style="font-size: 9.5pt;">
<span style="color: red;">class</span> <span style="color: blue;">="TagLine"></span>Mysite
Tag LIne<span style="color: maroon;">span</span><span style="color: blue;">></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;">and the css code goes here: </span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: maroon; font-size: 9.5pt;">#header</span><span style="font-size: 9.5pt;">
<span style="color: maroon;">.Title</span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">{</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">color</span>:<span style="color: blue;">White</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">}</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: maroon; font-size: 9.5pt;">#header</span><span style="font-size: 9.5pt;">
<span style="color: maroon;">h1</span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">{</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">margin</span>:<span style="color: blue;">10px</span> <span style="color: blue;">40px</span> <span style="color: blue;">10px</span> <span style="color: blue;">40px</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">}</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: maroon; font-size: 9.5pt;">#header</span><span style="font-size: 9.5pt;">
<span style="color: maroon;">.TagLine</span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">{</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">color</span>:<span style="color: blue;">White</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">margin</span>:<span style="color: blue;">40px</span> <span style="color: blue;">40px</span> <span style="color: blue;">10px</span> <span style="color: blue;">70px</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">}</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<a href="http://www.blogger.com/blogger.g?blogID=6310810494645086689" name="_Creating_the_Navigation_and_Menu_fo"></a><b><span style="font-family: 'Times New Roman', serif; font-size: 13.5pt;">Creating
the Navigation and Menu for the site:</span></b></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;">Asp.Net provides wide range for
control for site navigation you can directly use them for your site or use the
following simple html tags to design the navigation for your site.</span></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<b><span style="font-family: 'Times New Roman', serif; font-size: 12pt;">Designing the Menu:</span></b><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"> </span></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: blue; font-size: 9.5pt;"><</span><span style="color: maroon; font-size: 9.5pt;">ul</span><span style="font-size: 9.5pt;">
<span style="color: red;">class</span> <span style="color: blue;">="Menu"></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: blue; font-size: 9.5pt;"><</span><span style="color: maroon; font-size: 9.5pt;">li</span><span style="color: blue; font-size: 9.5pt;">><</span><span style="color: maroon; font-size: 9.5pt;">a</span><span style="font-size: 9.5pt;"> <span style="color: red;">href</span> <span style="color: blue;">="#"></span>Home<span style="color: maroon;">a</span><span style="color: blue;">></span><span style="color: maroon;">li</span><span style="color: blue;">></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: blue; font-size: 9.5pt;"><</span><span style="color: maroon; font-size: 9.5pt;">li</span><span style="color: blue; font-size: 9.5pt;">><</span><span style="color: maroon; font-size: 9.5pt;">a</span><span style="font-size: 9.5pt;"> <span style="color: red;">href</span> <span style="color: blue;">="#"></span>AboutMe<span style="color: maroon;">a</span><span style="color: blue;">></span><span style="color: maroon;">li</span><span style="color: blue;">></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: blue; font-size: 9.5pt;"><</span><span style="color: maroon; font-size: 9.5pt;">li</span><span style="color: blue; font-size: 9.5pt;">><</span><span style="color: maroon; font-size: 9.5pt;">a</span><span style="font-size: 9.5pt;"> <span style="color: red;">href</span> <span style="color: blue;">="#"></span>Articles<span style="color: maroon;">a</span><span style="color: blue;">></span><span style="color: maroon;">li</span><span style="color: blue;">></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: blue; font-size: 9.5pt;"><</span><span style="color: maroon; font-size: 9.5pt;">li</span><span style="color: blue; font-size: 9.5pt;">><</span><span style="color: maroon; font-size: 9.5pt;">a</span><span style="font-size: 9.5pt;"> <span style="color: red;">href</span> <span style="color: blue;">="#"></span>ContactUs<span style="color: maroon;">a</span><span style="color: blue;">></span><span style="color: maroon;">li</span><span style="color: blue;">></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: maroon; font-size: 9.5pt;">ul</span><span style="color: blue; font-size: 9.5pt;">></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<b><span style="font-family: 'Times New Roman', serif; font-size: 12pt;">CSS Code:</span></b><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"> </span></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: maroon; font-size: 9.5pt;">.Menu</span><span style="font-size: 9.5pt;">
<span style="color: maroon;">li</span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
{</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">display</span>:<span style="color: blue;">inline</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">margin</span>:<span style="color: blue;">0px</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
}</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: maroon; font-size: 9.5pt;">.Menu</span><span style="font-size: 9.5pt;">
<span style="color: maroon;">a</span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
{</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">text-decoration</span>:<span style="color: blue;">none</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">background-color</span>:<span style="color: blue;">Blue</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">padding</span>:<span style="color: blue;">5px</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">color</span>:<span style="color: blue;">White</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">border-right</span>:<span style="color: blue;">4px</span>
<span style="color: blue;">solid</span> <span style="color: blue;">Maroon</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">margin</span>:<span style="color: blue;">0px</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">border-left</span>:<span style="color: blue;">none</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
}</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: maroon;">.Menu</span> <span style="color: maroon;">a:hover</span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
{</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">background-color</span>:<span style="color: blue;">Maroon</span>;
<span style="color: red;">padding</span>:<span style="color: blue;">5px</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">border-right</span>:<span style="color: blue;">4px</span>
<span style="color: blue;">solid</span> <span style="color: blue;">Blue</span>; <span style="color: red;">margin</span>:<span style="color: blue;">0px</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
}</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;">Finally you can also apply the css
style for the Grid Control the following css code shown here can be applied to
the Asp.Net Grid Control.</span></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: maroon; font-size: 9.5pt;">.gridAlternatingRowStyle</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
{</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">background-color</span>:<span style="color: blue;">White</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
}</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: maroon;">.gridEditRowStyle</span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
{</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">background-color</span>:<span style="color: blue;">#2461BF</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
}</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: maroon;">.gridFooterStyle</span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
{</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">background-color</span>:<span style="color: blue;">#98B3F6</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">color</span>:<span style="color: blue;">White</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">font-weight</span>:<span style="color: blue;">bold</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
}</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: maroon;">.gridHeaderStyle</span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
{</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">background-color</span>:<span style="color: blue;">#1B7DCE</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">font-weight</span>:<span style="color: blue;">bold</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">color</span>:<span style="color: blue;">White</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
}</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: maroon;">.gridPagerStyle</span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
{</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">background-color</span>:<span style="color: blue;">#98B3F6</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">color</span>:<span style="color: blue;">White</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">text-align</span>:<span style="color: blue;">center</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">margin</span>:<span style="color: blue;">20px</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">border</span>:<span style="color: blue;">1px</span> <span style="color: blue;">solid</span> <span style="color: blue;">black</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">background-image</span>:<span style="color: blue;">url(Images/abc.gif)</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
}</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: maroon;">.gridRowStyle</span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
{</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">background-color</span>:<span style="color: blue;">#EFF3FB</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
}</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: maroon;">.gridSelectedRowStyle</span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
{</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">background-color</span>:<span style="color: blue;">#D1DDF1</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">color</span>:<span style="color: blue;">#333333</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
}</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: maroon;">.grid</span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
{</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">border</span>:<span style="color: blue;">none</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">width</span>:<span style="color: blue;">100%</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
}</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<b><span style="font-family: 'Times New Roman', serif; font-size: 12pt;">The Grid View code goes here:</span></b><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"> </span></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: blue; font-size: 9.5pt;"> <</span><span style="color: maroon; font-size: 9.5pt;">EditRowStyle</span><span style="font-size: 9.5pt;">
<span style="color: red;">CssClass</span> <span style="color: blue;">="gridEditRowStyle"</span>
<span style="color: blue;">/></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: blue;"><</span><span style="color: maroon;">FooterStyle</span>
<span style="color: red;">CssClass</span><span style="color: blue;">="gridFooterStyle"</span>
<span style="color: blue;">/></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: blue;"><</span><span style="color: maroon;">HeaderStyle</span>
<span style="color: red;">CssClass</span> <span style="color: blue;">="gridHeaderStyle"</span>
<span style="color: blue;">/></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: blue;"><</span><span style="color: maroon;">PagerStyle</span>
<span style="color: red;">CssClass</span><span style="color: blue;">="gridPagerStyle"</span>
<span style="color: blue;">/></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: blue;"><</span><span style="color: maroon;">RowStyle</span> <span style="color: red;">CssClass</span> <span style="color: blue;">="gridRowStyle"</span>
<span style="color: blue;">/></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;"> <span style="color: blue;"><</span><span style="color: maroon;">SelectedRowStyle</span>
<span style="color: red;">CssClass</span> <span style="color: blue;">="gridSelectedRowStyle"</span>
<span style="color: blue;">/></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<a href="http://www.blogger.com/blogger.g?blogID=6310810494645086689" name="_Using_Skin_File_to_apply_style:"></a><b><span style="font-family: 'Times New Roman', serif; font-size: 13.5pt;">Using
Skin File to apply style:</span></b></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;">Using skin file you can apply styles
to the server controls. The following samples show the usage of a skin file.
The code in skin file is same as the server control syntax except that id
attribute is eliminated for the control.</span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: blue; font-size: 9.5pt;"><</span><span style="color: maroon; font-size: 9.5pt;">asp</span><span style="color: blue; font-size: 9.5pt;">:</span><span style="color: maroon; font-size: 9.5pt;">TextBox</span><span style="font-size: 9.5pt;">
<span style="color: red;">ID</span><span style="color: blue;">="TextBox1"</span>
<span style="color: red;">runat</span><span style="color: blue;">="server"</span>
<span style="color: red;">BorderColor</span><span style="color: blue;">="#FFFFB7"</span>
<span style="color: red;">Width</span><span style="color: blue;">="288px"></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: maroon; font-size: 9.5pt;">asp</span><span style="color: blue; font-size: 9.5pt;">:</span><span style="color: maroon; font-size: 9.5pt;">TextBox</span><span style="color: blue; font-size: 9.5pt;">></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: blue; font-size: 9.5pt;"><</span><span style="color: maroon; font-size: 9.5pt;">asp</span><span style="color: blue; font-size: 9.5pt;">:</span><span style="color: maroon; font-size: 9.5pt;">Button</span><span style="font-size: 9.5pt;">
<span style="color: red;">ID</span><span style="color: blue;">="Button1"</span>
<span style="color: red;">runat</span><span style="color: blue;">="server"</span>
<span style="color: red;">BackColor</span><span style="color: blue;">="#FF9933"</span>
<span style="color: red;">ForeColor</span><span style="color: blue;">="White"</span>
<span style="color: red;">Text</span><span style="color: blue;">="Button"</span>
<span style="color: red;">Width</span><span style="color: blue;">="119px"</span>
<span style="color: blue;">/></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: blue; font-size: 9.5pt;"><</span><span style="color: maroon; font-size: 9.5pt;">asp</span><span style="color: blue; font-size: 9.5pt;">:</span><span style="color: maroon; font-size: 9.5pt;">GridView</span><span style="font-size: 9.5pt;">
<span style="color: red;">ID</span><span style="color: blue;">="GridView1"</span>
<span style="color: red;">runat</span><span style="color: blue;">="server"</span>
<span style="color: red;">CellPadding</span><span style="color: blue;">="4"</span>
<span style="color: red;">ForeColor</span><span style="color: blue;">="#333333"</span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">GridLines</span><span style="color: blue;">="None"></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: blue;"><</span><span style="color: maroon;">AlternatingRowStyle</span>
<span style="color: red;">BackColor</span><span style="color: blue;">="White"</span>
<span style="color: blue;">/></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: blue;"><</span><span style="color: maroon;">FooterStyle</span>
<span style="color: red;">BackColor</span><span style="color: blue;">="#990000"</span>
<span style="color: red;">Font-Bold</span><span style="color: blue;">="True"</span>
<span style="color: red;">ForeColor</span><span style="color: blue;">="White"</span>
<span style="color: blue;">/></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: blue;"><</span><span style="color: maroon;">HeaderStyle</span>
<span style="color: red;">BackColor</span><span style="color: blue;">="#1B7DCE"</span>
<span style="color: red;">Font-Bold</span><span style="color: blue;">="True"</span>
<span style="color: red;">ForeColor</span><span style="color: blue;">="White"</span>
<span style="color: blue;">/></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: blue;"><</span><span style="color: maroon;">PagerStyle</span>
<span style="color: red;">BackColor</span><span style="color: blue;">="#98B3F6"</span>
<span style="color: red;">ForeColor</span><span style="color: blue;">="#333333"</span>
<span style="color: red;">HorizontalAlign</span><span style="color: blue;">="Center"</span>
<span style="color: blue;">/></span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: blue;"><</span><span style="color: maroon;">RowStyle</span>
<span style="color: red;">BackColor</span><span style="color: blue;">="#EFF3FB"</span>
<span style="color: red;">ForeColor</span><span style="color: blue;">="#333333"</span>
<span style="color: blue;">/></span> </span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: maroon; font-size: 9.5pt;">asp</span><span style="color: blue; font-size: 9.5pt;">:</span><span style="color: maroon; font-size: 9.5pt;">GridView</span><span style="color: blue; font-size: 9.5pt;">></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<b><span style="font-family: 'Times New Roman', serif; font-size: 12pt;">Adding Some Style for home
Page(Content Pages):</span></b><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<b><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"> </span></b><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"> </span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;">As we have seen how to use the skin
files. Now in our application we will add Feedback form using the above skin
file styles. The above style defined for textboxe and button will be applied to
all the controls in our Feedback form. But if we want to be more specific for
each individual textboxes we can use the SkinID property in the skin file for
the controls as shown below: </span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;">Coming back again we'll define some
more style in the css page for "Quotes" and "Images".</span></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<b><span style="font-family: 'Times New Roman', serif; font-size: 12pt;">The following code shows the code
for Displaying Images.</span></b><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"> </span></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: maroon; font-size: 9.5pt;">.imagecells</span><span style="font-size: 9.5pt;">
<span style="color: maroon;">img</span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
{</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">width</span>:<span style="color: blue;">140px</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">height</span>:<span style="color: blue;">100px</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">border</span>:<span style="color: blue;">2px</span> <span style="color: blue;">solid</span> <span style="color: blue;">Gray</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">padding</span>:<span style="color: blue;">15px</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">margin</span>:<span style="color: blue;">15px</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">background-color</span>:<span style="color: blue;">#98B3F6</span>;
</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">border-style</span>:<span style="color: blue;">inset</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
}</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<b><span style="font-family: 'Times New Roman', serif; font-size: 12pt;">The following css can be used to
display quotations.</span></b><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"> </span></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: maroon; font-size: 9.5pt;">.quotehomepage</span><span style="font-size: 9.5pt;"> <span style="color: maroon;">blockquote</span> {</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">font</span>: <span style="color: blue;">italic</span> <span style="color: blue;">1em/1.6em</span> <span style="color: blue;">Georgia,</span> <span style="color: blue;">"Times New Roman",</span> <span style="color: blue;">Times,</span>
<span style="color: blue;">serif</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">width</span>: <span style="color: blue;">300px</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">background</span>: <span style="color: blue;">url(/ThemeManager/Images/closequote.gif)</span>
<span style="color: blue;">no-repeat</span> <span style="color: blue;">right</span>
<span style="color: blue;">bottom</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">padding-left</span>: <span style="color: blue;">18px</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">text-indent</span>: <span style="color: blue;">-18px</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">float</span>: <span style="color: blue;">right</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">margin</span>: <span style="color: blue;">20px</span> <span style="color: blue;">0</span> <span style="color: blue;">10px</span> <span style="color: blue;">10px</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">color</span>: <span style="color: blue;">#999999</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">}</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="color: maroon; font-size: 9.5pt;">.quotehomepage</span><span style="font-size: 9.5pt;"> <span style="color: maroon;">blockquote:first-letter</span> {</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">background</span>: <span style="color: blue;">url(/ThemeManager/Images/openquote.gif)</span>
<span style="color: blue;">no-repeat</span> <span style="color: blue;">left</span> <span style="color: blue;">top</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">padding-left</span>: <span style="color: blue;">18px</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">font</span>: <span style="color: blue;">italic</span> <span style="color: blue;">1.4em</span> <span style="color: blue;">Georgia,</span> <span style="color: blue;">"Times New Roman",</span> <span style="color: blue;">Times,</span>
<span style="color: blue;">serif</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">}</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<b><span style="font-family: 'Times New Roman', serif; font-size: 12pt;">We can define styles for the span
tag which can be used to highlight the elements</span></b><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"> </span></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: maroon;">.welcome</span> <span style="color: maroon;">span</span></span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
{</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
<span style="color: red;">color</span>:<span style="color: blue;">#98B3F6</span>;</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-size: 9.5pt;">
}</span><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<a href="http://www.blogger.com/blogger.g?blogID=6310810494645086689" name="_Themes_in_Asp.Net:"></a><b><span style="font-family: 'Times New Roman', serif; font-size: 13.5pt;">Themes in Asp.Net:</span></b></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;">The styles we have created till now
can be applied as a theme for the application. We can create more css styles,
as the one we have created above and we can allow the user to select one.
Asp.net provides you a flexible way to achieve this. Follow the below steps to
create themes in your application: The theme folder consists of the Skin files
and Cascading Style sheets.</span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoWbySQRmh0C9OTJi4wiGsWk42T3WCAqFWtXyE_3WwN6nzam7Br3D5p5oo3Pwvm7HAuuT8zGvePl88RE9LxX8MEnFkIBf7_uWrsKwOeUe9T_ceYviUyNS2xS3uz_mwQ0dkC2qq7UCUiaLr/s1600/ThemeFolder.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="252" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoWbySQRmh0C9OTJi4wiGsWk42T3WCAqFWtXyE_3WwN6nzam7Br3D5p5oo3Pwvm7HAuuT8zGvePl88RE9LxX8MEnFkIBf7_uWrsKwOeUe9T_ceYviUyNS2xS3uz_mwQ0dkC2qq7UCUiaLr/s400/ThemeFolder.JPG" width="400" /></a></div>
<div align="center" class="MsoNormal" style="line-height: normal; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoWbySQRmh0C9OTJi4wiGsWk42T3WCAqFWtXyE_3WwN6nzam7Br3D5p5oo3Pwvm7HAuuT8zGvePl88RE9LxX8MEnFkIBf7_uWrsKwOeUe9T_ceYviUyNS2xS3uz_mwQ0dkC2qq7UCUiaLr/s1600/ThemeFolder.JPG"><span style="font-family: 'Times New Roman', serif; font-size: 12pt; text-decoration: none;"><br /></span></a><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;">As we have seen how to create a
style sheets and skin files now we will see how to use them for themes. The
Skin files allow you to apply styles same as the cascading style for the
application. You can apply styles to the site by either using css style sheet
or skin file or both. Mainly you can use the skin file to apply styles to the
server control.</span></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<b><span style="font-family: 'Times New Roman', serif; font-size: 12pt;">Adding Themes Folder:</span></b><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"> </span></div>
<ol start="1" type="1">
<li class="MsoNormal" style="line-height: normal;"><span style="font-family: 'Times New Roman', serif; font-size: 12pt;">Right click on the solution explorer and then select
'Add Asp.Net Folder' and then select 'Theme'. This adds the Theme Folder
to the application</span></li>
<li class="MsoNormal" style="line-height: normal;"><span style="font-family: 'Times New Roman', serif; font-size: 12pt;">In the App_Theme, add a new Theme folder and you can
give your own name for the folder. </span></li>
<li class="MsoNormal" style="line-height: normal;"><span style="font-family: 'Times New Roman', serif; font-size: 12pt;">In the Theme Folder add css and skin files to it.</span></li>
<li class="MsoNormal" style="line-height: normal;"><span style="font-family: 'Times New Roman', serif; font-size: 12pt;">By repeating the above steps you create as many themes
for the application.</span></li>
</ol>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibC5ZjdaqkOLMcJaty1RAzuId6jfbrASZtPaaqVopwHH-v7OXlkptcA5Z8VS1UvPH61XX0nYrSV8uupP8tf8cd2Za39FMJY4wbPs0wxSa5sTLKOuw3P-qYnRyiwugWxzQY5k_mxdFfBtaj/s1600/AddThemeFolder.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibC5ZjdaqkOLMcJaty1RAzuId6jfbrASZtPaaqVopwHH-v7OXlkptcA5Z8VS1UvPH61XX0nYrSV8uupP8tf8cd2Za39FMJY4wbPs0wxSa5sTLKOuw3P-qYnRyiwugWxzQY5k_mxdFfBtaj/s400/AddThemeFolder.JPG" width="365" /></a></div>
<div align="center" class="MsoNormal" style="line-height: normal; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYXZhbW9gExc7MEeymDowQzZLlmZ-kMjMmdP9ABk2daKeIs8v_eBeqFMjPPEbm8q_W3XDvJgcNM4KRqBPv3mbawpZY5f0UZVC7BsSvo962r8G3uioNSU1fzMt55yJ4iZwLUCYeBSZ0vaPq/s1600/AddThemeFolder.JPG"><span style="font-family: 'Times New Roman', serif; font-size: 12pt; text-decoration: none;"><br /></span></a><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<a href="http://www.blogger.com/blogger.g?blogID=6310810494645086689" name="_Theme_Settings:"></a><b><span style="font-family: 'Times New Roman', serif; font-size: 13.5pt;">Theme Settings:</span></b></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;">To apply the theme for the
application, apply the following settings in the web.config.</span></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<b><span style="font-family: 'Times New Roman', serif; font-size: 12pt;">Page Level Settings:</span></b><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"></span></div>
<div class="MsoNormal" style="line-height: normal;">
<b><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"> </span></b><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"> </span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;">To apply the theme settings at the
page level, set the theme attribute to the theme name at the @ page directory
as shown:</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"><%@
Page Title="" Language="C#"
MasterPageFile="~/MasterPage.Master" Theme ="Acqa"</span></div>
<div class="MsoNormal" style="line-height: normal;">
<a href="http://www.blogger.com/blogger.g?blogID=6310810494645086689" name="_Dynamic_Themes:"></a><b><span style="font-family: 'Times New Roman', serif; font-size: 13.5pt;">Dynamic Themes</span></b><b><span style="font-family: 'Times New Roman', serif; font-size: 18pt;">:</span></b></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;">Before I could discuss about the
code for managing dynamic themes. I want you to refer this excellent article
about dynamic themes in code project at the below link:</span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;"><a href="http://www.codeproject.com/Articles/14505/Dynamic-Themes-in-ASP-NET-2-0-C">Dynamic
themes</a> </span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;">Now here we'll see an alternate
method to achieve the same:</span></div>
<div class="MsoNormal" style="line-height: normal;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;">The following code shows you to
select dynamic themes from the available Themes:</span></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<b><span style="font-family: 'Times New Roman', serif; font-size: 12pt;">DropDown Control</span></b><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"> </span></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;">
< asp:DropDownList ID="DropDownList1" runat="server"
AutoPostBack="True" </span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> onselectedindexchanged="DropDownList1_SelectedIndexChanged"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;">
Select Any Theme</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> Acqua</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;">
Marine </span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 12pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> </span>
</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">protected</span><span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">void</span>
DropDownList1_SelectedIndexChanged(<span style="color: blue;">object</span> sender,
<span style="color: #2b91af;">EventArgs</span> e)</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> {</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;">
Configuration config = WebConfigurationManager.OpenWebConfiguration(<span style="color: #a31515;">"~/"</span>);</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: green;">//Get the required section of the web.config file by using
configuration object.</span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> PagesSection
pages = (PagesSection)config.GetSection(<span style="color: #a31515;">"system.web/pages"</span>);</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: green;">//Update the new values.</span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;">
pages.Theme = DropDownList1.SelectedItem.Text.ToString();</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: green;">//save the changes by using Save() method of configuration
object.</span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">if</span>
(!pages.SectionInformation.IsLocked)</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> {</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;">
config.Save();</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;">
Response.Redirect(<span style="color: #a31515;">"Default.aspx"</span>);</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> }</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> <span style="color: blue;">else</span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;"> {</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;">
Response.Write(<span style="color: #a31515;">""</span>);</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 9.5pt;">}</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 12pt;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<b><span style="font-family: 'Courier New'; font-size: 18pt;">Conclusion</span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;">In
this article we have seen about the Master pages and Themes. Hope you</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;">have
enjoyed reading this article and the content in the article has helped in</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 10pt;">your
assignments. Any suggestions or feedback would be appreciated<br />
<br />
</span></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="line-height: normal;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal">
<br /></div>
</div>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-6310810494645086689.post-13973228242107117872011-11-27T09:33:00.000-08:002012-04-01T10:09:46.190-07:00Web.Config File - Asp.Net<div dir="ltr" style="text-align: left;" trbidi="on">
<h2>
Introduction</h2>
The time you start developing your web application until you finish the application,
you will more often use the Web.config file not only for securing your application but also
for wide range of other purposes which it is intended for. Asp.Net Web.config file provide you a
flexible way to handle all you’re requirements at the application level. Despite of simplicity provided by the .Net Framework
to work with web.config working with configuration files would definitely be a task until you understand it clearly.
This could be one of the main reasons, that I have started writing this article.
<br />
This article would be a quick reference for the professional developers and for those who just started programming
in .net, this article would help them to understand the Asp.Net configuration in an efficient way.The Readers may skip
reading section <quote>"Authentication,Authorization, Membership Provider, Role Provider and Profile Provider Settings"</quote>, as most of them are familiar
with those particular settings.<br />
<a name='more'></a>
<br />
<h2>
Background:</h2>
In this article I am going explain about the complete sections and settings available in the Web.config file and how you can configure them to use in the application. In the later section of the article we will see the .Net classes that are used to work with the configuration files. The contents of the articles are summarized below:<br />
<ol>
<li>Web.config sections/settings.</li>
<li>Reading Web.config</li>
<li>Writing or manipulating Web.config </li>
<li>Encrypting the Web.config and </li>
<li>Creating your own Custom Configuration Sections.</li>
</ol>
<h3>
Points To be Remembered:</h3>
Asp.net Web.config allows you to define or revise the configuration settings at the time of developing the application or at the time of deployment or even after deployment. The following are brief points that can be understood about the Web.config file: <br />
<ul>
<li>Web.config files are stored in xml format which makes us easier to work with.</li>
<li>You can have any number of Web.config files for an application. Each Web.config applies settings to its own directory and all the child directories below it.</li>
<li>All the Web.config files inherit the root Web.config file available at the following location
systemroot\Microsoft.NET\Framework\versionNumber\CONFIG\Web.config location</li>
<li>IIS is configured in such a way that it prevents the Web.config file access from the browser.</li>
<li>The changes in Web.config don’t require the reboot of the web server.</li>
</ul>
<h3>
Web.config Settings:</h3>
Before we start working with configuration settings of asp.net we see the hierarchy of the Web.config file.
<br />
<pre><configuration>
<configSections>
<sectionGroup>
</sectionGroup>
</configSections>
<system.web>
</system.web>
<connectionStrings>
</connectionStrings>
<appSettings>
</appSettings>
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
…………………………………………………………………………………………………………
</configuration>
</pre>
So from the above tree structure we can understand that the configuration tag is the root element of the Web.config file under which it has all the remaining sub elements. Each element can have any number of attributes and child elements which specify the values or settings for the given particular section.
To start with we’ll see the working of, some of the most general configuration settings in the Web.config file. <br />
<h2>
system.web:</h2>
In the configuration hierarchy the most common thing we will work with is the system.web section. Now we look at some of the child sections of the system.web section of Web.config file.<br />
<b>Compilation Settings:</b>
<br />
If you are using visual studio 2010, probably the only available section of Web.config file by default is Compilation section. If you want to specify the target framework or if you need to add an assembly from the Global Assembly Cache (GAC) or if you want to enable the debugging mode of the application, you can take Compilation settings as granted for these tasks.
The following code is used to achieve the discussed settings: <br />
<pre><system.web
<compilation
debug="true" strict="true" explicit="true" batch="true"
optimizeCompilations="true" batchTimeout="900"
maxBatchSize="1000" maxBatchGeneratedFileSize="1000"
numRecompilesBeforeAppRestart="15" defaultLanguage="c#"
targetFramework="4.0" assemblyPostProcessorType="">
<assemblies>
<add assembly="System, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089"/>
</assemblies>
</compilation>
<system.web
</pre>
Under the assemblies element you are supposed to mention the type, version, culture and public key token of the assembly. In order to get the public key token of an assembly you need to follow the below mentioned steps:
<br />
<ol>
<li> Go to visual studio tools in the start menu and open the visual studio command prompt.</li>
<li> In the visual studio command prompt change the directory to the location where the assembly or .dll file exists.</li>
<li>Use the following command, sn –T itextsharp.dll</li>
<li>It generates the public key token of the assembly. You should keep one thing in mind that only public key token is generated only for the assemblies which are strongly signed.</li>
</ol>
Example:
<br />
<pre>C:\WINNT\Microsoft.NET\Framework\v3.5> sn -T itextsharp.dll
Microsoft (R) .NET Framework Strong Name Utility Version 3.5.21022.8
Copyright (c) Microsoft Corporation. All rights reserved.
Public key token is badfaf3274934e0
</pre>
Explicit and sample attributes are applicable only to vb.net and C# compiler however ignores these settings.<br />
<b>Page Settings:</b>
<br />
Ok, by this time we have got some familiar with the Web.config file and we have seen the settings of Compilation Sections, now we will see the settings of a page. As a Asp.Net application consists of several number of pages, we
can set the general settings of a page like sessionstate, viewstate, buffer etc., as shown below:<br />
<pre><pages buffer ="true" styleSheetTheme="" theme ="Acqua"
masterPageFile ="MasterPage.master"
enableEventValidation="true">
</pre>
By using the MasterPageFile and theme attributes we can specify the master page and theme for the pages in web application.<br />
<b>Custom Error Settings:</b>
<br />
The next section of Web.config file, we are going to look around is Custom Error settings, by the name itself it is clear that we can configure the settings for the application level errors in these section. Now we will see the description of the customErrors section of the Web.config from the below mentioned code snippet. <br />
<pre> <customErrors defaultRedirect ="Error.aspx" mode ="Off">
<error statusCode ="401" redirect ="Unauthorized.aspx"/>
</customErrors>
</pre>
The customErrors section consists of defaultRedirect and mode attribute which specifies the default redirect page and the on/off mode respectively.
The subsection of customErrors section allows redirecting to specified page depending on the error status code.
400 Bad Request
401 Unauthorized
404 Not Found
408 Request Timeout
For more detailed report of status code list you can refer this url:<br />
<a href="http://en.wikipedia.org/wiki/List_of_HTTP_status_codes">http://en.wikipedia.org/wiki/List_of_HTTP_status_codes</a><br />
<b>Location Settings:</b>
<br />
If you are working with a major project, probably you might have numerous numbers of folders and sub-folders, at this kind of particular situation, you can have two options to work with. First thing to have a Web.config file for each and every folder(s) and Sub-folder(s) and the second one is to have a single Web.config for your entire application. If you're approach is first, then you might be in a smoother way, but what if you a single Web.config and you need to configure the sub-folder or other folder of your application, the right solution is to use the "Location" tag of "system.web" section of Web.config file. However you can use this tag in either of discussed methods.
<br />
The following code shows you to work with Location settings:
<br />
<pre><location path="Login.aspx">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
</pre>
<pre><location path ="Uploads">
<system.web>
<compilation debug = "false">
</system.web>
</location>
</pre>
In the similar way you can configure any kind of available settings for any file/folder using the locaion tag.<br />
<b>Sesion State and View State Settings:</b>
<br />
As we all know that the asp.net is stateless and to maintain the state we need to use the available state management techniques of Asp.Net. View state and session state are among them. For complete information about view state and Session State and how to work with, there are some of the excellent articles in CP, which you can refer here:<br />
<ul>
<li><a href="http://www.codeproject.com/KB/aspnet/state_management_intro.aspx">Beginners Introduction to State Management Techniques in ASP.NET</a></li>
<li><a href="http://www.codeproject.com/KB/session/ExploringSession.aspx">Exploring Session in ASP.NET</a></li>
</ul>
Now we'll see the Web.config settings of View State and Session State:<br />
View State can be enabled or disabled by using the following page settings in the web.config file.<br />
<pre><Pages EnableViewState="false" /></pre>
Sessiton state settings for different modes are as shown below:<br />
<pre><sessionState mode="InProc" />
</pre>
<pre><sessionState mode="StateServer"
stateConnectionString= "tcpip=Yourservername:42424" />
</pre>
<pre><sessionState mode="SQLServer" sqlConnectionString="cnn" />
</pre>
<b>HttpHandler Settings:</b>
<br />
HttpHandler is a code that executes when an http request for a specific resource is made to the server.
For example request an .aspx page the asp.net page handler is executed, similarly if an .asmx file is requested
the Asp.Net service handler is executed. An Http Handler is a component that handles the
asp.net requests at a lower level than Asp.Net is capable of handling.<br />
You can create your own custom http handler, register it with IIS and receive notice whenever a request is made.For doing this,
you just need to create a class which implements IHttpHanlder and then you need to add the following section of configuration settings in
the web.config file. For this Demonstration i have created a sample imagehandler class which display's an jpg image
to the browser.You can go through the imagehandler class code in the sample download code.
<br />
<pre><httpHandlers>
<add verb="*" path="*.jpg" type="ImageHandler"/>
<add verb="*" path="*.gif" type="ImageHandler"/>
</httpHandlers/>
</pre>
<b>HttpModule Settings:</b>
<br />
HttpModule is a class or an assembly that implements the IHttpModule interface that handles the application events or user events. You can too create
your own custom HttpModule by implementing the interface and configure it with ISS. The following settings shows the HttpModules configuration in the web.config<br />
<pre><httpModules />
<add type ="TwCustomHandler.ImageHandler"
name ="TwCustomHandler"/>
<remove name ="TwCustomHandler"/>
<clear />
</httpModules/>
</pre>
<b>Authentication,Authorization, Membership Provider, Role Provider and Profile Provider Settings:</b>
<br />
These settings are directly available in the web.config file if you have created the Asp.Net applicaiton by using the Visual Studio 2010.
I'm not going to elobarate them as there are lot of articles in CP describing the functionality and use of these settings and for further information you can refer
them.
Some of the links are here:<br />
<ul>
<li><a href="http://www.codeproject.com/KB/aspnet/MembershipRoleProvider.aspx">ASP.NET Membership and Role Provider</a></li>
<li><a href="http://www.codeproject.com/KB/aspnet/customaspnetproviders.aspx">Developing custom ASP.NET Membership and Role providers reading users from custom section in the web.config</a></li>
<li><a href="http://www.codeproject.com/KB/aspnet/ASPNETMembership.aspx">ASP.NET Membership</a></li>
<li><a href="http://www.codeproject.com/KB/database/mysqlmembershipprovider.aspx">Membership and Role providers for MySQL</a></li>
<li><a href="http://www.codeproject.com/KB/aspnet/innovative_rolebased_WAT.aspx">Custom Membership, Role Providers, Website administration tool, and Role based access to individual files</a></li>
</ul>
<b>Authenticaiton Settings:</b>
<br />
<pre> <authentication mode="Forms">
<forms cookieless="UseCookies" defaultUrl="HomePage.aspx"
loginUrl="UnAuthorized.aspx" protection="All" timeout="30">
</forms>
</authentication>
</pre>
<b>Authorization Settings:</b>
<br />
<pre><authorization
<allow roles ="Admin"/>
<deny users ="*"/>
</authorization>
</pre>
<b>Membership Provider Settings:</b>
<br />
<pre><membership defaultProvider="Demo_MemberShipProvider">
<providers>
<add name="Demo_MemberShipProvider"
type="System.Web.Security.SqlMembershipProvider"
connectionStringName="cnn"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="true"
applicationName="/"
requiresUniqueEmail="false"
passwordFormat="Hashed"
maxInvalidPasswordAttempts="5"
minRequiredPasswordLength="5"
minRequiredNonalphanumericCharacters="0"
passwordAttemptWindow="10" passwordStrengthRegularExpression="">
</providers>
</membership>
</pre>
<b>Role Provider Settings:</b>
<br />
<pre><roleManager enabled="true" cacheRolesInCookie="true"
cookieName="TBHROLES" defaultProvider="Demo_RoleProvider">
<providers>
<add connectionStringName="dld_connectionstring"
applicationName="/" name="Demo_RoleProvider"
type="System.Web.Security.SqlRoleProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
</roleManager>
</pre>
<b>Profile Provider Settings:</b>
<br />
<pre>
<profile defaultProvider="Demo_ProfileProvider">
<providers>
<add name="Demo_ProfileProvider" connectionStringName="cnn"
applicationName="/" type="System.Web.Profile.SqlProfileProvider,
System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
<properties>
<add name="Name" type="String"/>
<add name="DateofBirth" type="DateTime"/>
<add name="Place" type="string"/>
</properties>
</profile>
</pre>
<h2>
AppSettings:</h2>
In the above section we have seen the settings available in system.web tag, now we will see the available settings in appSettings Section.<br />
appSettings element helps us to store the application settings information like connection strings, file paths, url’s, port numbers, custom key value pairs etc.,.<br />
The following code snippet shows the example of appSettings Section:<br />
<pre><appSettings>
<add key="AppKey" value="APLJI12345AFAFAF89999BDFG"/>
</appSettings>
</pre>
<h2>
connectionStrings:</h2>
The most common section of web.config file the connectionStrings sections allows you to store
multiple connection strings that
are used in the application.The connectionStrings tag consists of child element with attributes name and connectionstring which is used to identify the connectionstring and the other is used to connect to the database server respectively.<br />
The general connectionstring settings are shown below:
<br />
<pre> <connectionStrings>
<add name ="cnn" connectionString ="Intial Catalog = master; Data Source =localhost; Integrated Security = true"/>
</connectionStrings>
</pre>
<h2>
ConfigSections:</h2>
ConfigSections helps you to create your own custom configuration section that can be used with the web.config file. We look at this in the later section of the article, for time being we can have look at the configsection settings.ConfigSections should be declared just below the configuration(parent element) otherwise it is going through you an error.<br />
<pre><configSections>
<sectionGroup name="pageAppearanceGroup">
<section
name="pageAppearance"
type="PageAppearanceSection"
allowLocation="true"
allowDefinition="Everywhere"
/>
</sectionGroup>
</configSections>
</pre>
<h2>
Programmatically Accessing the Web.config file: </h2>
We can use the csharp classes to read and write the values to the Web.config file.<br />
<b>Reading appSettings values:</b><br />
The following code is used to read the appSettings values from Web.config file. You can use either of the methods shown below:<br />
<pre>//Method 1:
string key = ConfigurationManager.AppSettings["AppKey"];
Response.Write(key);
//Method 2:
Configuration config = WebConfigurationManager.OpenWebConfiguration("~/");
KeyValueConfigurationElement Appsetting = config.AppSettings.Settings["AppKey"];
Response.Write(Appsetting.Key + " <br/>" + "Value:" + Appsetting.Value);
</pre>
<b>Reading connectionstring values:</b><br />
The following code is used to read the
connectionstring values from Web.config file. You can use either of the methods shown below:<br />
<pre>//Method 1:
string cnn = ConfigurationManager.ConnectionStrings["conn"].ConnectionString;
//Methods 2:
Configuration config = WebConfigurationManager.OpenWebConfiguration("~/");
ConnectionStringSettings cnnstring;
if (config.ConnectionStrings.ConnectionStrings.Count > 0)
{
cnnstring = config.ConnectionStrings.ConnectionStrings["conn"];
if (cnnstring != null)
Response.Write("ConnectionString:" + cnnstring.ConnectionString);
else
Response.Write(" No connection string");
}
</pre>
<b>Reading configuration section values:</b><br />
The following code is used to read the configuration section values from Web.config file. The comments in the code will help you to understand the code:<br />
<pre> // Intialize System.Configuration object.
Configuration config = WebConfigurationManager.OpenWebConfiguration("~/");
//Get the required section of the web.config file by using configuratoin object.
CompilationSection compilation = (CompilationSection)config.GetSection("system.web/compilation");
//Access the properties of the web.config
Response.Write("Debug:"+compilation.Debug+"<br/>""+"Language:"+compilation.DefaultLanguage);
</pre>
<b>Update the configuration section values:</b>
<br />
The following code is used to read the configuration section values from Web.config file: <br />
<pre> Configuration config = WebConfigurationManager.OpenWebConfiguration("~/");
//Get the required section of the web.config file by using configuratoin object.
CompilationSection compilation = (CompilationSection)config.GetSection("system.web/compilation");
//Update the new values.
compilation.Debug = true;
//save the changes by using Save() method of configuration object.
if (!compilation.SectionInformation.IsLocked)
{
config.Save();
Response.Write("New Compliation Debug"+compilation.Debug);
}
else
{
Response.Write("Could not save configuration.");
}
</pre>
<h2>
Encrypt Configuration Sections of Web.config File: </h2>
As
<span lang="EN" style="font-family: Calibri, sans-serif; font-size: 11pt; line-height: 115%;">we </span>have already discussed that IIS is configured in such a way that it do not serve the Web.Config to browser, but even in some such situation to provide more security you can encrypt some of the sections of web.config file. The
following code shows you the way to encrypt the sections of web.config file: <br />
<pre> Configuration config = WebConfigurationManager.OpenWebConfiguration(Request.ApplicationPath);
ConfigurationSection appSettings = config.GetSection("appSettings");
if (appSettings.SectionInformation.IsProtected)
{
appSettings.SectionInformation.UnprotectSection();
}
else
{
appSettings.SectionInformation.ProtectSection("DataProtectionConfigurationProvider");
}
config.Save();
</pre>
<h2>
Custom Configuration Section in Web.config:</h2>
I have thought twice before I could put this section of content in this article, as there is numerous numbers of wonderful articles explaining this topic, but just to make this article as complete I have included this topic too.,<br />
<b>Create Custom Configuration Section:</b>
<br />
The ConfigurationSection class helps us to extend the Web.config file in order to full fill our requirements. In order to have a custom configuration section, we need to follow the below steps:<br />
Before actually we start working with, we will have a look at the section settings. We need to have a ProductSection element with child elements girdSettings and color. For this purpose we will create two classes with the child elements which inherits ConfigurationElement as shown below:<br />
<pre>
public class GridElement : ConfigurationElement
{
[ConfigurationProperty("title", DefaultValue = "Arial", IsRequired = true)]
[StringValidator(InvalidCharacters = "~!@#$%^&*()[]{}/;'\"|\\", MinLength = 1, MaxLength = 60)]
public String Title
{
get
{
return (String)this["title"];
}
set
{
this["title"] = value;
}
}
[ConfigurationProperty("count", DefaultValue = "10", IsRequired = false)]
[IntegerValidator(ExcludeRange = false, MaxValue = 30, MinValue = 5)]
public int Count
{
get
{ return (int)this["count"]; }
set
{ this["size"] = value; }
}
}
public class ColorElement : ConfigurationElement
{
[ConfigurationProperty("background", DefaultValue = "FFFFFF", IsRequired = true)]
[StringValidator(InvalidCharacters = "~!@#$%^&*()[]{}/;'\"|\\GHIJKLMNOPQRSTUVWXYZ", MinLength = 6, MaxLength = 6)]
public String Background
{
get
{
return (String)this["background"];
}
set
{
this["background"] = value;
}
}
[ConfigurationProperty("foreground", DefaultValue = "000000", IsRequired = true)]
[StringValidator(InvalidCharacters = "~!@#$%^&*()[]{}/;'\"|\\GHIJKLMNOPQRSTUVWXYZ", MinLength = 6, MaxLength = 6)]
public String Foreground
{
get
{
return (String)this["foreground"];
}
set
{
this["foreground"] = value;
}
}
}
</pre>
...and then we will create a class called ProdcutSection, for the root element which
<span lang="EN" style="font-family: Calibri, sans-serif; font-size: 11pt; line-height: 115%;">includes </span>the above child elements<br />
<pre>public class ProductSection : ConfigurationSection
{
[ConfigurationProperty("gridSettings")]
public GridElement gridSettings
{
get
{
return (GridElement)this["gridSettings"];
}
set
{ this["gridSettings"] = value; }
}
// Create a "color element."
[ConfigurationProperty("color")]
public ColorElement Color
{
get
{
return (ColorElement)this["color"];
}
set
{ this["color"] = value; }
}
}
</pre>
Then finally we will configure these elements in Web.config file as shown below:<br />
<pre> <configSections>
<section name ="ProductSection" type ="<ProductSection"/>
</configSections>
<ProductSection>
<gridSettings title ="Latest Products" count ="20"></gridSettings>
<color background="FFFFCC" foreground="FFFFFF"></color>
</ProductSection>
</pre>
<b>Access Custom Configuration Section: </b>
<br />
The following code is used to acess the custom configuration section:<br />
<pre> ProductSection config = (ProductSection)ConfigurationManager.GetSection("ProductSection");
string color =config.Color.Background;
string title =config.gridSettings.Title;
int count = config.gridSettings.Count;
</pre>
<h2>
Conclusion:</h2>
In this article we have learned about the asp.net configuration file and we have seen almost all the available and
frequently used settings of web.config file. I hope you enjoyed reading this article and this article might have
helped you in completing your tasks in some way. Any comments, suggestions and feedback
<span lang="EN" style="font-family: Calibri, sans-serif; font-size: 11pt; line-height: 115%;">are </span>always welcome, which helps me
to write more articles and improve the way<span lang="EN" style="font-family: Calibri, sans-serif; font-size: 11pt; line-height: 115%;"> I </span> present the aritlces.</div>Anonymoushttp://www.blogger.com/profile/12208411882007072995noreply@blogger.com0tag:blogger.com,1999:blog-6310810494645086689.post-35499269397054149922011-11-09T10:39:00.001-08:002011-11-23T05:54:22.956-08:00Asp.Net Profile Provider<div dir="ltr" style="text-align: left;" trbidi="on">
<h2>
Introduction</h2>
In the Article "Asp.Net MemberShip and Role Provider.", We have seen how to conigure and
use the in built Sql Server MemberShip Provider. In this continuation article, we
will see the usage of SqlProfileProvider. In any application if you want to store the user information other than the Registration details
like their address,user's interest, themes etc., you can use the SqlProfileProvider.
<br />
<h3>
Implementing the SqlProfileProvider:</h3>
The Profile provider can be configured to the application by using the following settings in the web.config file.
<br />
<h3>
<a name='more'></a>ProfileProvider Settings:</h3>
The Profile provider settings are simple and striaght forward, the elements include the name of the profile provider and the properties of the profile which are to be stored. You can also use the group property of the profile provider in order to the group the elements.:
<br />
<pre>
<profile defaultProvider="Demo_ProfileProvider">
<providers>
<add name="Demo_ProfileProvider" connectionStringName="cnn"
applicationName="/" type="System.Web.Profile.SqlProfileProvider,
System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
<properties>
<add name="Name" type="String"/>
<add name="DateofBirth" type="DateTime"/>
<add name="Place" type="string"/>
<add name="Languages" type="string"/>
<add name="AboutMe" type="String"/>
<add name="Employer" type="String"/>
<add name="Project" type="String"/>
<add name="Designation" type="String"/>
<add name="University" type="String"/>
</properties>
</profile>
</pre>
<h3>
Using the Profile profile properies to Save User Profiles:</h3>
The following code is used to save the users profiles.Profile.Save() method updates the profile data source with changed profile property values.<br />
<pre> public void SaveProfile()
{
Profile.Name = txtfullname.Text;
Profile.DateofBirth = Convert.ToDateTime(txtdateofbirth.Text);
Profile.AboutMe = txtaboutme.Text;
Profile.Designation = txtdesignation.Text;
Profile.Employer = txtemployer.Text;
Profile.Languages = txtlanguages.Text;
Profile.Place = txtplace.Text;
Profile.Project = txtproject.Text;
Profile.University = txtusername.Text;
Profile.Save();
}
</pre>
<h2>
Points of Interest:</h2>
In order to save the profiles of user. You can Customize the Create User Wizard contorl or you can use custom create user wizard.
One type of creat user wizard which is developed using javascript is attached with source code. You can find more informatin about the
create user wizard in the following article "Java script Create User Wizard for Asp.Net ".<br />
<h2>
Conclusion:</h2>
In this article we have seen a brief description about how to implement Profile provider and how we can use the profile properties in our application.
You can find some more information about profile provider and their properties at the below MSDN Links.<br />
<b>External Resources:</b><br />
<a href="http://msdn.microsoft.com/en-us/library/014bec1k.aspx">http://msdn.microsoft.com/en-us/library/014bec1k.aspx</a><br />
<a href="http://msdn.microsoft.com/en-us/library/0580x1f5.aspx">http://msdn.microsoft.com/en-us/library/0580x1f5.aspx</a></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6310810494645086689.post-2633887352684637982011-11-09T10:34:00.000-08:002012-04-01T10:10:28.021-07:00Asp.Net Membership and Role Provider<div dir="ltr" style="text-align: left;" trbidi="on">
<h2>
Introduction</h2>
Asp.Net 2.0 provides built in controls to manage Membership in Web Applications. All these controls use Asp.Net providers that are loaded via web.config file. Membership provider and Role provider allows a complete system to maintain users information, authenticate and authorize the users. This article demonstrates how to use and configure the default Member ship and Role provider.<br />
<a name='more'></a> <br />
<h3>
Implementing the Membership and Role provider:</h3>
Initially by using the visual studio 2005/2008/2010, create an Asp.Net website/web application. If u r using Visual studio 2010. Login and Registration pages are available by default in the application. Create Registration page and then drag the Create User Wizard control from the Login controls section of the Toolbox. Now to store the user information we need to create the database in the SQL Server. Follow the following steps to use built in user store schema for maintaining the user information.<br />
<ol>
<li>Go to Visual Studio, Visual Studio tools and then open the Visual Studio Command Prompt.</li>
<li>Use the aspnet_regsql.exe command to run the ASP.NET SQL Server Setup Wizard.</li>
<li>Check the option “Configure SQL Server for application services”. </li>
<li>Select the Server Instance and the database name for the application, if the database name is not provided default aspnetdb database is created.</li>
<li>Click the confirm settings and finish button to create the database store.</li>
</ol>
Preparing to build the security system for use in application, we need to configure the membership provider in web.config file. The following settings for Forms Authentication, Membership and Role provider are applied in the web.config file.<br />
<h3>
Forms Authentication Settings:</h3>
<br />
The authentication mode under system.web tag is set to “Forms” and the elements included in are loginUrl, defaultUrl, timeout, cookieless and protection which specifies the login page url, default page url, cookie expiration time and protection level respectively. The settings in web.config file would look similar to code shown below:
<br />
<pre> <authentication mode="Forms">
<forms cookieless="UseCookies" defaultUrl="HomePage.aspx"
loginUrl="UnAuthorized.aspx" protection="All" timeout="30">
</forms>
</authentication>
</pre>
<h3>
Membership Provider settings:</h3>
<br />
Some of the important elements to be considered in the Membership provider are name – name of the provider, type – namespace of the provider, connectionStringName – name of the connectionstring and the most important password format. The password format is available in three formats, Hashed, Encrypted and Clear. Hashed format provides one way of storing password in encrypted format which cannot be brought back to original state, whereas Encrypted format provides both to encrypt and decrypt the password.
<br />
<pre><membership defaultProvider="Demo_MemberShipProvider">
<providers>
<add name="Demo_MemberShipProvider"
type="System.Web.Security.SqlMembershipProvider"
connectionStringName="cnn"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="true"
applicationName="/"
requiresUniqueEmail="false"
passwordFormat="Hashed"
maxInvalidPasswordAttempts="5"
minRequiredPasswordLength="5"
minRequiredNonalphanumericCharacters="0"
passwordAttemptWindow="10" passwordStrengthRegularExpression="">
</providers>
</membership></pre>
<h3>
Role provider settings:</h3>
<br />
The similar way is to specify the settings for default Provider under system.web tag of the web.config file as shown below. The settings are simple and self explanatory.
<br />
<pre>>
<roleManager enabled="true" cacheRolesInCookie="true" cookieName="TBHROLES"
defaultProvider="TBH_RoleProvider">
<providers>
<add connectionStringName="dld_connectionstring"
applicationName="/" name="TBH_RoleProvider"
type="System.Web.Security.SqlRoleProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
</roleManager></pre>
In the login.aspx and Registration.aspx pages , we need use the providers to complete the membership system for the application. <br />
<br />
<h3>
Registering The Users</h3>
Registration page for the users can be easily created by using the available create user wizard and the following event handlers:
<br />
<pre>
protected void CreateUserWizard1_CreatedUser(object sender, EventArgs e)
{
MembershipCreateStatus p = MembershipCreateStatus.Success;
Membership.CreateUser(CreateUserWizard1.UserName,
CreateUserWizard1.Password, CreateUserWizard1.Email,
CreateUserWizard1.Question, CreateUserWizard1.Answer, true, out p);
}
protected void CreateUserWizard1_ContinueButtonClick(object sender, EventArgs e)
{
Response.Redirect("login.aspx");
}
</pre>
<h3>
Authenticate the Users:</h3>
The users can be authenticated by using the login_Authenticate event of the Login control. The code to authenticate users goes here:<br />
<pre> protected void Login1_Authenticate(object sender,AuthenticateEventArgs e)
{
if (Membership.ValidateUser(Login1.UserName, Login1.Password) == true)
{
Login1.Visible = true;
Session["user"] = User.Identity.Name;
FormsAuthentication.RedirectFromLoginPage(Login1.UserName, true);
}
else
{
Response.Write("Invalid Login");
}
}</pre>
<h3>
Creating the Admin Panel:</h3>
In the Admin Panel the features to Add, Edit, Delete and Assign Roles to users are provided to the administrator.
Creating the roles:
The following codesnippet shows u to create Roles<br />
<pre> Public void createRoles()
{
try
{
if (!Roles.RoleExists(txtrolename.Text))
{
Roles.CreateRole(txtrolename.Text);
BindUsers();
BindRoles();
Label1.Text = "Role(s) Created Successfully";
}
else
{
Label1.Text = "Role(s) Already Exists";
}
}
catch (Exception ex)
{
Label1.Text = ex.Message;
}
}</pre>
<b>BindRoles:</b>
The BindRoles method is used to bind the available roles in the store to the user control.<br />
<pre>public void BindRoles()
{
SqlDataAdapter da = new SqlDataAdapter("select RoleName from aspnet_Roles", cnn);
DataSet ds = new DataSet();
da.Fill(ds, "Roles");
lstRoles.DataSource = ds;
lstRoles.DataTextField = "RoleName";
lstRoles.DataValueField = "RoleName";
lstRoles.DataBind();
}</pre>
<b>BindUsers:</b>
<br />
The BindUsers method is used to bind the available users in the store to the user control.<br />
<pre>public void BindUsers()
{
SqlDataAdapter da = new SqlDataAdapter("select UserName from aspnet_users", cnn);
DataSet ds = new DataSet();
da.Fill(ds, "Roles");
lstusers.DataSource = ds;
lstusers.DataTextField = "UserName";
lstRoles.DataValueField = "RoleName";
lstusers.DataBind();
}</pre>
The following methods take username and rolename as parameters.<br />
<b>Assign Roles To User:</b>
The available roles can be assigned to the user in the following way.<br />
<pre> private void AssignRoles()
{
try
{
if (!Roles.IsUserInRole(lstRoles.SelectedItem.Text))
{
Roles.AddUserToRole(lstusers.SelectedItem.Text, lstRoles.SelectedItem.Text);
BindUsers();
BindRoles();
Label1.Text = "User Assigned To User Successfully";
}
else
{
Label1.Text = "Role(s) Already Assigned To User";
}
}
catch (Exception ex)
{
Label1.Text = ex.Message;
}
}</pre>
<b>Remove Roles from the User:</b>
You can remove the user from a role in the following manner: <br />
<pre> private void RemoveuserFromRole()
{
try
{
Roles.RemoveUserFromRole(lstusers.SelectedItem.Text, lstRoles.SelectedItem.Text);
BindUsers();
BindRoles();
Label1.Text = "User Is Removed From The Role Successfully";
}
catch (Exception ex)
{
Label1.Text = ex.Message;
}
}</pre>
<b>Delete Roles:</b>
The code is used to Delete the existing Roles, if they are not in use.
<br />
<pre>public void RemoveRole()
{
try
{
Roles.DeleteRole(lstRoles.SelectedItem.Text);
BindUsers();
BindRoles();
Label1.Text = "Role(s) Removed Successfully";
}
catch (Exception ex)
{
Label1.Text = ex.Message;
}
}</pre>
Restrict the users depending on the roles by using web.config settings as follows.<br />
<pre><authorization
<allow roles ="Admin"/>
<deny users ="*"/>
</authorization>
</pre>
In the above code if you write deny users =”*” and then allow roles =”Admin”, It seems to be no difference but the code wouldn’t work for you because writing the deny user =”*” at the beginning would even restrict the admin to acess the folders.<br />
<b>Show/Hide The Menu Items to The Users Depending on Roles:</b>
<br />
<pre> if (Roles.IsUserInRole("Admin"))
{
Menu1.Items[0].Text = "Admin";
}
else
{
Menu1.Items[0].Text = "";
}
</pre>
<h2>
Conclusion</h2>
We have seen an overview of using the out of box providers available to implement the Membership and Roles for the Asp.net Application.For more details about
Forms Authenticatin, Membership and Role provider you can refer the following links.<br />
<a href="http://msdn.microsoft.com/en-us/library/ff647070.aspx">MSDN Library</a><br />
<a href="http://msdn.microsoft.com/en-us/library/yh26yfzy.aspx">MSDN Library</a>
</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6310810494645086689.post-44851439813292745842011-11-09T10:31:00.000-08:002012-05-21T04:21:32.757-07:00JavaScript for Asp.Net Developers<div dir="ltr" style="text-align: left;" trbidi="on">
<h2>
Introduction</h2>
JavaScript along with Asp.net helps u to build web applications which are robust and effective. In this article the most commonly used tasks which can be achieved in Asp.net by using JavaScript are discussed. The article describes the following content. JavaScript to perform validations, JavaScript client side API for Asp.net Server Controls, Call a JavaScript from code behind and Vice-Versa, Grid View alert for deleting, Pass the C# variables to JavaScript array, Pop-up in Grid View.<br />
<a name='more'></a><br />
<h3>
Perform Validations using Java script:</h3>
Validating the web forms is the most important and common task in developing the applications. Validating the page without allowing the user to post the page to server enhances the user experience. In this section we will see how to validate the web form by using client side java script.
<b>Access the asp.net Server Controls using Java script:</b><br />
You can access the asp.net server controls by using the following script:
<br />
<pre>var employeeid = document.getElementById('<%= TextBox1.ClientID %>');
</pre>
similarly you can access all other controls in the form.<br />
<b>Make textbox to accept only digits:</b>
The following function is used to make a text box to accept only digits.<br />
<pre>function isNumberKey(evt) {
if (charCode = evt.which) {
charCode = evt.which;
}
else {
charCode = evt.keyCode;
}
if (charCode > 31 && (charCode < 48 || charCode > 57)) {
return false;
}
else {
return true;
}
}</pre>
<b>Validate the emailid:</b>
Emaild can be validate by checking the position of ‘@’ and ‘.’ characters in the emailid as follows:
<br />
<pre>var atpos = emailid.value.indexOf("@");
var dotpos = emailid.value.lastIndexOf(".");
if ((inputDOJ.value == "") || (atpos < 1 || dotpos < atpos + 2 || dotpos + 2 >= inputDOJ.length))
{
lbl3.innerHTML = "Not a valid e-mail address";
flag = 1;
}
</pre>
<b>Check if the date is greater than today:</b>
You check the entered date with the date object of the java script as shown below:<br />
<pre>var DOJ = new Date(inputDOJ.value);
var todaydate = new Date();
var month = todaydate.getMonth() + 1;
var today = new Date(month + '/' + todaydate.getDate() + '/' + todaydate.getFullYear());
if ((inputDOJ.value == "") || (DOJ < today))
{
lbl2.innerHTML = "Date should be greater than today"
flag = 1;
}
</pre>
<b>Check the values to be distinct:</b>
You can check if the entered values in the two fields are distinct by using the following code:<br />
<pre> if (reportingmanger.value == employeeid.value)
{
lbl6.innerHTML = "Reporting MangerID should not be same as EmployeeID";
flag = 1;
}
</pre>
<b>Check if the values in the fields are blank:</b>
Javascript can be used to make the fields as mandatory by using the following code snippet. <br />
<pre>if (reportingmanger.value == "")
{
lbl6.innerHTML = "ReportingManagerID cannot be blank";
flag = 1;
}
</pre>
<b>Check the length of employeeid:</b>Length of the value entered in the field can be checked by using 'lenght' property.<br />
<pre>if ((employeeid.value == "" ) || (employeeid.value.length != 4))
{
lbl1.innerHTML = "Please Enter Valid 4 digit EmployeeID";
flag = 1;
}
</pre>
<h3>
JavaScript Client API for Asp.net Validation Controls:</h3>
In the above we have written the code from the scratch to perfom validations. But the asp.net comes with in built validations controls to perfrom validations. Now by usign the client side api of validations we can use the controls without post back.<br />
<b>Page_ClientValidate(val)</b> method and <b>Page_IsValid property</b> is used for this task as shown below:<br />
<pre> function performCheck()
{
Page_ClientValidate("DemoValidate");
if (Page_IsValid)
{
alert('Form Submitted Succesfully');
return true;
}
else
{
alert('Please Correct The errors');
return false;
}
}
</pre>
The above function can be called on page submission as shown below:<br />
<pre> <asp:Button ID="btnSubmit" runat="server" Text="Submit" ValidationGroup="DemoValidate" OnClientClick ="performCheck()" />
</pre>
Note: ValidationGroup property should be same for all the validation controls across the group which are need to be validated.<br />
<h3>
Javascript parsing:</h3>
The following code can be used to call the javascript from code behind using c# code.
<br />
<pre> //c# code:
public void InvokeMethod()
{
string name = "HelloWorld";
Button1.Attributes.Add("OnClick", "javascript:return displayalert('" + name + "')");
}
// javascript function
function displayalert(text)
{
alert(text);
return false;
}
</pre>
By using the following code snippet java script function can be called on the page load:<br />
<pre>ScriptManager.RegisterStartupScript(Page,this.GetType(),"fid", "displayalert('Helloworld');", true);
</pre>
The following code is used to call c# function by using javascript.<br />
<pre> // c# function
public string displayalert()
{
string name = "HelloWorld";
return name;
}
// javascript function to call c# code.
function Title()
{
var str ='<%= displayalert()%>';
alert(str);
}
</pre>
Note:Only method with return types can be called from the java script.<br />
<h3>
Pass the C# variables to JavaScript array:</h3>
Sometime often if you want to send the elements of any c# collection class to javascript array, you can use the following code:
<b>c# code:</b>
<br />
<pre>Declare Variables:
ArrayList states = new ArrayList();
protected string s = string.Empty;
private void SendData()
{
// Add the values to the arraylist.
states.Add("AndhraPradesh");
states.Add("HimachalPradesh");
states.Add("Gujarat");
states.Add("MadhyaPradesh");
foreach (string state in states)
{
if (s == string.Empty)
{
s = "\""+state+"\"";
}
else
{
s = s +","+"\""+ state+"\"";
}
}
}
</pre>
<b>JavaScript Code</b>
<br />
<pre> function initializedate()
{
var statelist = [<% = s %>];
var s="";
for(var i=0;i<statelist.length;i++)
{
s = s +"<br/>"+ statelist[i];
}
var text = document.getElementById("Text1");
text.innerHTML = s;
return false;
}
window.onload = initializedate;
<div id ="Text1"> </div>
</pre>
<h2>
Conclusion:</h2>
In this article some of commonly used javascript techniqes used in asp.net applications. In the next "Javascirpt create user wizard for Asp.Net" you can learn how to create a custom create user wizard by using simple javascript code.
In Further revesions some more techniques would added in this article. For more clarification you can download and go through the code.
</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6310810494645086689.post-65153396430949995972011-11-09T10:16:00.001-08:002012-04-01T10:11:05.184-07:00JavaScript Create User Wizard for Asp.Net<div dir="ltr" style="text-align: left;" trbidi="on">
<h2>
Introduction</h2>
Asp.net provides built in create user wizard for membership which can be customized automatically depending on the user requirements. But in some cases if you want your own custom create user wizard and then this articles explains you the way to achieve your requirement.
The Designed control provides you the flexible way to implement the membership wizard for the user.
<br />
<h2>
Background<a name='more'></a></h2>
For any webiste/application general task is provide the registration page for the
user and in the net you can different types of but, i hope this could be the
simple one to achieve this task.<br />
<h2>
Using the code</h2>
The create user wizard can be designed very effectively just with a few lines of code. The code will be similar to code which is used for navigating the records
in a dataset or any other collection.<br />
Initially declare an array and store the div id’s of all the wizard of the html
page in the array and define the Next () and Previous () methods which will display the current wizard. <br />
Comments in the code will provide informatin about the method.
<br />
<pre>// stores the div id in an array.
var divlist =["SignUp","BasicInfo","ProfessionalProfile","MyProfile"];
//Declare Variables
var i=0;var j; var btnprevious; var btnnext;var btnfinish;
//Define the next () Method to hide/show the steps as shown below:
//The following method implement the code to increment the steps of the wizard.
function Next()
{
//increment the array index value.
HideAll();
// loop through the array and display the current div on button click.
i++;
btnprevious.style.display = '';
document.getElementById(divlist[i]).style.display = '';
if(divlist[i] == "MyProfile")
{
DisplayValues();
}
// check for the length of the array and hide the next button.
if (i == divlist.length-1 )
{
btnnext.style.display = 'none'
btnfinish.style.display = '';
}
return false;
}
</pre>
Define the previous to display the previous steps:
The following method implement to show previous steps of the wizard.<br />
<pre>function Previous()
{
//decrement the array index value.
btnfinish.style.display = 'none';
btnnext.style.display = ''
HideAll();
i--;
//loop through the array to display the current div and hide others.
btnnext.Text = "Next";
btnnext.style.display = '';
document.getElementById(divlist[i]).style.display = '';
if (i == 0)
{
btnprevious.style.display = 'none';
}
return false;
}</pre>
Finally define the sumbit method which display’s an confirm message to the user to submit the details.<br />
<pre>function Submit()
{
if(confirm("Are You Sure You Want Submit?") == false)
{
return false;
}
else
{
HideAll();
btnprevious.style.display = 'none';
btnnext.style.display = 'none';
btnfinish.style.display = 'none';
document.getElementById("MyProfile").style.display = '';
alert("Submitted Succesfully");
}
}
</pre>
The HideAll method is used to hide all the controls in the web from:<br />
<pre style="background-color: #dfdfdf;">function HideAll()
{
document.getElementById(divlist[0]).style.display = 'none';
document.getElementById(divlist[1]).style.display = 'none';
document.getElementById(divlist[2]).style.display = 'none';
document.getElementById("MyProfile").style.display = 'none';
}</pre>
The following code is used to call the methods on button click as shown below:<br />
<pre><asp:Button ID="btnprevious" runat="server" Text="Previous" OnClientClick ="return Previous();"/>
<asp:Button ID="btnnext" runat="server" Text="Next" OnClientClick ="return Next();" />
<asp:Button ID="btnfinish" runat="server" Text="Finish" Height="26px" Width="60px"
OnClientClick="return Submit();" OnClick="btnfinish_Click" />
</pre>
You can download the complete code in the attachement and go through the code or use it.
<br />
<h2>
Points of Interest</h2>
The wizard helps to add any number of steps by just simpling adding div tags to your html code and
then saving the div id's to the array object. In these way you can add your fields and profile data.
The wizard is designed with simple coding standard without any complexity.
Further development would inlcude the use of css sheets to apply styles for the wizard.
In the further revision, the css style sheets would be added to the application.<br />
<h2>
Conclusion:</h2>
In this article we have seen how to create your own custom create user wizard by using the javascript, In the
next article " Asp.Net Profile Provider.", u can learn how to implement profile provider along with this wizard to save the profiles.
</div>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-6310810494645086689.post-88884983392654251252011-09-25T07:04:00.000-07:002012-01-15T07:53:34.884-08:00Welcome to My Blog<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-size: large;">Welcome.</span><br />
<span style="font-size: small;">Welcome To Technowallet. This blog is a beginners guide to develop web applications using .Net Technologies.</span><br />
<span style="font-size: small;">All the articles helps u to quickly learn the related technologies. </span></div>Anonymoushttp://www.blogger.com/profile/12208411882007072995noreply@blogger.com0tag:blogger.com,1999:blog-6310810494645086689.post-83261797792567910982011-09-15T04:38:00.000-07:002012-04-25T08:48:42.984-07:00GridView<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="MsoNormal">
<b><u><span style="font-size: 12pt; line-height: 115%;">GridView:</span></u></b></div>
<div class="MsoNormal" style="line-height: 150%; text-align: justify;">
<span class="apple-style-span"><span style="color: black;">Displays the values of a data source in a table where
each column represents a field and each row represents a record. The</span></span><span class="apple-converted-space"><span style="color: black;"> </span></span><span class="apple-style-span"><b><span style="color: black;">GridView</span></b></span><span class="apple-converted-space"><span style="color: black;"> </span></span><span class="apple-style-span"><span style="color: black;">control allows you to select, sort, and edit these
items.</span></span></div>
<div class="MsoNormal" style="line-height: 150%; text-align: justify;">
<span class="apple-style-span"><b><u><span style="color: black; font-size: 12pt; line-height: 150%;">Working with GridView DataSource
controls to display data:</span></u></b></span></div>
<div class="MsoNormal" style="line-height: 150%; text-align: justify;">
GridView
can be bind with any one of the following DataSource controls:</div>
<div class="MsoNormal" style="line-height: 150%; margin-left: 22.5pt; text-align: justify;">
SqlDataSource</div>
<div class="MsoNormal" style="line-height: 150%; margin-left: 22.5pt; text-align: justify;">
LinqDataSource</div>
<div class="MsoNormal" style="line-height: 150%; margin-left: 22.5pt; text-align: justify;">
ObjectDataSource</div>
<div class="MsoNormal" style="line-height: 150%; margin-left: 22.5pt; text-align: justify;">
XmlDataSource.</div>
<div class="MsoNormal" style="line-height: 150%; text-align: justify;">
Without
need to write any line of code directly one can directly bind the DataSource
Controls to display the data in GridView. In the below examples we will work
with SqlDataSource and ObjectDataSource controls.</div>
<div class="MsoListParagraphCxSpFirst" style="line-height: 150%; margin-left: 22.5pt; text-align: justify; text-indent: -0.25in;">
1.<span style="font-family: 'Times New Roman'; font-size: 7pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span>SqlDataSource:</div>
<div class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 22.5pt; text-align: justify; text-indent: -0.25in;">
<b><span style="font-size: 12pt; line-height: 150%;">2.<span style="font-family: 'Times New Roman'; font-size: 7pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span></b><b><u><span style="font-size: 12pt; line-height: 150%;">ObjectDataSource:</span></u></b></div>
<div class="MsoListParagraph" style="line-height: 150%; text-align: justify;">
In general
the ObjectDataSource control is used to bind the data from the business logic
class. So, first we will take a look at how to create a class that can bind
data to GridView.</div>
<div class="MsoNormal" style="line-height: 150%; text-align: justify;">
Creating
your Movie class:</div>
<div class="MsoNormal" style="line-height: 150%; text-align: justify;">
Follow the
steps to create the Movie Class:</div>
<div class="MsoListParagraph" style="line-height: 150%; margin-left: 0.75in; text-align: justify; text-indent: -9pt;">
1.<span style="font-family: 'Times New Roman'; font-size: 7pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span>Open
visual studio, create a new Empty Web Site and save it in u r local directory
with some name.</div>
<span style="font-size: 12pt; line-height: 150%;">.</span><br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="MsoListParagraph" style="line-height: 150%; margin-left: 0.75in; text-align: justify; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 150%;">2.<span style="font-family: 'Times New Roman'; font-size: 7pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><span style="font-size: 12pt; line-height: 150%;">Go to solution explorer add a new master page
and then add a new content page.</span></div>
<div class="MsoListParagraph" style="line-height: 150%; margin-left: 0.75in; text-align: justify; text-indent: -0.25in;">
<br /></div>
</div>Anonymoushttp://www.blogger.com/profile/12208411882007072995noreply@blogger.com0Hyderabad, Andhra Pradesh, India17.385044 78.48667117.142593 78.170814000000007 17.627495 78.802528tag:blogger.com,1999:blog-6310810494645086689.post-27180542191593587222011-09-12T09:35:00.000-07:002012-04-01T10:11:43.945-07:00Sql Command<div dir="ltr" style="text-align: left;" trbidi="on">
<h2>
Sql Command:</h2>
Sql Command is a connected class of Ado.Net Object model. Sql Command Class is used to perform various database operations over a given connection object (Sql server Database). Sql Command Class is used to perform both synchronous and asynchronous operations. The available methods and properties of Command Object allow you to execute a Sql query or stored procedure.<br />
<a name='more'></a><br />
<h3>
Synchronous Operation:</h3>
<b>ExecuteNonQuery:</b>
<br />
ExecuteNonQuery method of command object allows performing insert, deleting or updating the records in the database. The following steps are involved to execute a Command Object:<br />
<ol>
<li>Initialize the SqlConnection object with the connection string.</li>
<li>Initialize the SqlCommand object and use the connection property and command text property.</li>
<li>Open the connection and use the ExecuteNonQuery method of Command Object to execute the query and then close the connection.</li>
</ol>
To demonstrate the command object methods, consider a sample Employee Details Table. Open Visual Studio and create a Windows Form Application Project, give it a name and save the application.<br />
Drag and drop five label and five textbox controls to the form and change the properties of the controls. Change the Text Property of all label controls to Employee ID, Employee Name, Employee Phone no, Employee Address and Employee DOB respectively. Now change the Name Property of all the textbox controls to txtemployeeid, txtemployeename, txtphoneno, txtemployeeaddress and txtemployeedob respectively.<br />
The following query is used to design the Table in the Sql server database.<br />
Create database demo<br />
Create table EmployeeDetails<br />
<pre class="prettyprint"> create database Demo
use demo
create table employeedetails
(
EmpolyeeID int identity primary key,
EmployeeName varchar(235),
EmployeePhoneNO varchar(235),
EmployeeAddress varchar(235),
EmployeeDOB varchar(235),
)
</pre>
<b>Method 1: Using Properties (Command Text, Command Type and Connection):</b>
<br />
The following code snippet shows u the usage of the default constructor to execute the sql query statement. The following query is used to insert the record(s) to the database using the above said properties. <br />
<pre class="prettyprint"> //Read the value of connectionstring form the web.config file
and assign it to cnnstring variable.
cnnstring = ConfigurationManager.ConnectionStrings["cnn"].ConnectionString;
SqlConnection cnn = new SqlConnection();
//connection properties.
cnn.ConnectionString = cnnstring;
SqlCommand cmd = new SqlCommand();
cmdtext = "Insert into employeedetails values('" + txtemployeeid.Text +
"','" + txtempname.Text + "','" + txtphoneno.Text + "','"
+ txtaddress.Text + "','" + txtdob.Text + "')";
//cmd text and cmd connection properties.
cmd.CommandText = cmdtext;
cmd.Connection = cnn;
// Open the connection and execute the query and then close the connection.
cnn.Open();
cmd.ExecuteNonQuery();
cnn.Close();
</pre>
<b>Method 2: Constructor with parameters.</b>
<br />
The following code explains the constructor which takes “sql query statement” as parameter. <br />
<pre class="prettyprint"> cnnstring = ConfigurationManager.ConnectionStrings["cnn"].ConnectionString;
SqlConnection cnn = new SqlConnection(cnnstring);
cmdtext = "Insert into employeedetails values('" + txtemployeeid.Text +
"','" +txtempname.Text + "','" +txtphoneno.Text +
"','"+ txtaddress.Text + "','" +txtdob.Text + "')";
SqlCommand cmd = new SqlCommand(cmdtext);
cmd.Connection = cnn;
cnn.Open();
cmd.ExecuteNonQuery();
cnn.Close();
</pre>
<b>Method3: Using SqlParameters:</b>
<br />
In the above example we have directly the textbox properties in the sql query, the Command object allows us to embed these values by using the properties. The following code uses the third constructor from the above table which takes string and connection as parameters.<br />
<pre class="prettyprint"> cnnstring = ConfigurationManager.ConnectionStrings["cnn"].ConnectionString;
SqlConnection cnn = new SqlConnection(cnnstring);
SqlCommand cmd = new SqlCommand("insert into employeedetails values
(@empid,@empname,@phoneno,@address,@dob)", cnn);
cnn.Open();
cmd.Parameters.Add(new SqlParameter("@empid", txtempid.Text));
cmd.Parameters.Add(new SqlParameter("@empname", txtempname.Text));
cmd.Parameters.Add(new SqlParameter("@phoneno", txtphoneno.Text));
cmd.Parameters.Add(new SqlParameter("@dob", txtdob.Text));
cmd.Parameters.Add(new SqlParameter("@address", txtaddress.Text));
cmd.ExecuteNonQuery();
cnn.Close();
</pre>
<b>ExecuteScalar:</b>
<br />
Execute Scalar method is used to retrieve a single value from the table. It returns the first column of the first row value in the result set.
<br />The following code demonstrates the use of Execute Scalar Method:<br />
<pre class="prettyprint"> cnnstring = ConfigurationManager.ConnectionStrings["cnn"].ConnectionString;
SqlConnection cnn = new SqlConnection(cnnstring);
SqlCommand cmd = new SqlCommand("select employeename from employeedetails "+
"where empolyeeid ='100' ", cnn);
cnn.Open();
cmd.ExecuteNonQuery();
Response.Write("<b>EmployeeName:" + cmd.ExecuteScalar() + "</b>");
cnn.Close();
</pre>
<h3>
Asynchronous Operations:</h3>
<b>BeginExecuteNonQuery and EndExecuteNonQuery:</b>
<br />
BeginExecuteNonQuery Method initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by the SqlCommand. (Reference: MSDN library).<br />
<pre class="prettyprint">cnnstring = ConfigurationManager.ConnectionStrings["cnn"].ConnectionString;
SqlConnection cnn = new SqlConnection(cnnstring);
SqlCommand cmd = new SqlCommand("Insert into employeedetails
values('"+txtemployeeid.Text +
"','" +txtempname.Text + "','" + txtphoneno.Text +
"','"+txtaddress.Text + "','" + txtdob.Text + "')",
cnn);
IAsyncResult result = cmd.BeginExecuteNonQuery();
cmd.EndExecuteNonQuery(result);
cnn.Close();
</pre>
</div>Anonymoushttp://www.blogger.com/profile/12208411882007072995noreply@blogger.com1tag:blogger.com,1999:blog-6310810494645086689.post-25374976499054179902011-09-10T06:52:00.000-07:002012-04-09T04:52:52.281-07:00Stored Procedure<div dir="ltr" style="text-align: left;" trbidi="on">
<h2>
Stored Procedure:</h2>
Stored Procedures are precompiled Sql server objects which store the Sql queries and executes whenever the stored procedure is called. In this tutorial we will see how to work with stored procedure. The following things are discussed in this article.
<br />
<ol>
<li>Create and Execute Stored Procedure.</li>
<li>Stored Procedure with parameter.</li>
<li>Stored Procedure with output parameter.</li>
<li>Return a value from stored procedure.</li>
<li>Call a Stored Procedure from another Stored Procedure<a name='more'></a></li>
</ol>
<b>1. Create and Execute Stored Procedure.</b>
<br />
To start with we will see a simple stored procedure which is used to retrieve records. <br />
The following code is used to create the stored procedure.<br />
<pre>create procedure retrieverecords
as
begin
select * from employeedetails
end
</pre>
The following code is used to execute the stored procedure.<br />
<pre>execute retrieverecords.
</pre>
Stored Procedure can be used with Sql Command object as follows:<br />
<pre>cnnstring = ConfigurationManager.ConnectionStrings["cnn"].ConnectionString;
//Initialize the connection object.
SqlConnection cnn = new SqlConnection(cnnstring);
SqlDataAdapter da = new SqlDataAdapter("retrieverecords", cnn);
DataSet ds = new DataSet();
da.Fill(ds, "employee");
GridView1.DataSource = ds;
GridView1.DataBind();
</pre>
<b>2. Stored Procedure With parameters:</b>
<br />
You can create a stored procedure which inserts record(s) to the table by using the following query which takes employee details as input parameters.
<br />
<pre>create procedure insertrecords
@empid int,
@empname varchar(234),
@phoneno varchar(234),
@address varchar(234),
@dob varchar(234)
as
begin
insert into employeedetails values (@empid,@empname,@phoneno,@address,@dob)
end
</pre>
You can execute the stored procedure in the following way:<br />
<pre> execute insertrecords 1,’Pinto’,’8456896542’,’Hyderabad’,’20/04/1989’.
</pre>
Using the stored procedure with Sql Command Object:<br />
<pre>The stored procedure can be used with the Sql Command object by using the following code.
cnnstring = ConfigurationManager.ConnectionStrings["cnn"].ConnectionString;
SqlConnection cnn = new SqlConnection(cnnstring);
SqlCommand cmd = new SqlCommand("insertrecords", cnn);
cmd.CommandType = System.Data.CommandType.StoredProcedure;
cmd.Parameters.Add(new SqlParameter("@empid", txtempid.Text));
cmd.Parameters.Add(new SqlParameter("@empname", txtempname.Text));
cmd.Parameters.Add(new SqlParameter("@phoneno", txtphoneno.Text));
cmd.Parameters.Add(new SqlParameter("@dob", txtdob.Text));
cmd.Parameters.Add(new SqlParameter("@address", txtaddress.Text));
cnn.Open();
cmd.ExecuteNonQuery();
cnn.Close();
</pre>
<b>3. Stored Procedure with output parameter:</b>
<br />
The following stored procedure takes employeeid as input and returns employeename as output parameter.The following query is used to create a stored procedure with output parameter.
<br />
<pre>create procedure getemployeename
@empid int,
@empname varchar(234) output
as
begin
select @empname = employeename from employeedetails where empolyeeid = 100
print @empname
end
</pre>
You can execute the above stored procedure by using the below query:
<br />
<pre>Declare @empname varchar(234)
execute getemployeename 1000, @empname
</pre>
The following csharp code helps to use the stored procedure with your front end application:<br />
<pre> cnnstring = ConfigurationManager.ConnectionStrings["cnn"].ConnectionString;
SqlConnection cnn = new SqlConnection(cnnstring);
SqlCommand cmd = new SqlCommand("getemployeename", cnn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(new SqlParameter("@empid", SqlDbType.Int)).Value = txtempid.Text;
cmd.Parameters.Add(new SqlParameter("@empname", SqlDbType.VarChar,236)).Direction = ParameterDirection.Output;
cnn.Open();
cmd.ExecuteNonQuery();
Response.Write("<b>EmployeeName:" + cmd.Parameters["@empname"].Value);
cnn.Close();
</b></pre>
<b>
<b>4. Return a value from stored procedure:</b>
</b><br />
<b>The following query is used to create a stored procedure that returns value.</b><br />
<b>
</b><br />
<b><pre>create procedure addrecords
@empid int output,
@empname varchar(234),
@phoneno varchar(234),
@address varchar(234),
@dob varchar(234)
as
begin
insert into employee(EmpName,PhoneNumber,Address,DOB)
values(@empname,@phoneno,@address,@dob)
select @empid = @@identity
return @empid
end
</pre>
The stored procedure can be used in the application by using the following csharp code:<br />
<pre> // Read the value of connectionstring form the web.config file and assign it to cnnstring variable.
cnnstring = ConfigurationManager.ConnectionStrings["cnn"].ConnectionString;
SqlConnection cnn = new SqlConnection();
//connection properties.
cnn.ConnectionString = cnnstring;
SqlCommand cmd = new SqlCommand("addrecords", cnn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(new SqlParameter("@empname", SqlDbType.VarChar, 235)).Value = txtempname.Text;
cmd.Parameters.Add(new SqlParameter("@phoneno", SqlDbType.VarChar, 235)).Value = txtphoneno.Text;
cmd.Parameters.Add(new SqlParameter("@address", SqlDbType.VarChar, 235)).Value = txtaddress.Text;
cmd.Parameters.Add(new SqlParameter("@dob", SqlDbType.VarChar, 235)).Value = txtdob.Text;
cmd.Parameters.Add(new SqlParameter("@empid", SqlDbType.Int)).Direction = ParameterDirection.ReturnValue;
cnn.Open();
int records = (int)cmd.ExecuteNonQuery();
string id = cmd.Parameters["@empid"].Value.ToString();
Response.Write("<b>Record(" + records + ")with ID" + cmd.Parameters["@empid"].Value + "has been sucessfully added.");
cnn.Close();
</b></pre>
<b>
<b>5.Call a Stored Procedure from another Stored Procedure.</b>
Before we proceed we need to create the following table.<br />
<pre>create table EmployeeDepartment
(
ID int foreign key references employee(ID),
Department varchar(234)
)
</pre>
Now we will create a stored procedure which calls the previously created stored procedure getemployeename. This stored procedure takes employeeid as input and returns empname and empdept from two different tables.(employeedetails and EmployeeDepartment).
<br />
<pre>create procedure DisplayEmployeeInfo
@empid int,
@empname varchar(235) output,
@Dept varchar(235) output
as
begin
execute @empname = getemployeename @empname,@empid
select @Dept = department from employeedepartment
print @empname+':'+@Dept
end
</pre>
</b></b></div>Anonymoushttp://www.blogger.com/profile/12208411882007072995noreply@blogger.com1Hyderabad, Andhra Pradesh, India17.385044 78.48667117.142593 78.170814000000007 17.627495 78.802528tag:blogger.com,1999:blog-6310810494645086689.post-72329331491657385242011-09-09T21:05:00.000-07:002012-04-09T04:53:18.496-07:00Sql Data Reader<div dir="ltr" style="text-align: left;" trbidi="on">
<h2>
Sql Data Reader:</h2>
Data Reader object allows you to perform forward only read only operations over the database. Data Reader is another connected class of Ado.net and is one of the two available data storages objects of Ado.net object model.<br />
<br />
<a name='more'></a><br /><br />
<pre class="prettyprint">//Read the value of connectionstring form the
web.config file and assign it to cnnstring variable.
cnnstring = ConfigurationManager.ConnectionStrings["cnn"].ConnectionString;
//Initialize the connection object.
SqlConnection cnn = new SqlConnection(cnnstring);
//pass the sql query to retrieve the records.
SqlCommand cmd = new SqlCommand("select * from employeedetails", cnn);
cnn.Open();
//Initialize the data reader object.
SqlDataReader reader = cmd.ExecuteReader();
//Read the values and bind to the controls.
while (reader.Read())
{
txtemployeeid.Text = reader.GetInt32(0).ToString();
txtempname.Text = reader.GetString(1);
txtphoneno.Text = reader.GetString(2);
txtaddress.Text = reader.GetString(3);
txtdob.Text = reader.GetString(4);
}
//finally close the reader and connection.
reader.Close();
cnn.Close();
</pre>
<b>Multiple Active Result Sets:</b>
<br />
Data Reader allows you to read the values in faster way, but if you are using multiple data reader objects then you will end up ‘invalidoperationexception’ error. In order to overcome this problem you can use MARS property of the data reader object. You need set ‘MultipleActiveResultSets = true’ in the connection string.
ConnectionString:<br />
<pre class="prettyprint"><connectionStrings>
<add name="cnn" connectionString="Data Source=.\SQLEXPRESS;
AttachDbFilename=|DataDirectory|\Tutorial.mdf;Integrated Security=True;
User Instance=True; MultipleActiveResultSets = True"/>
</connectionStrings>
</pre>
The following code explains about working with multiple active result sets.
<br />
<pre class="prettyprint">//Read the value of connectionstring form the web.config
file and assign it to cnnstring variable.
cnnstring = ConfigurationManager.ConnectionStrings["cnn"].ConnectionString;
//Initialize the connection object.
SqlConnection cnn = new SqlConnection(cnnstring);
//pass the sql query to retrieve the records.
SqlCommand cmd = new SqlCommand("select * from employeedetails", cnn);
SqlCommand cd = new SqlCommand("select employeename from employeedetails" +
" where empolyeeid ='100' ", cnn);
cnn.Open();
//Initialize the data reader object.
SqlDataReader reader = cmd.ExecuteReader();
//Read the values and bind to the controls.
SqlDataReader empnamereader = cd.ExecuteReader();
while (empnamereader.Read())
{
string employeename = empnamereader.GetString(0);
Response.Write("<h1>Employee Name:" + employeename + "</h1>");
}
empnamereader.Close();
while (reader.Read())
{
txtemployeeid.Text = reader.GetInt32(0).ToString();
txtempname.Text = reader.GetString(1);
txtphoneno.Text = reader.GetString(2);
txtaddress.Text = reader.GetString(3);
txtdob.Text = reader.GetString(4);
}
//finally close the reader and connection.
reader.Close();
cnn.Close();
</pre>
</div>Anonymoushttp://www.blogger.com/profile/12208411882007072995noreply@blogger.com0Hyderabad, Andhra Pradesh, India17.385044 78.48667117.142593 78.170814000000007 17.627495 78.802528tag:blogger.com,1999:blog-6310810494645086689.post-28652262256670954922011-08-06T08:41:00.001-07:002011-08-06T08:41:07.480-07:00sql Dat Adapter<div dir="ltr" style="text-align: left;" trbidi="on"><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:PunctuationKerning/> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:Compatibility> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> <w:DontGrowAutofit/> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]--><!--[if gte mso 10]> <style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
</style> <![endif]--> <br />
<ol start="1" style="margin-top: 0in;" type="1"><li class="MsoNormal" style="mso-list: l0 level1 lfo1; tab-stops: list .5in;">Sql data Adapter:</li>
</ol><div class="MsoNormal" style="margin-left: .25in;"><br />
</div><div class="MsoNormal" style="margin-left: .25in;">Insert/update/Delete Records:</div><div class="MsoNormal" style="margin-left: .25in;"><br />
</div><div class="MsoNormal" style="margin-left: .75in; mso-list: l1 level1 lfo2; tab-stops: list .75in; text-indent: -.25in;"><span style="mso-list: Ignore;">1.<span style="font: 7.0pt "Times New Roman";"> </span></span>Establish the connection to the sql server by using sql connection class.</div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span><span style="color: #2b91af;">SqlConnection</span> cnn = <span style="color: blue;">new</span> <span style="color: #2b91af;">SqlConnection</span>(<span style="color: #a31515;">"Data Source = .\\SQLEXPRESS; Initial Catalog = master;Integrated Security= true"</span>);</span></div><div class="MsoNormal" style="margin-left: .5in;"><br />
</div><div class="MsoNormal" style="margin-left: .75in; mso-list: l1 level1 lfo2; tab-stops: list .75in; text-indent: -.25in;"><span style="mso-list: Ignore;">2.<span style="font: 7.0pt "Times New Roman";"> </span></span>Open the connection</div><div class="MsoNormal" style="margin-left: .75in; mso-list: l1 level1 lfo2; tab-stops: list .75in; text-indent: -.25in;"><span style="mso-list: Ignore;">3.<span style="font: 7.0pt "Times New Roman";"> </span></span>Execute the sql query to insert/update/delete the record(s) by using sql data adapter.</div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span><span style="color: #2b91af;">SqlDataAdapter</span> da = <span style="color: blue;">new</span> <span style="color: #2b91af;">SqlDataAdapter</span>(<span style="color: blue;">new</span> <span style="color: #2b91af;">SqlCommand</span>(<span style="color: #a31515;">"Insert into student values('"</span> + textBox1.Text + <span style="color: #a31515;">"','"</span> + textBox2.Text + <span style="color: #a31515;">"','"</span> + textBox3.Text + <span style="color: #a31515;">"','"</span> + textBox4.Text + <span style="color: #a31515;">"','"</span> + textBox5.Text + <span style="color: #a31515;">"','"</span> + textBox6.Text + <span style="color: #a31515;">"')"</span>,cnn));</span></div><div class="MsoNormal" style="margin-left: .75in; mso-list: l1 level1 lfo2; tab-stops: list .75in; text-indent: -.25in;"><span style="mso-list: Ignore;">4.<span style="font: 7.0pt "Times New Roman";"> </span></span>Use one of the following combinations of properties and methods as per the requirements.</div><div class="MsoNormal" style="margin-left: 1.25in; mso-list: l1 level2 lfo2; tab-stops: list 1.25in; text-indent: -.25in;"><span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font: 7.0pt "Times New Roman";"> </span></span></span><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">InsertCommand.ExecuteNonQuery();</span></div><div class="MsoNormal" style="margin-left: 1.25in; mso-list: l1 level2 lfo2; tab-stops: list 1.25in; text-indent: -.25in;"><span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font: 7.0pt "Times New Roman";"> </span></span></span><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">UpdateCommand.ExecuteNonQuery();</span></div><div class="MsoNormal" style="margin-left: 1.25in; mso-list: l1 level2 lfo2; tab-stops: list 1.25in; text-indent: -.25in;"><span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font: 7.0pt "Times New Roman";"> </span></span></span><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">DeleteCommand.ExecuteNonQuery();</span></div><div class="MsoNormal" style="margin-left: 1.25in; mso-list: l1 level2 lfo2; tab-stops: list 1.25in; text-indent: -.25in;"><span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font: 7.0pt "Times New Roman";"> </span></span></span><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">SelectCommand.ExecuteNonQuery();</span></div><div class="MsoNormal" style="margin-left: 1.0in;"><br />
</div><div class="MsoNormal" style="margin-left: .5in; mso-layout-grid-align: none; text-autospace: none; text-indent: .5in;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">da.InsertCommand.ExecuteNonQuery();</span></div><div class="MsoNormal" style="margin-left: 1.0in;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span>cnn.Close();</span></div><div class="MsoNormal"><br />
</div><div class="MsoNormal">Alternately u can use <span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">SelectCommand.ExecuteNonQuery(); to perform insert/delete/update operations as shown below.</span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;">cnn.Open();</span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span><span style="color: #2b91af;">SqlDataAdapter</span> da = <span style="color: blue;">new</span> <span style="color: #2b91af;">SqlDataAdapter</span>(<span style="color: #a31515;">"Insert into student values('"</span> + textBox1.Text + <span style="color: #a31515;">"','"</span> + textBox2.Text + <span style="color: #a31515;">"','"</span> + textBox3.Text + <span style="color: #a31515;">"','"</span> + textBox4.Text + <span style="color: #a31515;">"','"</span> + textBox5.Text + <span style="color: #a31515;">"','"</span> + textBox6.Text + <span style="color: #a31515;">"'"</span>,cnn);</span></div><div class="MsoNormal" style="mso-layout-grid-align: none; text-autospace: none;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span>da.SelectCommand.ExecuteNonQuery();</span></div><div class="MsoNormal"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-no-proof: yes;"><span style="mso-spacerun: yes;"> </span>cnn.Close();</span></div><div class="MsoNormal"><br />
</div><div class="MsoNormal" style="margin-left: .75in; mso-list: l1 level1 lfo2; tab-stops: list .75in; text-indent: -.25in;"><span style="mso-list: Ignore;">5.<span style="font: 7.0pt "Times New Roman";"> </span></span>Finally close the connection.</div></div>Anonymoushttp://www.blogger.com/profile/12208411882007072995noreply@blogger.com0tag:blogger.com,1999:blog-6310810494645086689.post-45726131119729490532011-08-06T06:55:00.001-07:002012-04-09T04:53:47.033-07:00Binding Source<div dir="ltr" style="text-align: left;" trbidi="on">
<h2>
Binding Source:</h2>
<b>Retrieving Information from database by using Binding Source:</b>
<br />
<ol>
<li>Establish the connection to the sql server by using sql connection class.</li>
<pre class="prettyprint">SqlConnection cnn = new SqlConnection("Data Source = abc;
Initial Catalog = master;Integrated Security= true");</pre>
<li>Execute the sql query to retrieve information by using sql data adapter.</li>
<pre class="prettyprint">SqlDataAdapter da = new SqlDataAdapter("select * from student", cnn);</pre>
<li>Fill the values in Data Set by using the sql data adapter.</li>
<pre class="prettyprint">da.Fill(ds, "student");</pre>
<li>Bind the dataset as data source to the binding source.</li>
<pre class="prettyprint">bs.DataSource = ds.Tables["student"];</pre>
<li>Bind the values to the controls.</li>
<pre class="prettyprint">textBox1.DataBindings.Add("Text", bs, "studnetid");</pre>
<li>Repeat the syntax for all the controls.
Use the binding source methods to navigate between the values.</li>
<pre class="prettyprint">bs.MoveFirst();bs.MovePrevious();bs.MoveNext();bs.MoveLast();<a name='more'></a></pre>
</ol>
Complete code Listing Goes Here
<br />
<pre class="prettyprint">public partial class Form1 : Form
{
SqlConnection cnn = new SqlConnection("Data Source = .\\SQLEXPRESS;
Initial Catalog = master;Integrated Security= true");
BindingSource bs = new BindingSource(); DataSet ds = new DataSet();
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
cnn.Open();
SqlDataAdapter da = new SqlDataAdapter("select * from
student", cnn);
da.Fill(ds, "student");
bs.DataSource = ds.Tables["student"];
textBox1.DataBindings.Add("Text", bs, "studnetid");
textBox2.DataBindings.Add("Text", bs, "studnetname");
textBox3.DataBindings.Add("Text", bs, "phoneno");
textBox4.DataBindings.Add("Text", bs, "Address");
textBox5.DataBindings.Add("Text", bs, "DOB");
textBox6.DataBindings.Add("Text", bs, "Gender");
}
private void btnfirst_Click(object sender, EventArgs e)
{
bs.MoveFirst();
}
private void btnprevious_Click(object sender, EventArgs e)
{
bs.MovePrevious();
}
private void btnnext_Click(object sender, EventArgs e)
{
bs.MoveNext();
}
private void btnlast_Click(object sender, EventArgs e)
{
bs.MoveLast();
}
}
</pre>
</div>Anonymoushttp://www.blogger.com/profile/12208411882007072995noreply@blogger.com0