tag:blogger.com,1999:blog-49555118061507242682024-03-05T05:02:22.946-08:00Ramky'sBlog all about Dotnet TechnologiesRamkyhttp://www.blogger.com/profile/05722860132583858043noreply@blogger.comBlogger22125tag:blogger.com,1999:blog-4955511806150724268.post-24649939069459060642009-01-15T21:57:00.000-08:002009-01-15T22:02:25.987-08:00Top 10 Reasons to Switch from Java to Visual C#<div><br /> <ol><br /> <span style="font-size:85%;"><br /> <li><span><b>"C Style" memory access</b> </span> <br /><br /> Rather than forcing developers to write code to access application programming interfaces (APIs) in other languages in order to access specific memory locations (e.g. hardware-mapped memory), C# allows developers to use "C style" memory management and pointers when necessary. Of course, one of the major design goals of the Java language and other object-oriented languages is specifically to outlaw such access. A fact which Microsoft acknowledges by forcing the C# programmer to label such accesses with the unsafe keyword. <br /> </li> </span> <br /> <span style="font-size:85%;"><br /> <li><span><b>Extensions for component-oriented development</b> </span> <br /><br /> Visual C# provides developers with a powerful component-oriented development language that includes support for properties, indexers, delegates, inheritance, versioning, and attributes, without the need for esoteric or rigid naming patterns and companion classes.<br /> </li><br /> </span> <br /> <span style="font-size:85%;"><br /> <li><span><b>Familiarity </b> </span> <br /><br /> Java developers will immediately find Visual C# to be familiar and comfortable. C# is like Java on steroids. There are some <a href="http://en.csharp-online.net/index.php?title=Appendix_C._CSharp_Keywords" target="_blank">extra keywords</a>; and, Visual C# supports some extra constructs. But, a Java coder can learn the C# language in a day or two. Learning the APIs is a different matter. <br /> </li><br /> </span> <br /> <span style="font-size:85%;"><br /> <li><span><b>Interactive XML Web services</b> </span> <br /><br /> Visual C# allows developers to deploy and consume rich, interactive XML Web services that reduce development time by enabling software aggregation from any platform. Microsoft is famous for hiding the details from the developer: This is both good and bad. New developers may not actually know or understand what is going on under the hood. On the other hand, it does increase productivity. Of course, Java developers have a variety of IDEs such as Eclipse to choose from. All of which provide some degree of support for Web services. <br /> </li><br /> </span> <br /> <span style="font-size:85%;"><br /> <li><span><b>Leverage the .NET Framework </b> </span> <br /><br /> Visual C# provides developers with access to the Microsoft <a href="http://en.csharp-online.net/index.php?title=.NET_Framework_and_CLR" target="_blank">.NET Framework</a> --a robust, thread-safe library of collection classes, data access classes, networking functions, etc. Recently, however, various <a href="http://en.csharp-online.net/index.php?title=CSharp_Resources_-_Open_Source" target="_blank">bridge software offer </a> .NET access from Java programs as well as access to the rich Java libraries from .NET languages. <br /> </li><br /> </span> <br /> <span style="font-size:85%;"><br /> <li><span><b>Object-based type system</b> </span> <br /><br /> Visual C# provides developers an object-based type system that eliminates the need for complex, verbose data marshalling code commonly required by Java applications. <br /> </li><br /> </span> <br /> <span style="font-size:85%;"><br /> <li><span><b>Standards-based language</b> </span> <br /><br /> Visual C# provides developers with a <a href="http://en.csharp-online.net/index.php?title=Appendix_A._CSharp_Grammar" target="_blank">standards-based language</a> (ECMA) with all its advantages. This is a significant advantage over the Java language. <br /> </li><br /> </span> <br /> <span style="font-size:85%;"><br /> <li><span><b>Target any device </b> </span> <br /><br /> <a href="http://en.csharp-online.net/index.php?title=Visual_CSharp" target="_blank">Visual C#</a> lets developers target desktop computers or a variety of handheld and wireless devices using identical tools and skills. True, but all the devices must be Windows based. </li><br /> </span> <br /> <span style="font-size:85%;"><br /> <li><span><b>Visual Studio .NET IDE </b> </span> <br /><br /> Visual C# provides developers with the <a href="http://en.csharp-online.net/index.php?title=Visual_Studio" target="_blank">Visual Studio .NET</a> integrated development environment (IDE) which includes support for task lists, property editors, Microsoft IntelliSense®, Forms designers, etc. For development on Windows platform, Visual Studio is king. However, Visual Studio lags Eclipse and other IDEs except in Microsoft-specific features. <br /> </li><br /> </span> <br /><span style="font-size:85%;"><br /> <li><span><b> XML comments </b> </span> <br /><br />Visual C# allows developers to use eXtensible Markup Language (XML) Comments to provide useful and customizable source code documentation. Of course, so does Java although Microsoft does add its own twists to it. <br /> </li><br /> </span> <br /> </ol><br /></div>Ramkyhttp://www.blogger.com/profile/05722860132583858043noreply@blogger.com3tag:blogger.com,1999:blog-4955511806150724268.post-48608989245558771462009-01-14T23:22:00.000-08:002009-01-14T23:24:53.446-08:00Most Dangerous Programming ErrorsIn the below link, you will find "Most Dangerous Programming Errors "<br /><a href="http://reddevnews.com/blogs/weblog.aspx?blog=3067">http://reddevnews.com/blogs/weblog.aspx?blog=3067</a>Ramkyhttp://www.blogger.com/profile/05722860132583858043noreply@blogger.com2tag:blogger.com,1999:blog-4955511806150724268.post-37862482846388276972008-12-18T01:43:00.000-08:002008-12-18T01:53:16.892-08:00Different Gridview Operations<span style="font-size:85%;"> <br /> We use gridview control for different purpose in our application. Here I am explanning some of the<br /> most useful operations using gridview </span> <br /> <span style="font-size:85%;"> Here I am showing the final results of the various samples. You can download the complete source in end of the article. </span> <br /> <ul><br /> <li>Search in Gridview</li><br /> <li>General Edit operations with Gridview.</li><br /> <li>Showing Image in gridview.</li><br /> <li>Showing Image in gridview from Databas</li><br /> <li>Gridview with checkboxes</li><br /> <li>Modalpopup with Gridview</li><br /> <li>Hovermenu with Gridview</li><br /> <li>Import Excel to Gridview</li><br /> <li>Import Gridview to Excel</li><br /> <li>Using Filters in Gridview</li><br /> </ul><br /> <br /> <span style="font-size:85%;"><b>Search in Gridview</b></span> <br /> <span style="font-size:85%;">Some times we need search the inner details of a gridview. For this requirement we can use this functionality.</span> <br /> <div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimRQ7w2xmdmGXQ94F7ASYF38fb0QsmrL4m25MyTcW7_rhfeFPEeXROAZBS8ANRC8znCXM7i-bF_PTOUOc1m9_IzjmOiHc3AOYCOz6CBjib4-MNeGpEUGalXCxOonLxfdois8eCHYi4Kivu/s1600-h/Search.JPG"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 358px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimRQ7w2xmdmGXQ94F7ASYF38fb0QsmrL4m25MyTcW7_rhfeFPEeXROAZBS8ANRC8znCXM7i-bF_PTOUOc1m9_IzjmOiHc3AOYCOz6CBjib4-MNeGpEUGalXCxOonLxfdois8eCHYi4Kivu/s400/Search.JPG" border="0" alt=""id="Img9" /></a></div><br /> <br /> <span style="font-size:85%;"><b>General Edit operations with Gridview.</b></span> <br /> <span style="font-size:85%;"> This is very common operation. But really useful when we have few columns</span> <br /> <div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJkHqXWCrz_dro_D0wEVG_elnlHYMREHv3qg4tcdygIlQTNkNt3vRcEpJ0HB0iG-V9uzTVf8FHJEl7uHEyfWO8DQTjdP6XZycovuMcOSOBd2BIlVLPos1If5K5U2CNq9PMmSNc21DQMus5/s1600-h/EditUpdate.JPG"><img id="Img4" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 295px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJkHqXWCrz_dro_D0wEVG_elnlHYMREHv3qg4tcdygIlQTNkNt3vRcEpJ0HB0iG-V9uzTVf8FHJEl7uHEyfWO8DQTjdP6XZycovuMcOSOBd2BIlVLPos1If5K5U2CNq9PMmSNc21DQMus5/s400/EditUpdate.JPG" border="0" /></a></div> <br /> <br /> <span style="font-size:85%;"><b>Showing Image in gridview.</b></span> <br /> <span style="font-size:85%;">Some times we have to show Images inside gridview which are placed in one folder in server. </span> <br /> <br /> <div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /> <div class="csharp" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"> <span style="color: #008000;"><</span>asp<span style="color: #008000;">:</span>TemplateField HeaderText<span style="color: #008000;">=</span><span style="color: #666666;">"Image"</span><span style="color: #008000;">></span><br /><br /> <span style="color: #008000;"><</span>ItemTemplate<span style="color: #008000;">></span><br /><br /> <span style="color: #008000;"><</span>img src<span style="color: #008000;">=</span><span style="color: #666666;">"Images/<%# DataBinder.Eval(Container.DataItem, "</span>Mobile<span style="color: #666666;">")%>"</span> <br /><br /> width<span style="color: #008000;">=</span><span style="color: #666666;">"200px"</span> <br /><br /> height<span style="color: #008000;">=</span><span style="color: #666666;">"200px"</span> <span style="color: #008000;">/></span><br /><br /> <span style="color: #008000;"></</span>ItemTemplate<span style="color: #008000;">></span><br /><br /> <span style="color: #008000;"></</span>asp<span style="color: #008000;">:</span>TemplateField<span style="color: #008000;">></span></div><br /> </div> <br /> <div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEStbpJOFBck5Vmo5gPsXqOgRMkCNKc4mPs0cU1fv0xUqVXueXj-udXT89qJ9On0e_l3ismNBW8Rfskwtht1j5LyW4EZf9FpWLbBKjhWSKqCBYWTyXM5fva3uhB3b2fPASPUmL2R5ZkT_-/s1600-h/Grid_Image.JPG"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 295px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEStbpJOFBck5Vmo5gPsXqOgRMkCNKc4mPs0cU1fv0xUqVXueXj-udXT89qJ9On0e_l3ismNBW8Rfskwtht1j5LyW4EZf9FpWLbBKjhWSKqCBYWTyXM5fva3uhB3b2fPASPUmL2R5ZkT_-/s400/Grid_Image.JPG" border="0" alt=""id="Img6" /></a></div><br /><br /> <br /> <span style="font-size:85%;"><b>Showing Image in gridview from Databas</b></span> <br /> <span style="font-size:85%;">If the Images are stored in database, then we have to use Generic handler, by using this we can retrive the Images from database. You can find the source in download.</span> <br /> <div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /> <div class="csharp" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"> <span style="color: #008000;"><</span>asp<span style="color: #008000;">:</span>TemplateField HeaderText<span style="color: #008000;">=</span><span style="color: #666666;">"Image"</span><span style="color: #008000;">></span><br /><br /> <span style="color: #008000;"><</span>ItemTemplate<span style="color: #008000;">></span><br /><br /> <span style="color: #008000;"><</span>asp<span style="color: #008000;">:</span>Image ID<span style="color: #008000;">=</span><span style="color: #666666;">"imgproduct"</span> runat<span style="color: #008000;">=</span><span style="color: #666666;">"server"</span> Width<span style="color: #008000;">=</span><span style="color: #666666;">"100px"</span> Height<span style="color: #008000;">=</span><span style="color: #666666;">"100px"</span> <br /><br /> ImageUrl<span style="color: #008000;">=</span><span style="color: #666666;">'<%# "Product.ashx?pid="+ Eval("PID") %>'</span> <span style="color: #008000;">/></span><br /><br /> <span style="color: #008000;"></</span>ItemTemplate<span style="color: #008000;">></span><br /><br /> <span style="color: #008000;"></</span>asp<span style="color: #008000;">:</span>TemplateField<span style="color: #008000;">></span></div><br /> </div> <br /> <div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilYLwM_hgASPxWEs5oU_xGhv8T0grDKIKfzcQGVSUYX25eeHQkVrLB1GCmuMD52rK7xpHDp8JyrGeHudshUeGbjpm02c3IT4g981yBIsLCSBT-I0t6RDjXtpo7eHeeuUrGWdMwVvuD3foI/s1600-h/Image_DB.JPG"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 154px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilYLwM_hgASPxWEs5oU_xGhv8T0grDKIKfzcQGVSUYX25eeHQkVrLB1GCmuMD52rK7xpHDp8JyrGeHudshUeGbjpm02c3IT4g981yBIsLCSBT-I0t6RDjXtpo7eHeeuUrGWdMwVvuD3foI/s400/Image_DB.JPG" border="0" alt=""id="Img8" /></a></div><br /> <br /> <span style="font-size:85%;"><b>Gridview with checkboxes</b></span> <br /> <span style="font-size:85%;">In many requirements we will have checkboxes in our grid. check here how to get the selected checkbox values inide the gridview</span> <br /> <br /> <div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNWT3FLgmFyT-i9TrRzzANuKOQQVK8uiFIvBhlW1LLl71GOuqnihZnGR3ZrawnKyQbp3prFApb_a6d8iIA89t78yM1KLARqjg1A9nkCWYSu_zkpbfYwYzj2m3B3Q4DwCeJPPIpEHrUdmHj/s1600-h/Grid_checkbox.JPG"><img id="BLOGGER_PHOTO_ID_5281063724118026114" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 221px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNWT3FLgmFyT-i9TrRzzANuKOQQVK8uiFIvBhlW1LLl71GOuqnihZnGR3ZrawnKyQbp3prFApb_a6d8iIA89t78yM1KLARqjg1A9nkCWYSu_zkpbfYwYzj2m3B3Q4DwCeJPPIpEHrUdmHj/s400/Grid_checkbox.JPG" border="0" /></a></div> <br /> <br /> <span style="font-size:85%;"><b>Modalpopup with Gridview</b></span> <br /> <span style="font-size:85%;">In gridview we can show the Ajax Modalpopup, when user clicks on button which placed inside a gridview.</span> <br /> <div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /> <div class="csharp" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"> <span style="color: #0600FF;">if</span> <span style="color: #000000;">(</span>e.<span style="color: #0000FF;">CommandName</span> <span style="color: #008000;">==</span> <span style="color: #666666;">"view"</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #000000;">{</span><br /><br /> <span style="color: #FF0000;">string</span> idval <span style="color: #008000;">=</span> e.<span style="color: #0000FF;">CommandArgument</span>.<span style="color: #0000FF;">ToString</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #008000;">;</span><br /><br /> DataSet ds <span style="color: #008000;">=</span> <span style="color: #000000;">(</span>DataSet<span style="color: #000000;">)</span>Session<span style="color: #000000;">[</span><span style="color: #666666;">"dbsample"</span><span style="color: #000000;">]</span><span style="color: #008000;">;</span><br /><br /> DataRow<span style="color: #000000;">[</span><span style="color: #000000;">]</span> gvw <span style="color: #008000;">=</span> ds.<span style="color: #0000FF;">Tables</span><span style="color: #000000;">[</span><span style="color: #FF0000;">0</span><span style="color: #000000;">]</span>.<span style="color: #0000FF;">Select</span><span style="color: #000000;">(</span><span style="color: #666666;">"ID = '"</span> <span style="color: #008000;">+</span> idval <span style="color: #008000;">+</span> <span style="color: #666666;">"'"</span><span style="color: #000000;">)</span><span style="color: #008000;">;</span><br /><br /> <span style="color: #0600FF;">if</span> <span style="color: #000000;">(</span>gvw.<span style="color: #0000FF;">Length</span> <span style="color: #008000;">></span> <span style="color: #FF0000;">0</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #000000;">{</span><br /><br /> txtname.<span style="color: #0000FF;">Text</span> <span style="color: #008000;">=</span> gvw<span style="color: #000000;">[</span><span style="color: #FF0000;">0</span><span style="color: #000000;">]</span><span style="color: #000000;">[</span><span style="color: #666666;">"Name"</span><span style="color: #000000;">]</span>.<span style="color: #0000FF;">ToString</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #008000;">;</span><br /><br /> txtdept.<span style="color: #0000FF;">Text</span> <span style="color: #008000;">=</span> gvw<span style="color: #000000;">[</span><span style="color: #FF0000;">0</span><span style="color: #000000;">]</span><span style="color: #000000;">[</span><span style="color: #666666;">"Department"</span><span style="color: #000000;">]</span>.<span style="color: #0000FF;">ToString</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #008000;">;</span><br /><br /> txtdesig.<span style="color: #0000FF;">Text</span> <span style="color: #008000;">=</span> gvw<span style="color: #000000;">[</span><span style="color: #FF0000;">0</span><span style="color: #000000;">]</span><span style="color: #000000;">[</span><span style="color: #666666;">"Designation"</span><span style="color: #000000;">]</span>.<span style="color: #0000FF;">ToString</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #008000;">;</span><br /><br /> txtemail.<span style="color: #0000FF;">Text</span> <span style="color: #008000;">=</span> gvw<span style="color: #000000;">[</span><span style="color: #FF0000;">0</span><span style="color: #000000;">]</span><span style="color: #000000;">[</span><span style="color: #666666;">"Email"</span><span style="color: #000000;">]</span>.<span style="color: #0000FF;">ToString</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #008000;">;</span><br /><br /> txtphone.<span style="color: #0000FF;">Text</span> <span style="color: #008000;">=</span> gvw<span style="color: #000000;">[</span><span style="color: #FF0000;">0</span><span style="color: #000000;">]</span><span style="color: #000000;">[</span><span style="color: #666666;">"Phone"</span><span style="color: #000000;">]</span>.<span style="color: #0000FF;">ToString</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #008000;">;</span><br /><br /> txtaddress.<span style="color: #0000FF;">Text</span> <span style="color: #008000;">=</span> gvw<span style="color: #000000;">[</span><span style="color: #FF0000;">0</span><span style="color: #000000;">]</span><span style="color: #000000;">[</span><span style="color: #666666;">"Address"</span><span style="color: #000000;">]</span>.<span style="color: #0000FF;">ToString</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #008000;">;</span><br /><br /> <span style="color: #000000;">}</span><br /><br /> <br /><br /> ModalPopupExtender1.<span style="color: #0000FF;">Show</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #008000;">;</span><br /><br /> <span style="color: #000000;">}</span></div><br /> </div> <br /> <div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7THNfiGFKHE6RIZ8d7AtJDGO7qgdQxwYWzNlqc6XS4lyY3cfvAgOa3eJq3VCxie8EY4ASZ3U_OE4vK-uCPK0Nhjkfs5_RHxM45Ii7LohPZYdYqT5OsKPwjUnsaC0HMs1mV0qEBoSGne2n/s1600-h/Grid_Modal.JPG"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 234px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7THNfiGFKHE6RIZ8d7AtJDGO7qgdQxwYWzNlqc6XS4lyY3cfvAgOa3eJq3VCxie8EY4ASZ3U_OE4vK-uCPK0Nhjkfs5_RHxM45Ii7LohPZYdYqT5OsKPwjUnsaC0HMs1mV0qEBoSGne2n/s400/Grid_Modal.JPG" border="0" alt=""id="Img7" /></a><br /></div><br /> <br /> <span style="font-size:85%;"><b>Hovermenu with Gridview</b></span> <br /> <span style="font-size:85%;">Check out this example, how to integrate a hovermenu with the gridview </span> <br /> <div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /> <div class="csharp" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"> <span style="color: #0600FF;">protected</span> <span style="color: #0600FF;">void</span> grdImage_RowDataBound<span style="color: #000000;">(</span><span style="color: #FF0000;">object</span> sender, GridViewRowEventArgs e<span style="color: #000000;">)</span><br /><br /> <span style="color: #000000;">{</span><br /><br /> <span style="color: #0600FF;">if</span> <span style="color: #000000;">(</span>e.<span style="color: #0000FF;">Row</span>.<span style="color: #0000FF;">RowType</span> <span style="color: #008000;">==</span> DataControlRowType.<span style="color: #0000FF;">DataRow</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #000000;">{</span><br /><br /> AjaxControlToolkit.<span style="color: #0000FF;">HoverMenuExtender</span> hme <span style="color: #008000;">=</span> e.<span style="color: #0000FF;">Row</span>.<span style="color: #0000FF;">FindControl</span><span style="color: #000000;">(</span><span style="color: #666666;">"HoverMenuExtender1"</span><span style="color: #000000;">)</span> <span style="color: #0600FF;">as</span> AjaxControlToolkit.<span style="color: #0000FF;">HoverMenuExtender</span><span style="color: #008000;">;</span><br /><br /> e.<span style="color: #0000FF;">Row</span>.<span style="color: #0000FF;">ID</span> <span style="color: #008000;">=</span> <span style="color: #666666;">"row"</span> <span style="color: #008000;">+</span> e.<span style="color: #0000FF;">Row</span>.<span style="color: #0000FF;">RowIndex</span>.<span style="color: #0000FF;">ToString</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #008000;">;</span><br /><br /> Panel hf <span style="color: #008000;">=</span> e.<span style="color: #0000FF;">Row</span>.<span style="color: #0000FF;">FindControl</span><span style="color: #000000;">(</span><span style="color: #666666;">"pnl1"</span><span style="color: #000000;">)</span> <span style="color: #0600FF;">as</span> Panel<span style="color: #008000;">;</span><br /><br /> hme.<span style="color: #0000FF;">TargetControlID</span> <span style="color: #008000;">=</span> e.<span style="color: #0000FF;">Row</span>.<span style="color: #0000FF;">ID</span><span style="color: #008000;">;</span><br /><br /> <span style="color: #000000;">}</span><br /><br /> <span style="color: #000000;">}</span></div><br /> </div> <br /> <div> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhj09izaBpZKza3LHKI3sJs7HpwH3uf9CmtKANMPbIOYuSVeFeaqbKyxupx0YbXhQeU4tB2oDah2kJqiyGF5-yDpdYA8zuN8rcuYg7TxqWy5Yq6MvtyJlXZDIRp_XqWAOz8bNYSeZ9Oh5ZV/s1600-h/Grid_hover.JPG"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 219px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhj09izaBpZKza3LHKI3sJs7HpwH3uf9CmtKANMPbIOYuSVeFeaqbKyxupx0YbXhQeU4tB2oDah2kJqiyGF5-yDpdYA8zuN8rcuYg7TxqWy5Yq6MvtyJlXZDIRp_XqWAOz8bNYSeZ9Oh5ZV/s400/Grid_hover.JPG" border="0" alt=""id="Img5" /></a></div><br /><br /> <br /> <span style="font-size:85%;"><b>Import Excel to Gridview</b></span> <br /> <span style="font-size:85%;">Check how to Import a XL file and bind it grid view</span> <br /> <div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOl3eCgCt9MIHjznQcqlVJw8p6uzZBura270Lbj9sjWN3c76JHiwa9N4L2dPnzGgc9isCw95QBaSZUPbgKY-srXCFKgkXwba946kv1pbdYoRY96ZBrfagBscIeSOpA7LCI9fLs-a3GQ6Ae/s1600-h/Excel2grid.JPG"><img id="Img2" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 195px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOl3eCgCt9MIHjznQcqlVJw8p6uzZBura270Lbj9sjWN3c76JHiwa9N4L2dPnzGgc9isCw95QBaSZUPbgKY-srXCFKgkXwba946kv1pbdYoRY96ZBrfagBscIeSOpA7LCI9fLs-a3GQ6Ae/s400/Excel2grid.JPG" border="0" /></a></div> <br /> <br /> <span style="font-size:85%;"><b>Import Gridview to Excel</b></span> <br /> <span style="font-size:85%;">Export the selected rows in gridview to Excel</span> <br /> <div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd6rKQnFneVZ8Cm9kATWLP-URR8gGxQqTOnVSu9xMD5337fMOfKFqjj-eQsFOJr9NZAGFvYwBSQPgilRiMWrX9d6In03TLsCgswFYIA3PNSXb03v3j943KWdLbBtHIAg6X3xFG0QtzelLd/s1600-h/Grid2excel.JPG"><img id="Img1" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 213px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd6rKQnFneVZ8Cm9kATWLP-URR8gGxQqTOnVSu9xMD5337fMOfKFqjj-eQsFOJr9NZAGFvYwBSQPgilRiMWrX9d6In03TLsCgswFYIA3PNSXb03v3j943KWdLbBtHIAg6X3xFG0QtzelLd/s400/Grid2excel.JPG" border="0" /></a></div> <br /> <br /> <span style="font-size:85%;"><b>Using Filters in Gridview</b></span> <br /> <span style="font-size:85%;">Check here how to use the filters in gridview</span> <br /> <div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9XXUNYckoiQv4yaUwSLn03zgUwCvoBnt43EjgCjQPNkIX7_zFTUDffZpPRxsfoUY_AHXtlL0Vwt2yidPy6Zj0nmyJ8GI83bTYMRcZJwZK9lQHoI39FQeKjIBTetZvfL_ABeZrDns6YRTU/s1600-h/Grid_filter.JPG"><img id="Img3" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 253px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9XXUNYckoiQv4yaUwSLn03zgUwCvoBnt43EjgCjQPNkIX7_zFTUDffZpPRxsfoUY_AHXtlL0Vwt2yidPy6Zj0nmyJ8GI83bTYMRcZJwZK9lQHoI39FQeKjIBTetZvfL_ABeZrDns6YRTU/s400/Grid_filter.JPG" border="0" /></a></div> <br /> <br /> <br /> <span style="font-size:85%;"><a href="http://www.4shared.com/file/76517398/15cab3ce/GridviewEvents.html" target=_blank>Source Code</a><br /></span>Ramkyhttp://www.blogger.com/profile/05722860132583858043noreply@blogger.com6tag:blogger.com,1999:blog-4955511806150724268.post-68175602624278486392008-12-14T22:11:00.000-08:002008-12-14T22:23:54.792-08:00Alphabetic User Control<span style="font-size:85%;">In some situations we may have a requirement to search the records Alphabetic wise. For these type of requirement we have to take 26 alphabets and when we have to generate click events to know which alphabet clicked. Its not a good way to generate 26 button click events. Instead of that we can take Command Name and we will call the same function. And if we make a user control, this control can used many times in our project.</span><br /><span style="font-size:85%;">First Add a Webuser control to your project and name it as “Alphabetic_Control.ascx”. Then add 26 link buttons. Each button has “Command Name” and “onclick” events. </span><br /><span style="font-size:85%;">“Command Name” contains the text of the link button like A, B, etc. and all “onclick” events of 26 link button calls “SelectList_Alpha” function.</span><br /><span style="font-size:85%;">The final user control code is:</span><br /><br /><br /><div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /><br /><br /><div class="csharp" style="BORDER-RIGHT: #d0d0d0 1px solid; BORDER-TOP: #d0d0d0 1px solid; BORDER-LEFT: #d0d0d0 1px solid; COLOR: #006; BORDER-BOTTOM: #d0d0d0 1px solid; FONT-FAMILY: monospace; BACKGROUND-COLOR: #f0f0f0"><br /><br /><ol><br /><br /><li style="FONT: 130% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#008000;"><</span>asp<span style="color:#008000;">:</span>LinkButton ID<span style="color:#008000;">=</span><span style="color:#666666;">"lnkA"</span> runat<span style="color:#008000;">=</span><span style="color:#666666;">"server"</span> CommandName<span style="color:#008000;">=</span><span style="color:#666666;">"A"</span> Text<span style="color:#008000;">=</span><span style="color:#666666;">"A"</span> OnClick<span style="color:#008000;">=</span><span style="color:#666666;">"SelectList_Alpha"</span><span style="color:#008000;">></</span>asp<span style="color:#008000;">:</span>LinkButton<span style="color:#008000;">></span> <span style="color:#008000;">-</span></div></li><br /><br /><br /><li style="FONT: 130% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#008000;"><</span>asp<span style="color:#008000;">:</span>LinkButton ID<span style="color:#008000;">=</span><span style="color:#666666;">"lnkB"</span> runat<span style="color:#008000;">=</span><span style="color:#666666;">"server"</span> CommandName<span style="color:#008000;">=</span><span style="color:#666666;">"B"</span> Text<span style="color:#008000;">=</span><span style="color:#666666;">"B"</span> OnClick<span style="color:#008000;">=</span><span style="color:#666666;">"SelectList_Alpha"</span><span style="color:#008000;">></</span>asp<span style="color:#008000;">:</span>LinkButton<span style="color:#008000;">></span> <span style="color:#008000;">-</span></div></li><br /><br /><br /><li style="FONT: 130% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#008000;"><</span>asp<span style="color:#008000;">:</span>LinkButton ID<span style="color:#008000;">=</span><span style="color:#666666;">"lnkC"</span> runat<span style="color:#008000;">=</span><span style="color:#666666;">"server"</span> CommandName<span style="color:#008000;">=</span><span style="color:#666666;">"C"</span> Text<span style="color:#008000;">=</span><span style="color:#666666;">"C"</span> OnClick<span style="color:#008000;">=</span><span style="color:#666666;">"SelectList_Alpha"</span><span style="color:#008000;">></</span>asp<span style="color:#008000;">:</span>LinkButton<span style="color:#008000;">></span> <span style="color:#008000;">-</span></div></li><br /><br /><br /><li style="FONT: 130% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#008000;"><</span>asp<span style="color:#008000;">:</span>LinkButton ID<span style="color:#008000;">=</span><span style="color:#666666;">"lnkD"</span> runat<span style="color:#008000;">=</span><span style="color:#666666;">"server"</span> CommandName<span style="color:#008000;">=</span><span style="color:#666666;">"D"</span> Text<span style="color:#008000;">=</span><span style="color:#666666;">"D"</span> OnClick<span style="color:#008000;">=</span><span style="color:#666666;">"SelectList_Alpha"</span><span style="color:#008000;">></</span>asp<span style="color:#008000;">:</span>LinkButton<span style="color:#008000;">></span> <span style="color:#008000;">-</span></div></li><br /><br /><br /><li style="FONT-WEIGHT: bold; VERTICAL-ALIGN: top; COLOR: #006060"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#008000;"><</span>asp<span style="color:#008000;">:</span>LinkButton ID<span style="color:#008000;">=</span><span style="color:#666666;">"lnkE"</span> runat<span style="color:#008000;">=</span><span style="color:#666666;">"server"</span> CommandName<span style="color:#008000;">=</span><span style="color:#666666;">"E"</span> Text<span style="color:#008000;">=</span><span style="color:#666666;">"E"</span> OnClick<span style="color:#008000;">=</span><span style="color:#666666;">"SelectList_Alpha"</span><span style="color:#008000;">></</span>asp<span style="color:#008000;">:</span>LinkButton<span style="color:#008000;">></span> <span style="color:#008000;">-</span></div></li><br /><br /><br /><li style="FONT: 130% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#008000;"><</span>asp<span style="color:#008000;">:</span>LinkButton ID<span style="color:#008000;">=</span><span style="color:#666666;">"lnkF"</span> runat<span style="color:#008000;">=</span><span style="color:#666666;">"server"</span> CommandName<span style="color:#008000;">=</span><span style="color:#666666;">"F"</span> Text<span style="color:#008000;">=</span><span style="color:#666666;">"F"</span> OnClick<span style="color:#008000;">=</span><span style="color:#666666;">"SelectList_Alpha"</span><span style="color:#008000;">></</span>asp<span style="color:#008000;">:</span>LinkButton<span style="color:#008000;">></span> <span style="color:#008000;">-</span></div></li><br /><br /><br /><li style="FONT: 130% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#008000;"><</span>asp<span style="color:#008000;">:</span>LinkButton ID<span style="color:#008000;">=</span><span style="color:#666666;">"lnkG"</span> runat<span style="color:#008000;">=</span><span style="color:#666666;">"server"</span> CommandName<span style="color:#008000;">=</span><span style="color:#666666;">"G"</span> Text<span style="color:#008000;">=</span><span style="color:#666666;">"G"</span> OnClick<span style="color:#008000;">=</span><span style="color:#666666;">"SelectList_Alpha"</span><span style="color:#008000;">></</span>asp<span style="color:#008000;">:</span>LinkButton<span style="color:#008000;">></span> <span style="color:#008000;">-</span></div></li><br /><br /><br /><li style="FONT: 130% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#008000;"><</span>asp<span style="color:#008000;">:</span>LinkButton ID<span style="color:#008000;">=</span><span style="color:#666666;">"lnkH"</span> runat<span style="color:#008000;">=</span><span style="color:#666666;">"server"</span> CommandName<span style="color:#008000;">=</span><span style="color:#666666;">"H"</span> Text<span style="color:#008000;">=</span><span style="color:#666666;">"H"</span> OnClick<span style="color:#008000;">=</span><span style="color:#666666;">"SelectList_Alpha"</span><span style="color:#008000;">></</span>asp<span style="color:#008000;">:</span>LinkButton<span style="color:#008000;">></span> <span style="color:#008000;">-</span></div></li><br /><br /><br /><li style="FONT: 130% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#008000;"><</span>asp<span style="color:#008000;">:</span>LinkButton ID<span style="color:#008000;">=</span><span style="color:#666666;">"lnkI"</span> runat<span style="color:#008000;">=</span><span style="color:#666666;">"server"</span> CommandName<span style="color:#008000;">=</span><span style="color:#666666;">"I"</span> Text<span style="color:#008000;">=</span><span style="color:#666666;">"I"</span> OnClick<span style="color:#008000;">=</span><span style="color:#666666;">"SelectList_Alpha"</span><span style="color:#008000;">></</span>asp<span style="color:#008000;">:</span>LinkButton<span style="color:#008000;">></span> <span style="color:#008000;">-</span></div></li><br /><br /><br /><li style="FONT-WEIGHT: bold; VERTICAL-ALIGN: top; COLOR: #006060"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#008000;"><</span>asp<span style="color:#008000;">:</span>LinkButton ID<span style="color:#008000;">=</span><span style="color:#666666;">"lnkJ"</span> runat<span style="color:#008000;">=</span><span style="color:#666666;">"server"</span> CommandName<span style="color:#008000;">=</span><span style="color:#666666;">"J"</span> Text<span style="color:#008000;">=</span><span style="color:#666666;">"J"</span> OnClick<span style="color:#008000;">=</span><span style="color:#666666;">"SelectList_Alpha"</span><span style="color:#008000;">></</span>asp<span style="color:#008000;">:</span>LinkButton<span style="color:#008000;">></span> <span style="color:#008000;">-</span></div></li><br /><br /><br /><li style="FONT: 130% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#008000;"><</span>asp<span style="color:#008000;">:</span>LinkButton ID<span style="color:#008000;">=</span><span style="color:#666666;">"lnkK"</span> runat<span style="color:#008000;">=</span><span style="color:#666666;">"server"</span> CommandName<span style="color:#008000;">=</span><span style="color:#666666;">"K"</span> Text<span style="color:#008000;">=</span><span style="color:#666666;">"K"</span> OnClick<span style="color:#008000;">=</span><span style="color:#666666;">"SelectList_Alpha"</span><span style="color:#008000;">></</span>asp<span style="color:#008000;">:</span>LinkButton<span style="color:#008000;">></span> <span style="color:#008000;">-</span></div></li><br /><br /><br /><li style="FONT: 130% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#008000;"><</span>asp<span style="color:#008000;">:</span>LinkButton ID<span style="color:#008000;">=</span><span style="color:#666666;">"lnkL"</span> runat<span style="color:#008000;">=</span><span style="color:#666666;">"server"</span> CommandName<span style="color:#008000;">=</span><span style="color:#666666;">"L"</span> Text<span style="color:#008000;">=</span><span style="color:#666666;">"L"</span> OnClick<span style="color:#008000;">=</span><span style="color:#666666;">"SelectList_Alpha"</span><span style="color:#008000;">></</span>asp<span style="color:#008000;">:</span>LinkButton<span style="color:#008000;">></span> <span style="color:#008000;">-</span></div></li><br /><br /><br /><li style="FONT: 130% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#008000;"><</span>asp<span style="color:#008000;">:</span>LinkButton ID<span style="color:#008000;">=</span><span style="color:#666666;">"lnkM"</span> runat<span style="color:#008000;">=</span><span style="color:#666666;">"server"</span> CommandName<span style="color:#008000;">=</span><span style="color:#666666;">"M"</span> Text<span style="color:#008000;">=</span><span style="color:#666666;">"M"</span> OnClick<span style="color:#008000;">=</span><span style="color:#666666;">"SelectList_Alpha"</span><span style="color:#008000;">></</span>asp<span style="color:#008000;">:</span>LinkButton<span style="color:#008000;">></span> <span style="color:#008000;">-</span></div></li><br /><br /><br /><li style="FONT: 130% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#008000;"><</span>asp<span style="color:#008000;">:</span>LinkButton ID<span style="color:#008000;">=</span><span style="color:#666666;">"lnkN"</span> runat<span style="color:#008000;">=</span><span style="color:#666666;">"server"</span> CommandName<span style="color:#008000;">=</span><span style="color:#666666;">"N"</span> Text<span style="color:#008000;">=</span><span style="color:#666666;">"N"</span> OnClick<span style="color:#008000;">=</span><span style="color:#666666;">"SelectList_Alpha"</span><span style="color:#008000;">></</span>asp<span style="color:#008000;">:</span>LinkButton<span style="color:#008000;">></span> <span style="color:#008000;">-</span></div></li><br /><br /><br /><li style="FONT-WEIGHT: bold; VERTICAL-ALIGN: top; COLOR: #006060"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#008000;"><</span>asp<span style="color:#008000;">:</span>LinkButton ID<span style="color:#008000;">=</span><span style="color:#666666;">"lnkO"</span> runat<span style="color:#008000;">=</span><span style="color:#666666;">"server"</span> CommandName<span style="color:#008000;">=</span><span style="color:#666666;">"O"</span> Text<span style="color:#008000;">=</span><span style="color:#666666;">"O"</span> OnClick<span style="color:#008000;">=</span><span style="color:#666666;">"SelectList_Alpha"</span><span style="color:#008000;">></</span>asp<span style="color:#008000;">:</span>LinkButton<span style="color:#008000;">></span> <span style="color:#008000;">-</span></div></li><br /><br /><br /><li style="FONT: 130% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#008000;"><</span>asp<span style="color:#008000;">:</span>LinkButton ID<span style="color:#008000;">=</span><span style="color:#666666;">"lnkP"</span> runat<span style="color:#008000;">=</span><span style="color:#666666;">"server"</span> CommandName<span style="color:#008000;">=</span><span style="color:#666666;">"P"</span> Text<span style="color:#008000;">=</span><span style="color:#666666;">"P"</span> OnClick<span style="color:#008000;">=</span><span style="color:#666666;">"SelectList_Alpha"</span><span style="color:#008000;">></</span>asp<span style="color:#008000;">:</span>LinkButton<span style="color:#008000;">></span> <span style="color:#008000;">-</span></div></li><br /><br /><br /><li style="FONT: 130% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#008000;"><</span>asp<span style="color:#008000;">:</span>LinkButton ID<span style="color:#008000;">=</span><span style="color:#666666;">"lnkQ"</span> runat<span style="color:#008000;">=</span><span style="color:#666666;">"server"</span> CommandName<span style="color:#008000;">=</span><span style="color:#666666;">"Q"</span> Text<span style="color:#008000;">=</span><span style="color:#666666;">"Q"</span> OnClick<span style="color:#008000;">=</span><span style="color:#666666;">"SelectList_Alpha"</span><span style="color:#008000;">></</span>asp<span style="color:#008000;">:</span>LinkButton<span style="color:#008000;">></span> <span style="color:#008000;">-</span></div></li><br /><br /><br /><li style="FONT: 130% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#008000;"><</span>asp<span style="color:#008000;">:</span>LinkButton ID<span style="color:#008000;">=</span><span style="color:#666666;">"lnkR"</span> runat<span style="color:#008000;">=</span><span style="color:#666666;">"server"</span> CommandName<span style="color:#008000;">=</span><span style="color:#666666;">"R"</span> Text<span style="color:#008000;">=</span><span style="color:#666666;">"R"</span> OnClick<span style="color:#008000;">=</span><span style="color:#666666;">"SelectList_Alpha"</span><span style="color:#008000;">></</span>asp<span style="color:#008000;">:</span>LinkButton<span style="color:#008000;">></span> <span style="color:#008000;">-</span></div></li><br /><br /><br /><li style="FONT: 130% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#008000;"><</span>asp<span style="color:#008000;">:</span>LinkButton ID<span style="color:#008000;">=</span><span style="color:#666666;">"lnkS"</span> runat<span style="color:#008000;">=</span><span style="color:#666666;">"server"</span> CommandName<span style="color:#008000;">=</span><span style="color:#666666;">"S"</span> Text<span style="color:#008000;">=</span><span style="color:#666666;">"S"</span> OnClick<span style="color:#008000;">=</span><span style="color:#666666;">"SelectList_Alpha"</span><span style="color:#008000;">></</span>asp<span style="color:#008000;">:</span>LinkButton<span style="color:#008000;">></span> <span style="color:#008000;">-</span></div></li><br /><br /><br /><li style="FONT-WEIGHT: bold; VERTICAL-ALIGN: top; COLOR: #006060"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#008000;"><</span>asp<span style="color:#008000;">:</span>LinkButton ID<span style="color:#008000;">=</span><span style="color:#666666;">"lnkT"</span> runat<span style="color:#008000;">=</span><span style="color:#666666;">"server"</span> CommandName<span style="color:#008000;">=</span><span style="color:#666666;">"T"</span> Text<span style="color:#008000;">=</span><span style="color:#666666;">"T"</span> OnClick<span style="color:#008000;">=</span><span style="color:#666666;">"SelectList_Alpha"</span><span style="color:#008000;">></</span>asp<span style="color:#008000;">:</span>LinkButton<span style="color:#008000;">></span> <span style="color:#008000;">-</span></div></li><br /><br /><br /><li style="FONT: 130% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#008000;"><</span>asp<span style="color:#008000;">:</span>LinkButton ID<span style="color:#008000;">=</span><span style="color:#666666;">"lnkU"</span> runat<span style="color:#008000;">=</span><span style="color:#666666;">"server"</span> CommandName<span style="color:#008000;">=</span><span style="color:#666666;">"U"</span> Text<span style="color:#008000;">=</span><span style="color:#666666;">"U"</span> OnClick<span style="color:#008000;">=</span><span style="color:#666666;">"SelectList_Alpha"</span><span style="color:#008000;">></</span>asp<span style="color:#008000;">:</span>LinkButton<span style="color:#008000;">></span> <span style="color:#008000;">-</span></div></li><br /><br /><br /><li style="FONT: 130% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#008000;"><</span>asp<span style="color:#008000;">:</span>LinkButton ID<span style="color:#008000;">=</span><span style="color:#666666;">"lnkV"</span> runat<span style="color:#008000;">=</span><span style="color:#666666;">"server"</span> CommandName<span style="color:#008000;">=</span><span style="color:#666666;">"V"</span> Text<span style="color:#008000;">=</span><span style="color:#666666;">"V"</span> OnClick<span style="color:#008000;">=</span><span style="color:#666666;">"SelectList_Alpha"</span><span style="color:#008000;">></</span>asp<span style="color:#008000;">:</span>LinkButton<span style="color:#008000;">></span> <span style="color:#008000;">-</span></div></li><br /><br /><br /><li style="FONT: 130% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#008000;"><</span>asp<span style="color:#008000;">:</span>LinkButton ID<span style="color:#008000;">=</span><span style="color:#666666;">"lnkW"</span> runat<span style="color:#008000;">=</span><span style="color:#666666;">"server"</span> CommandName<span style="color:#008000;">=</span><span style="color:#666666;">"W"</span> Text<span style="color:#008000;">=</span><span style="color:#666666;">"W"</span> OnClick<span style="color:#008000;">=</span><span style="color:#666666;">"SelectList_Alpha"</span><span style="color:#008000;">></</span>asp<span style="color:#008000;">:</span>LinkButton<span style="color:#008000;">></span> <span style="color:#008000;">-</span></div></li><br /><br /><br /><li style="FONT: 130% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#008000;"><</span>asp<span style="color:#008000;">:</span>LinkButton ID<span style="color:#008000;">=</span><span style="color:#666666;">"lnkX"</span> runat<span style="color:#008000;">=</span><span style="color:#666666;">"server"</span> CommandName<span style="color:#008000;">=</span><span style="color:#666666;">"X"</span> Text<span style="color:#008000;">=</span><span style="color:#666666;">"X"</span> OnClick<span style="color:#008000;">=</span><span style="color:#666666;">"SelectList_Alpha"</span><span style="color:#008000;">></</span>asp<span style="color:#008000;">:</span>LinkButton<span style="color:#008000;">></span> <span style="color:#008000;">-</span></div></li><br /><br /><br /><li style="FONT-WEIGHT: bold; VERTICAL-ALIGN: top; COLOR: #006060"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#008000;"><</span>asp<span style="color:#008000;">:</span>LinkButton ID<span style="color:#008000;">=</span><span style="color:#666666;">"lnkY"</span> runat<span style="color:#008000;">=</span><span style="color:#666666;">"server"</span> CommandName<span style="color:#008000;">=</span><span style="color:#666666;">"Y"</span> Text<span style="color:#008000;">=</span><span style="color:#666666;">"Y"</span> OnClick<span style="color:#008000;">=</span><span style="color:#666666;">"SelectList_Alpha"</span><span style="color:#008000;">></</span>asp<span style="color:#008000;">:</span>LinkButton<span style="color:#008000;">></span> <span style="color:#008000;">-</span></div></li><br /><br /><br /><li style="FONT: 130% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#008000;"><</span>asp<span style="color:#008000;">:</span>LinkButton ID<span style="color:#008000;">=</span><span style="color:#666666;">"lnkZ"</span> runat<span style="color:#008000;">=</span><span style="color:#666666;">"server"</span> CommandName<span style="color:#008000;">=</span><span style="color:#666666;">"Z"</span> Text<span style="color:#008000;">=</span><span style="color:#666666;">"Z"</span> OnClick<span style="color:#008000;">=</span><span style="color:#666666;">"SelectList_Alpha"</span><span style="color:#008000;">></</span>asp<span style="color:#008000;">:</span>LinkButton<span style="color:#008000;">></span> </div></li><br /><br /><br /><li style="FONT: 130% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"></div></li><br /></ol></div><br /></div><br /><span style="font-size:85%;">Write the “SelectList_Alpha” function in the code behind. The complete code is..</span><br /><span style="font-size:85%;">The User control designing is completed, Now we have to generate a “Click” events to this User Control. The reason to create “Click” event is when we take this user control to other page it will not fire the click event. We have to create a “Click” event explicitly. For this we need to create a “Delegate” and “Event Handler”. It can shown as..</span><br /><br /><br /><div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /><br /><br /><div class="csharp" style="BORDER-RIGHT: #d0d0d0 1px solid; BORDER-TOP: #d0d0d0 1px solid; BORDER-LEFT: #d0d0d0 1px solid; COLOR: #006; BORDER-BOTTOM: #d0d0d0 1px solid; FONT-FAMILY: monospace; BACKGROUND-COLOR: #f0f0f0"><br /><br /><ol><br /><br /><li style="FONT: 130% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#0600ff;">public</span> <span style="color:#ff0000;">delegate</span> <span style="color:#0600ff;">void</span> ClickEventHandler<span style="color:#000000;">(</span><span style="color:#ff0000;">object</span> sender, EventArgs e<span style="color:#000000;">)</span><span style="color:#008000;">;</span></div></li><br /><br /><br /><li style="FONT: 130% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#0600ff;">public</span> <span style="color:#0600ff;">event</span> ClickEventHandler Click<span style="color:#008000;">;</span></div></li><br /><br /><br /><li style="FONT: 130% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"></div></li><br /><br /><br /><li style="FONT: 130% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#0600ff;">protected</span> <span style="color:#0600ff;">void</span> SelectList_Alpha<span style="color:#000000;">(</span><span style="color:#ff0000;">object</span> sender, EventArgs e<span style="color:#000000;">)</span></div></li><br /><br /><br /><li style="FONT-WEIGHT: bold; VERTICAL-ALIGN: top; COLOR: #006060"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#000000;">{</span></div></li><br /><br /><br /><li style="FONT: 130% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">LinkButton lnk <span style="color:#008000;">=</span> <span style="color:#000000;">(</span>LinkButton<span style="color:#000000;">)</span>sender<span style="color:#008000;">;</span></div></li><br /><br /><br /><li style="FONT: 130% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">Click<span style="color:#000000;">(</span>sender, e<span style="color:#000000;">)</span><span style="color:#008000;">;</span></div></li><br /><br /><br /><li style="FONT: 130% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#000000;">}</span></div></li><br /></ol></div><br /></div><br /><span style="font-size:85%;">Now create new page as “AlphaTest.aspx” in this page go to “design” view and drag the user control which we created. </span><br /><span style="font-size:85%;">Now go the code behind of “AlphaText.aspx”. In the page_load event create a delegate. The delegate can be created as.<br /></span><br /><br /><br /><div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /><br /><br /><div class="csharp" style="BORDER-RIGHT: #d0d0d0 1px solid; BORDER-TOP: #d0d0d0 1px solid; BORDER-LEFT: #d0d0d0 1px solid; COLOR: #006; BORDER-BOTTOM: #d0d0d0 1px solid; FONT-FAMILY: monospace; BACKGROUND-COLOR: #f0f0f0"><br /><br /><ol><br /><br /><li style="FONT: 130% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">Alphabetic_Control1.<span style="color:#0000ff;">Click</span> <span style="color:#008000;">+=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> Alphabetic_Control.<span style="color:#0000ff;">ClickEventHandler</span><span style="color:#000000;">(</span>Alphabetic_Control1_Click<span style="color:#000000;">)</span><span style="color:#008000;">;</span> </div></li><br /></ol></div><br /></div><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJ3pViBmzYjSN30a-B0Ysn0KFlbhE-0oMD5BAcY3-bHpHQsDnpjQmt2oVCcgoO3HkXsWHKT2NSMS5cXf7w-N6OqeGjvTDGhaeEXIqCFrcvQHF72RwKWIrVPtHs5gPpNW05PMjubEqZtZhl/s1600-h/delegate.JPG"><img id="BLOGGER_PHOTO_ID_5279896178682870530" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 300px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJ3pViBmzYjSN30a-B0Ysn0KFlbhE-0oMD5BAcY3-bHpHQsDnpjQmt2oVCcgoO3HkXsWHKT2NSMS5cXf7w-N6OqeGjvTDGhaeEXIqCFrcvQHF72RwKWIrVPtHs5gPpNW05PMjubEqZtZhl/s400/delegate.JPG" border="0" /></a><br /><span style="font-size:85%;">The above code can be achieved as, First the ID of the User control, i.e, AplhaBeticcontrol1. when we put a “.” Inside that it will show all the methods and events. In that one select “Click”. Then put a “+”and “=” automatically designer will tell you to press the “Tab” button. Press 2 times it will generate the “Click” event.</span><br /><span style="font-size:85%;">In the click event write the fallowing code..</span><br /><br /><br /><div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /><br /><br /><div class="csharp" style="BORDER-RIGHT: #d0d0d0 1px solid; BORDER-TOP: #d0d0d0 1px solid; BORDER-LEFT: #d0d0d0 1px solid; COLOR: #006; BORDER-BOTTOM: #d0d0d0 1px solid; FONT-FAMILY: monospace; BACKGROUND-COLOR: #f0f0f0"><br /><br /><ol><br /><br /><li style="FONT: 130% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#0600ff;">protected</span> <span style="color:#0600ff;">void</span> Alphabetic_Control1_Click<span style="color:#000000;">(</span><span style="color:#ff0000;">object</span> sender, EventArgs e<span style="color:#000000;">)</span></div></li><br /><br /><br /><li style="FONT: 130% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#000000;">{</span></div></li><br /><br /><br /><li style="FONT: 130% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">LinkButton lnkbtn <span style="color:#008000;">=</span> <span style="color:#000000;">(</span>LinkButton<span style="color:#000000;">)</span>sender<span style="color:#008000;">;</span></div></li><br /><br /><br /><li style="FONT: 130% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">Response.<span style="color:#0000ff;">Write</span><span style="color:#000000;">(</span><span style="color:#666666;">"You Selected : "</span> <span style="color:#008000;">+</span> lnkbtn.<span style="color:#0000ff;">CommandName</span>.<span style="color:#0000ff;">ToString</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span><span style="color:#008000;">;</span></div></li><br /><br /><br /><li style="FONT-WEIGHT: bold; VERTICAL-ALIGN: top; COLOR: #006060"><br /><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#000000;">}</span></div></li><br /></ol></div><br /></div><br /><br /><span style="font-size:85%;">Now run the "AlphaTest.aspx" page, when ever you click on the user control a event will be fired.</span><br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNTXTrRgCuTKavLETD4QmeSJV6d9xwoBKfLz-utBucoJIa1UtwmOUtsybMPSfeX_hU28tp0HEJsKLfiJdxPwpYFOzM7JFKeTc_kBQykqjAnKNUCwkMIPk3u0WdDhmiASWi3rZlN6n-5OYV/s1600-h/Alpha.JPG"><img id="BLOGGER_PHOTO_ID_5279896922803253602" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 300px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNTXTrRgCuTKavLETD4QmeSJV6d9xwoBKfLz-utBucoJIa1UtwmOUtsybMPSfeX_hU28tp0HEJsKLfiJdxPwpYFOzM7JFKeTc_kBQykqjAnKNUCwkMIPk3u0WdDhmiASWi3rZlN6n-5OYV/s400/Alpha.JPG" border="0" /></a><br /><span style="font-size:85%;"><a href="http://www.4shared.com/file/76025975/450b44c3/Alphabetic.html" target="_blank">Download Sample Code</a><br /></span>Ramkyhttp://www.blogger.com/profile/05722860132583858043noreply@blogger.com3tag:blogger.com,1999:blog-4955511806150724268.post-69714145560726506362008-11-22T00:53:00.000-08:002008-11-22T02:37:12.687-08:00Forms Authentication with Active Directory in ASP.Net2.0<div><span style="font-size:85%;"><br /><br /><p><b>What Is Active Directory</b><br />An active directory is a directory structure used on Microsoft Windows based computers and servers to store information and data about networks and domains.<br /></span><span style="font-size:85%;">ASP.Net 2.0 has membership feature which we can use for forms authentication. This feature provides an abstraction for the underlying data store that is used to maintain user credentials like as user name, password. </span><span style="font-size:85%;">The membership feature includes an API that helps you to easily validate user credentials and manage the user database.</span><br /><span style="font-size:85%;">To use Active Directory (AD) in ASP.Net, First we have to create “Instance For ADAM” and configuration of it. Then I will create a sample application and explain how to interact ADAM with ASP.Net. </span><br /><span style="font-size:85%;"><b>Creating Instance and Configuration:</b></span><br /><span style="font-size:85%;">Install ADAM software. Then select “Create an ADAM Instance” in the start menu.</span><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB_3nvD6IA3jB-vP58fF8EyVEEl7b5Aa9HKlI41jRHBw7RdmOxJcJFFahrd_1YUllnFGnRYPTx37J1YCQqlCLjkWe1GMXSlwWz7vvHLa6Qv8tT-Yl-ohpvnUQyqCe9651QMwV2g8DHkVH0/s1600-h/1.JPG"><img id="BLOGGER_PHOTO_ID_5271404575495002258" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 301px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB_3nvD6IA3jB-vP58fF8EyVEEl7b5Aa9HKlI41jRHBw7RdmOxJcJFFahrd_1YUllnFGnRYPTx37J1YCQqlCLjkWe1GMXSlwWz7vvHLa6Qv8tT-Yl-ohpvnUQyqCe9651QMwV2g8DHkVH0/s400/1.JPG" border="0" /></a><br /><span style="font-size:85%;">Select “A Unique Instance”, then give some name to the Instance</span><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixcz1w7_Mye_VYM03ZE04CygvrNPHmdRZdsUkrhCdfYNyRSfBe5b-KhwL2Z6QK_FOMZKPrj1vCjcZ_de409bisJCRguaeQ8Mm5O_-_E-cvSLrjoNo1RbjR5QbIWuLZVLM1MO_RRfNDQaDk/s1600-h/2.JPG"><img id="BLOGGER_PHOTO_ID_5271404996981482994" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 307px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixcz1w7_Mye_VYM03ZE04CygvrNPHmdRZdsUkrhCdfYNyRSfBe5b-KhwL2Z6QK_FOMZKPrj1vCjcZ_de409bisJCRguaeQ8Mm5O_-_E-cvSLrjoNo1RbjR5QbIWuLZVLM1MO_RRfNDQaDk/s400/2.JPG" border="0" /></a><br /><span style="font-size:85%;">Give a Port number, leave default SSL port number.</span><br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcH8nUR07ggQhfb87F-WPYaMIdoPJr__PWFXT8cg9A4V-amKfTX5JJabLZywe6CgGMK3HQaZOpt9eSbIXdMQceKGlp4Wq5RqspFWeib2eR3rdyGn2udTOyOnL2rVImHFlW4JrSq8V1l0Nv/s1600-h/3.JPG"><img id="BLOGGER_PHOTO_ID_5271405344461085826" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 307px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcH8nUR07ggQhfb87F-WPYaMIdoPJr__PWFXT8cg9A4V-amKfTX5JJabLZywe6CgGMK3HQaZOpt9eSbIXdMQceKGlp4Wq5RqspFWeib2eR3rdyGn2udTOyOnL2rVImHFlW4JrSq8V1l0Nv/s400/3.JPG" border="0" /></a><br /><br /><span style="font-size:85%;">Select “Yes, to create an application directory partition”.</span><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2E1mGjGWtRnREcbHEJFlxB91He1k6_rqfPZMwUqAKRcQAVzYwYbzgn-Q2LgHF6-DM1rvKWVQlE5EQOQRL0Jc6SKqA62lDGFh8rJ_oloztSHVa5WI4Os1kJp2WQ8T9jXdh7XX0HfHhvy7f/s1600-h/4.JPG"><img id="BLOGGER_PHOTO_ID_5271405344573111746" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 307px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2E1mGjGWtRnREcbHEJFlxB91He1k6_rqfPZMwUqAKRcQAVzYwYbzgn-Q2LgHF6-DM1rvKWVQlE5EQOQRL0Jc6SKqA62lDGFh8rJ_oloztSHVa5WI4Os1kJp2WQ8T9jXdh7XX0HfHhvy7f/s400/4.JPG" border="0" /></a><br /><span style="font-size:85%;">Here O,DC are the LDAP attributes.</span><br /><span style="font-size:85%;">Leave default values for location of data file and backup file.</span><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgvAcDak-bxw27ccpm41iQtiwssPRe9OAmfT8LqNH5vyALbti5JCZnw_o5qRXZ8yOr6hEF9WxxhORNLMCIOavrkzYtZEMimlEC0QQW40ZYy_CJ5hc8Tgcxg-Bc5gdReck2f3wuUm3WZtkz/s1600-h/5.JPG"><img id="BLOGGER_PHOTO_ID_5271405351487591122" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 307px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgvAcDak-bxw27ccpm41iQtiwssPRe9OAmfT8LqNH5vyALbti5JCZnw_o5qRXZ8yOr6hEF9WxxhORNLMCIOavrkzYtZEMimlEC0QQW40ZYy_CJ5hc8Tgcxg-Bc5gdReck2f3wuUm3WZtkz/s400/5.JPG" border="0" /></a><br /><span style="font-size:85%;">Provide the account under which this account runs.</span><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjizq6ZhGqUn6BiNNFHXi-7iiThQYGtMRTyon3hAfhNpwM95M8UkU7bpO5VEjsKbPKibzUXNQOCWjeXeRKxod-jnaQshFdoLxDHzbBqk3gpHalxB6KWX1_wGSZdVoogMQdQV4EFOfTF4I1U/s1600-h/6.JPG"><img id="BLOGGER_PHOTO_ID_5271405347981053938" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 307px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjizq6ZhGqUn6BiNNFHXi-7iiThQYGtMRTyon3hAfhNpwM95M8UkU7bpO5VEjsKbPKibzUXNQOCWjeXeRKxod-jnaQshFdoLxDHzbBqk3gpHalxB6KWX1_wGSZdVoogMQdQV4EFOfTF4I1U/s400/6.JPG" border="0" /></a><br /><span style="font-size:85%;">It will prompt for confirmation,select “YES”. Then select System </span><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3LBkVZTAt2KOHNqmtUf-K8YsNZ0Am8PRSEkkjlSI6P0FV1XPnAPqQzU4q7zJpwy0j32PJFkILLOhk7uvZEg42hq-SouhtBHnDYgRIP9NUwPghyphenhyphengPwhWerIFMUtXdUKN2t8iY_rp16rd7P/s1600-h/7.JPG"><img id="BLOGGER_PHOTO_ID_5271405358240169890" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 307px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3LBkVZTAt2KOHNqmtUf-K8YsNZ0Am8PRSEkkjlSI6P0FV1XPnAPqQzU4q7zJpwy0j32PJFkILLOhk7uvZEg42hq-SouhtBHnDYgRIP9NUwPghyphenhyphengPwhWerIFMUtXdUKN2t8iY_rp16rd7P/s400/7.JPG" border="0" /></a><br /><span style="font-size:85%;">Import all LDIF Files.</span><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0W5M64pZdLSG4mi_pdp588eVXNsZ9Dxa4xj7BriWMOKBN18nnOPxBe67ms65A7fpZpNXlDqz0z7kkUeYqZl-4mrPENCrNrAz9BzMUwS5lFxT8OQdanhs3h7Z7b9UMieyFMLFWBEK4GmY4/s1600-h/8.JPG"><img id="BLOGGER_PHOTO_ID_5271406231660611138" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 307px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0W5M64pZdLSG4mi_pdp588eVXNsZ9Dxa4xj7BriWMOKBN18nnOPxBe67ms65A7fpZpNXlDqz0z7kkUeYqZl-4mrPENCrNrAz9BzMUwS5lFxT8OQdanhs3h7Z7b9UMieyFMLFWBEK4GmY4/s400/8.JPG" border="0" /></a><br /><br /><span style="font-size:85%;">Copy contents and paste in a file(notepad, etc)</span><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUlUc0HcDdvk5n78PxDRM6u90qP2gpuXVh8C1zvigK61V1Yi1mXujbjDtAJDCb7OIYhpZQ4_2WrZSDj4D_ZN3t05fai5XGbaNtO86l1OIrq_5dXfZUd6zcW4dtzJbz88UY_z3sM1Aj7PbJ/s1600-h/9.JPG"><img id="BLOGGER_PHOTO_ID_5271406231293730370" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 307px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUlUc0HcDdvk5n78PxDRM6u90qP2gpuXVh8C1zvigK61V1Yi1mXujbjDtAJDCb7OIYhpZQ4_2WrZSDj4D_ZN3t05fai5XGbaNtO86l1OIrq_5dXfZUd6zcW4dtzJbz88UY_z3sM1Aj7PbJ/s400/9.JPG" border="0" /></a><br /><span style="font-size:85%;">Click Next which will Instantiate new Instance.</span><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEr7VxMnlL7nAT7SwfuAhl5Sy9yzeRrGOdaJrV3b8ZLqCR3bpXujzbBvVfufo6Ql08nVYTh4mXLj2ZOPayb3fr9466oh5bmiYDAkDy_JZS_D6WeRplRpV3jL3lrx-LVBQ_YjvuaA0EGJx4/s1600-h/10.JPG"><img id="BLOGGER_PHOTO_ID_5271406232601039986" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 307px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEr7VxMnlL7nAT7SwfuAhl5Sy9yzeRrGOdaJrV3b8ZLqCR3bpXujzbBvVfufo6Ql08nVYTh4mXLj2ZOPayb3fr9466oh5bmiYDAkDy_JZS_D6WeRplRpV3jL3lrx-LVBQ_YjvuaA0EGJx4/s400/10.JPG" border="0" /></a><br /><span style="font-size:85%;">Click Finish. And open ADAM ADSI Edit in start menu.</span><br /><br /><span style="font-size:85%;">Right click on ADSI root node and click connect to. And enter the details as.</span><br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSdgpPsCQzEvdp7rniEfFInQonmS0jiQ8q3vaVnLeObj1zlgPy6AnUDuX3H_ntz1SBe_ivDKf0yPQ3uDykiCKlKWwYsKqGXz7KBEgTimvCuPnQJuxsakGnu3renVZVtkYSSbgYETiYABpr/s1600-h/11.JPG"><img id="BLOGGER_PHOTO_ID_5271406233596549810" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 363px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSdgpPsCQzEvdp7rniEfFInQonmS0jiQ8q3vaVnLeObj1zlgPy6AnUDuX3H_ntz1SBe_ivDKf0yPQ3uDykiCKlKWwYsKqGXz7KBEgTimvCuPnQJuxsakGnu3renVZVtkYSSbgYETiYABpr/s400/11.JPG" border="0" /></a><br /><span style="font-size:85%;">Right click on Distinguished name and select New -> Object in that one select “Organizational Unit” which for Admin.<br /></span><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4ZgpKD5enpN5MdeuOOP2E4VTsrkxqfMrVk1gaRxl0LauSyaAQBCBRcjB5T_yLp0Ne56jaayCArDJbO9KP4e12SHnBUOhQY9ncxTDfbOAwfZWR_tZ6sd8DJfLr0NjyvlkMBfzt8zp89bzv/s1600-h/12.JPG"><img id="BLOGGER_PHOTO_ID_5271406240770592930" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 337px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4ZgpKD5enpN5MdeuOOP2E4VTsrkxqfMrVk1gaRxl0LauSyaAQBCBRcjB5T_yLp0Ne56jaayCArDJbO9KP4e12SHnBUOhQY9ncxTDfbOAwfZWR_tZ6sd8DJfLr0NjyvlkMBfzt8zp89bzv/s400/12.JPG" border="0" /></a><br /><span style="font-size:85%;">Click on Finish. Now right click on the Organizational Unit which is created and select Properties, in that properties select distinguished name property and copy into a notepad.</span><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhReFtW74uVhjr5eUUUQQVcR767VxpygqYsalhmQ6y0m0589-JCMSO4EHYzmu3SOa5iOVqj1972GuzBW_UnS09RkHcrNNExSBgyrfR5a4MgKrrn-MhP5PGHpfaOJyQB2lCvabaStUgarJqP/s1600-h/13.JPG"><img id="BLOGGER_PHOTO_ID_5271407730098429922" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 337px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhReFtW74uVhjr5eUUUQQVcR767VxpygqYsalhmQ6y0m0589-JCMSO4EHYzmu3SOa5iOVqj1972GuzBW_UnS09RkHcrNNExSBgyrfR5a4MgKrrn-MhP5PGHpfaOJyQB2lCvabaStUgarJqP/s400/13.JPG" border="0" /></a><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKPk97_KE77Tkq5AiI7M_pbuoBWFOdDfRxhyphenhyphenNw5yCkO3bPbHysNLeNAYcDQIKG2XMbKmTYSqHmEm78Qe_f8UXBtszhZqC3StAVfaH8i5e4S8bUHpFtr_jFmgFGFTUDlp8N_a7zWtNS31Fh/s1600-h/14.JPG"><img id="BLOGGER_PHOTO_ID_5271407729493980850" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 129px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKPk97_KE77Tkq5AiI7M_pbuoBWFOdDfRxhyphenhyphenNw5yCkO3bPbHysNLeNAYcDQIKG2XMbKmTYSqHmEm78Qe_f8UXBtszhZqC3StAVfaH8i5e4S8bUHpFtr_jFmgFGFTUDlp8N_a7zWtNS31Fh/s400/14.JPG" border="0" /></a><br /><span style="font-size:85%;">Right click on new OU(Organizational Unit) and create a new User </span><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAuPUqvfcTarVs2YNnd9hpuTLNP0vYdmhZRZgtendme08fEwsIdTuK_GkKDlZg7rfazhE8RISbUmJoOTzK631SfDERfweMMmzXc-5BLVsrQnfizMSeojOyHpPqzprhN2obCJHw1jW6-xY7/s1600-h/15.JPG"><img id="BLOGGER_PHOTO_ID_5271407732577853474" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 337px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAuPUqvfcTarVs2YNnd9hpuTLNP0vYdmhZRZgtendme08fEwsIdTuK_GkKDlZg7rfazhE8RISbUmJoOTzK631SfDERfweMMmzXc-5BLVsrQnfizMSeojOyHpPqzprhN2obCJHw1jW6-xY7/s400/15.JPG" border="0" /></a><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglEFsnDiDWymNiSQYIOHiBOr-wO4NDMabH4uLj-TLtNz6zus-mbTj0ympIWGwJLFSxafjzokQTfRJN4j2ozWkb3uHOGZsIbeHrVspNDhSW6Bqg23O9ZcdbSg9gjPgzc9gQ1IJmUym4hyM4/s1600-h/16.JPG"><img id="BLOGGER_PHOTO_ID_5271407732311552738" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 337px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglEFsnDiDWymNiSQYIOHiBOr-wO4NDMabH4uLj-TLtNz6zus-mbTj0ympIWGwJLFSxafjzokQTfRJN4j2ozWkb3uHOGZsIbeHrVspNDhSW6Bqg23O9ZcdbSg9gjPgzc9gQ1IJmUym4hyM4/s400/16.JPG" border="0" /></a><br /><span style="font-size:85%;">Now right click on CN=TestAdminUser and select properties, in that properties change the User Principal Name as</span><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGp1rqbi91QRlmARKJ75D_Kq2RTrlva6N_CR3qYlzergsZIAbuf977jAOqQSvhEr4f9_X3I57JvHGhyphenhyphenv49se04H8Am9RA9HvtYXaRwGGpbvNPne5RJ4IPYhZRUzT5grqniWG6FHxY2mSg0/s1600-h/17.JPG"><img id="BLOGGER_PHOTO_ID_5271407738708619826" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 137px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGp1rqbi91QRlmARKJ75D_Kq2RTrlva6N_CR3qYlzergsZIAbuf977jAOqQSvhEr4f9_X3I57JvHGhyphenhyphenv49se04H8Am9RA9HvtYXaRwGGpbvNPne5RJ4IPYhZRUzT5grqniWG6FHxY2mSg0/s400/17.JPG" border="0" /></a><br /><span style="font-size:85%;">And make the “Don’tExpirePassword” property to false.</span><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuLtprhTKt9IVzdxmoKbeIV4nwUY6R-sYsLe9SQByQymo-MvYuDg4D0s12dVNcjjrZ2Uo3T_tWgGTOlaNZ43QpS0Kqx5-tVZL2-S_fQ6IX9muYl_4RSYjOLatPPWCPP1vv5cw8vphlHDba/s1600-h/18.JPG"><img id="BLOGGER_PHOTO_ID_5271408356273575394" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 361px; CURSOR: hand; HEIGHT: 400px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuLtprhTKt9IVzdxmoKbeIV4nwUY6R-sYsLe9SQByQymo-MvYuDg4D0s12dVNcjjrZ2Uo3T_tWgGTOlaNZ43QpS0Kqx5-tVZL2-S_fQ6IX9muYl_4RSYjOLatPPWCPP1vv5cw8vphlHDba/s400/18.JPG" border="0" /></a><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5UzN7r9Wk5m92pssHq_uo_NvwroRYHaJ0EfLZd2CZRg-VQzwoYJyuY6egUHyrSbgGE420HqvSkDKQvPVOtTb7OxeUbQMlB2UdL1Qrdt2HsT4sCc-rkX-R9xHxQlyAi0GsZ4RjHdsfbW9g/s1600-h/19.JPG"><img id="BLOGGER_PHOTO_ID_5271408358844721970" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 283px; CURSOR: hand; HEIGHT: 183px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5UzN7r9Wk5m92pssHq_uo_NvwroRYHaJ0EfLZd2CZRg-VQzwoYJyuY6egUHyrSbgGE420HqvSkDKQvPVOtTb7OxeUbQMlB2UdL1Qrdt2HsT4sCc-rkX-R9xHxQlyAi0GsZ4RjHdsfbW9g/s400/19.JPG" border="0" /></a><br /><span style="font-size:85%;">Now right click on TestAdminUser and reset the password.</span><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjggB_ndrWw4FvpJcR1aeOJJyRjjW86PFGvBN1LDUipM4QNWlQ1oQjtUN_d2ejFunw0ze5PTp_9FP_7f0q7hzkhQ6zT87aSA1fcguvsWX5ElBtrzWFf2VI_d4AehrN6sJUVquRW4uAH0IVs/s1600-h/20.JPG"><img id="BLOGGER_PHOTO_ID_5271408358620406050" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 388px; CURSOR: hand; HEIGHT: 183px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjggB_ndrWw4FvpJcR1aeOJJyRjjW86PFGvBN1LDUipM4QNWlQ1oQjtUN_d2ejFunw0ze5PTp_9FP_7f0q7hzkhQ6zT87aSA1fcguvsWX5ElBtrzWFf2VI_d4AehrN6sJUVquRW4uAH0IVs/s400/20.JPG" border="0" /></a><br /><span style="font-size:85%;">Go to CN=Roles and choose CN=Administrators and choose properties and go to member property.</span><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5MCnUZmYaUxx8x0kr8R7f81KvP9zBouG-kBYQkxXzcvdB099ikiAd7ICAQ_KWP4SGb47kpeVG1wLv4Zi3DWrnMpCVtVKeehyphenhyphen7XkTmN5R6Z-TS3g7x1o3NWEnX6umIm20IGv-Dk_cTApPT/s1600-h/21.JPG"><img id="BLOGGER_PHOTO_ID_5271408364573815842" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 256px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5MCnUZmYaUxx8x0kr8R7f81KvP9zBouG-kBYQkxXzcvdB099ikiAd7ICAQ_KWP4SGb47kpeVG1wLv4Zi3DWrnMpCVtVKeehyphenhyphen7XkTmN5R6Z-TS3g7x1o3NWEnX6umIm20IGv-Dk_cTApPT/s400/21.JPG" border="0" /></a><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4UOtmuKcYO0aHPkJXSmRgMaw0KPFhhVQBJvFiHWYROTzDNyUaAHzB2UmCz4_jyZfZVURssqVA2BOBnork08l1ylAlF1j0weR207scMxcjqWwIoFoK2vwpbv3-RtoicF2SsEDnjtwhql37/s1600-h/22.JPG"><img id="BLOGGER_PHOTO_ID_5271408370482959154" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 289px; CURSOR: hand; HEIGHT: 130px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4UOtmuKcYO0aHPkJXSmRgMaw0KPFhhVQBJvFiHWYROTzDNyUaAHzB2UmCz4_jyZfZVURssqVA2BOBnork08l1ylAlF1j0weR207scMxcjqWwIoFoK2vwpbv3-RtoicF2SsEDnjtwhql37/s400/22.JPG" border="0" /></a><br /><span style="font-size:85%;">Click on Add ADAM Account and add the user created above.</span><br /><span style="font-size:85%;">Create another Organizational Unit (OU) for the user to create login account programmatically.</span><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8xN_fBnwiK_DUbrouKIQqJ8ysSys-Xf_DZEkYPjVXhGI-ggxWSW10QK0y7a3T0MAl3-XaPB5p4h_drNglKUEFGljiLjiZHw8-_vT_CHoCvQWsktOcFUb7nxhEWs1y1q_6RQBLhNJPWRuJ/s1600-h/23.JPG"><img id="BLOGGER_PHOTO_ID_5271408981336804066" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 337px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8xN_fBnwiK_DUbrouKIQqJ8ysSys-Xf_DZEkYPjVXhGI-ggxWSW10QK0y7a3T0MAl3-XaPB5p4h_drNglKUEFGljiLjiZHw8-_vT_CHoCvQWsktOcFUb7nxhEWs1y1q_6RQBLhNJPWRuJ/s400/23.JPG" border="0" /></a><br /><span style="font-size:85%;">Go to Roles and choose CN=Readers and choose properties and then select “member” property. Add ADAM account.</span><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeKBveMe2WoL4sVPcgcnqi3rVZCq7HdmtwJo-3IfycaTZTYDzSJhEwz5IuRBnbZ14Safu9VH9MpHxHN_nEPyFqCOKa7N3sGDYL8ep_9M-zRQC9PDuLVtjiwvWlAR6oIXQdUIkIUIw0p2ok/s1600-h/24.JPG"><img id="BLOGGER_PHOTO_ID_5271408986704480066" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 289px; CURSOR: hand; HEIGHT: 130px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeKBveMe2WoL4sVPcgcnqi3rVZCq7HdmtwJo-3IfycaTZTYDzSJhEwz5IuRBnbZ14Safu9VH9MpHxHN_nEPyFqCOKa7N3sGDYL8ep_9M-zRQC9PDuLVtjiwvWlAR6oIXQdUIkIUIw0p2ok/s400/24.JPG" border="0" /></a><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhu2sbM1-RJg5BaBoT-EJnrfWrtFaHwYJQJhYuAFWMn8Sg9j1e9hE1DYAqVmkJ0Q__OuxgsNNGfPYTEjkfWeoQMmVYnJDbQY6NAcYPpg0oHkK__cnfpp8fw0nnzwXC2hAMyIMCHaltL82KS/s1600-h/25.JPG"><img id="BLOGGER_PHOTO_ID_5271408985848080178" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 289px; CURSOR: hand; HEIGHT: 130px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhu2sbM1-RJg5BaBoT-EJnrfWrtFaHwYJQJhYuAFWMn8Sg9j1e9hE1DYAqVmkJ0Q__OuxgsNNGfPYTEjkfWeoQMmVYnJDbQY6NAcYPpg0oHkK__cnfpp8fw0nnzwXC2hAMyIMCHaltL82KS/s400/25.JPG" border="0" /></a><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhyZ8Duu2xsyMWnzRVrocfcwCIAC-vFbPtfVhMnV6b9Try2eyrfFWHGPB_lUtF1mYQyaOk0IuRbBauX74SX9a9itP8Z6czshk6do-tdxhpdXCSD-kWO5TsLepn_DYWaa7a7kCYhPqKUA8d/s1600-h/26.JPG"><img id="BLOGGER_PHOTO_ID_5271408990220015138" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 256px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhyZ8Duu2xsyMWnzRVrocfcwCIAC-vFbPtfVhMnV6b9Try2eyrfFWHGPB_lUtF1mYQyaOk0IuRbBauX74SX9a9itP8Z6czshk6do-tdxhpdXCSD-kWO5TsLepn_DYWaa7a7kCYhPqKUA8d/s400/26.JPG" border="0" /></a><br /><span style="font-size:85%;">Now open ADAM command prompt and run command “dsmgmt.exe”</span><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0BQGtLZQGSfHVicy8S8O_Tpq-6tAKK0_SkNo-H9UlltDZLrYJzPd_Gi3W8gCtKNXckcD_nfpRmBysoMcxbqtMYYZrF4QMSpMoj97OmygUGfW5kzbDyqRf5Ua4-BCdghRhrZAGh6lA8WlM/s1600-h/27.JPG"><img id="BLOGGER_PHOTO_ID_5271408992287409026" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 200px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0BQGtLZQGSfHVicy8S8O_Tpq-6tAKK0_SkNo-H9UlltDZLrYJzPd_Gi3W8gCtKNXckcD_nfpRmBysoMcxbqtMYYZrF4QMSpMoj97OmygUGfW5kzbDyqRf5Ua4-BCdghRhrZAGh6lA8WlM/s400/27.JPG" border="0" /></a><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYooA0xszI5JiuyPyh_htQxrNnp_4iAEUuWKIb1PnPZMGwau-6HjnnEt_dLLyjxbNdCut16BGDYCNRGSrsstkSAKP5Uu0xukVilPQlDVrXXDNjvcEu_kQnNUEwEsrciOION3X7nbkQVoBw/s1600-h/28.JPG"><img id="BLOGGER_PHOTO_ID_5271409577122308562" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 200px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYooA0xszI5JiuyPyh_htQxrNnp_4iAEUuWKIb1PnPZMGwau-6HjnnEt_dLLyjxbNdCut16BGDYCNRGSrsstkSAKP5Uu0xukVilPQlDVrXXDNjvcEu_kQnNUEwEsrciOION3X7nbkQVoBw/s400/28.JPG" border="0" /></a><br /><span style="font-size:85%;">Now configure ADAM schema – Password policy setting. Type as “mmc /a”.</span><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3zYdfSvKkRCJkTIwCyNfCwmjp5Jz10IfdqZ9Al61brfEUJItZhKwrffTrTExzOxoW6FlEYn-Pcnu4_kbSDvuaL1RoUu7RDO5XtYdUD4NnyY8LLkseYbzrXetbVts4SYFkZa9IaqZ37N4c/s1600-h/29.JPG"><img id="BLOGGER_PHOTO_ID_5271409577647800242" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 200px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3zYdfSvKkRCJkTIwCyNfCwmjp5Jz10IfdqZ9Al61brfEUJItZhKwrffTrTExzOxoW6FlEYn-Pcnu4_kbSDvuaL1RoUu7RDO5XtYdUD4NnyY8LLkseYbzrXetbVts4SYFkZa9IaqZ37N4c/s400/29.JPG" border="0" /></a><br /><span style="font-size:85%;">Click on File – Add/Remove snap – In and then click on ADD and select ADAM Schema</span><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEildF_tarTJEnEl8Yax9th38azKgDBL5yJfvvP9ngbuxEbN3-Z-KBgWgl80kKSPQy4SLdlrVDp42I6Pwxgt1IOwQ4UjoQ8lsH3GJpwajD8EfxvVJcEuN-lRYLrqdwjXpjOrgFTb36FjNl7V/s1600-h/30.JPG"><img id="BLOGGER_PHOTO_ID_5271409580992078050" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 388px; CURSOR: hand; HEIGHT: 395px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEildF_tarTJEnEl8Yax9th38azKgDBL5yJfvvP9ngbuxEbN3-Z-KBgWgl80kKSPQy4SLdlrVDp42I6Pwxgt1IOwQ4UjoQ8lsH3GJpwajD8EfxvVJcEuN-lRYLrqdwjXpjOrgFTb36FjNl7V/s400/30.JPG" border="0" /></a><br /><span style="font-size:85%;">Select ok, ok. Right Click on ADAM Schema and change the server details. Enter the details of ADAM Instance.<br /></span><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKpBI7bZ1A_HmqkCJBwMySH-OenxH5aglV2etjAML3SR6gNajZUguQ-Vw6hXggTfZo0SoidbLL4_iRnckAmD3dR7Le02AenYDgJ0-4thjZXP1nRYooysfBB7HVUnUPEFp47NRqnuIfbBV7/s1600-h/31.JPG"><img id="BLOGGER_PHOTO_ID_5271409581171756802" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 376px; CURSOR: hand; HEIGHT: 294px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKpBI7bZ1A_HmqkCJBwMySH-OenxH5aglV2etjAML3SR6gNajZUguQ-Vw6hXggTfZo0SoidbLL4_iRnckAmD3dR7Le02AenYDgJ0-4thjZXP1nRYooysfBB7HVUnUPEFp47NRqnuIfbBV7/s400/31.JPG" border="0" /></a><br /><span style="font-size:85%;">Right click on Attributes and click on create attribute.</span><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwkLD8D_2WV7POdGnw4fLKxPf4Oarca3TUufxzVKiswxHrUW9tvAGW4Z8zbnrgnE9zKMMzP57EHThUVAI0_Y1mS3sbJJg5jqeKDoyTLqwB6J7Tys9JKoZ7hiPYrpgm-80gl7F6lGJMs-xx/s1600-h/32.JPG"><img id="BLOGGER_PHOTO_ID_5271409580120838738" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 388px; CURSOR: hand; HEIGHT: 377px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwkLD8D_2WV7POdGnw4fLKxPf4Oarca3TUufxzVKiswxHrUW9tvAGW4Z8zbnrgnE9zKMMzP57EHThUVAI0_Y1mS3sbJJg5jqeKDoyTLqwB6J7Tys9JKoZ7hiPYrpgm-80gl7F6lGJMs-xx/s400/32.JPG" border="0" /></a><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjq4rlfK-vupwQSaPhQIAJjruAsFLJOHFMJvilGIadicBy5SffbYDSoQy_n05YsIVshiuPGpAT64NOjVtofCrFdb8JteWgxOA-B3HqwDop7_fm_iX5cl_Cjpuvuj9b8idExhffbVqL_eHup/s1600-h/33.JPG"><img id="BLOGGER_PHOTO_ID_5271410555339583266" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 388px; CURSOR: hand; HEIGHT: 377px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjq4rlfK-vupwQSaPhQIAJjruAsFLJOHFMJvilGIadicBy5SffbYDSoQy_n05YsIVshiuPGpAT64NOjVtofCrFdb8JteWgxOA-B3HqwDop7_fm_iX5cl_Cjpuvuj9b8idExhffbVqL_eHup/s400/33.JPG" border="0" /></a><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwyludODsk9VVImTB_j926gTsaY7n6BYi43klenq3RBsNkllZtXeYZo9hjEd74z21FnJzGIORwzpKhMSlI-tns2flHWaemQLRPUyaZBDYI2L6d5cOjCXteP3qiykanz323sxVXpQRtyIJE/s1600-h/34.JPG"><img id="BLOGGER_PHOTO_ID_5271410553907487026" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 388px; CURSOR: hand; HEIGHT: 377px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwyludODsk9VVImTB_j926gTsaY7n6BYi43klenq3RBsNkllZtXeYZo9hjEd74z21FnJzGIORwzpKhMSlI-tns2flHWaemQLRPUyaZBDYI2L6d5cOjCXteP3qiykanz323sxVXpQRtyIJE/s400/34.JPG" border="0" /></a><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgDMSKejrGqSQ_n6GqxdlsljynH8C9Nb7U3mn8fhYWgO0om9aQIjm273jmEFBt4oJB1LMKhySuNkuhOJlAB_Mr3JvbL9LoKSuacAmkZdChNHyP9WtRhGJb3mJOyFp8M6_N-0C0SC_PFfp0/s1600-h/35.JPG"><img id="BLOGGER_PHOTO_ID_5271410559392127026" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 388px; CURSOR: hand; HEIGHT: 377px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgDMSKejrGqSQ_n6GqxdlsljynH8C9Nb7U3mn8fhYWgO0om9aQIjm273jmEFBt4oJB1LMKhySuNkuhOJlAB_Mr3JvbL9LoKSuacAmkZdChNHyP9WtRhGJb3mJOyFp8M6_N-0C0SC_PFfp0/s400/35.JPG" border="0" /></a><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeMfNk8cmde17YWgPl0edPinOkxR0oxWTm2uHoh8LcJZ9UUNvp1Fb3TonGUd_5H55ciGuglPfada3mKZYwPtByOZ00qLrDq3SskyLdOrzjRWOc4GyhM0MuyDmJGlE-_zttE-MNrznCPCTW/s1600-h/36.JPG"><img id="BLOGGER_PHOTO_ID_5271410563395352034" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 388px; CURSOR: hand; HEIGHT: 377px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeMfNk8cmde17YWgPl0edPinOkxR0oxWTm2uHoh8LcJZ9UUNvp1Fb3TonGUd_5H55ciGuglPfada3mKZYwPtByOZ00qLrDq3SskyLdOrzjRWOc4GyhM0MuyDmJGlE-_zttE-MNrznCPCTW/s400/36.JPG" border="0" /></a><br /><span style="font-size:85%;">Go to Classes Node in the Adam Schema, select User and right click and choose properties and select Attributes tab.<br /><br /></span><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZNVUBMGA5jhpIBrwWJtfWesLiL5m5gQpjNcaTL4u1r4KA1qFp_XfRk8IzE1nkBUOZ63ylL3lCgbSQbuoO8TfOiI05bvbSBMMr-XKWIL82618M3yMMB2A79YnLT0lt5LlLzfi7Sh7ZjEJi/s1600-h/37.JPG"><img id="BLOGGER_PHOTO_ID_5271410566659087474" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 365px; CURSOR: hand; HEIGHT: 400px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZNVUBMGA5jhpIBrwWJtfWesLiL5m5gQpjNcaTL4u1r4KA1qFp_XfRk8IzE1nkBUOZ63ylL3lCgbSQbuoO8TfOiI05bvbSBMMr-XKWIL82618M3yMMB2A79YnLT0lt5LlLzfi7Sh7ZjEJi/s400/37.JPG" border="0" /></a><br /><span style="font-size:85%;">Add all the properties created above.</span><br /><span style="font-size:85%;">Go to ADAM ADSI Edit , select the instance and right click on it. In that select Update Schema Now.</span><br /><span style="font-size:85%;"></span><br /><span style="font-size:85%;"><b>Note:</b>I created a document of "ADAM Instance Creation" with all of screen shots. You can find below.</span><br /><span style="font-size:85%;"><b>Interacting with ADAM with ASP.Net</b></span><br /><span style="font-size:85%;">Step 1: Create a website and add three pages to the application with name Registration.aspx, Login.aspx, Welcome.aspx.</span><br /><span style="font-size:85%;">Step 2: Open Registration.aspx page. Drag “CreateUserWizard” control and set the “ContinueDestinationPageUrl” as “~/login.aspx”.</span><br /><span style="font-size:85%;">Step 3: Now open login.aspx page. Drag “Login” control and set the “DestinationPageUrl” property to welcome.aspx. and set “DisplayRememberMe” to false.</span><br /><span style="font-size:85%;">Step 4: Now open the web.config file and add the blow mentioned code.</span><br /></p><br /><br /><div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /> <div class="csharp" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"><ol><li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;;white-space: nowrapcolor: #000020;"><span style="color: #008000;"><</span>appSettings<span style="color: #008000;">></span></div></li><br /> <li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;;white-space: nowrapcolor: #000020;"> <span style="color: #008000;"><</span>add key<span style="color: #008000;">=</span><span style="color: #666666;">"connectionUsername"</span> value<span style="color: #008000;">=</span><span style="color: #666666;">"CN=TestAdminUser,OU=TestAdmin,O=Admtest,DC=Testing,DC=COM"</span><span style="color: #008000;">/></span></div></li><br /> <li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;;white-space: nowrapcolor: #000020;"> <span style="color: #008000;"><</span>add key<span style="color: #008000;">=</span><span style="color: #666666;">"connectionPassword"</span> value<span style="color: #008000;">=</span><span style="color: #666666;">"hello"</span><span style="color: #008000;">/></span></div></li><br /> <li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;;white-space: nowrapcolor: #000020;"> <span style="color: #008000;"><</span>add key<span style="color: #008000;">=</span><span style="color: #666666;">"connectionServer"</span> value<span style="color: #008000;">=</span><span style="color: #666666;">"localhost"</span><span style="color: #008000;">/></span></div></li><br /> <li style="font-weight: bold; vertical-align:top;font-weight: bold; color: #006060;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;;white-space: nowrapcolor: #000020;"> <span style="color: #008000;"><</span>add key<span style="color: #008000;">=</span><span style="color: #666666;">"connectionPortNumber"</span> value<span style="color: #008000;">=</span><span style="color: #666666;">"50001"</span><span style="color: #008000;">/></span></div></li><br /> <li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;;white-space: nowrapcolor: #000020;"> <span style="color: #008000;"><</span>add key<span style="color: #008000;">=</span><span style="color: #666666;">"connectionRoot"</span> value<span style="color: #008000;">=</span><span style="color: #666666;">"O=Aest,DC=Testing,DC=COM"</span><span style="color: #008000;">/></span></div></li><br /> <li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;;white-space: nowrapcolor: #000020;"> <span style="color: #008000;"><</span>add key<span style="color: #008000;">=</span><span style="color: #666666;">"connectionUsersContainer"</span> value<span style="color: #008000;">=</span><span style="color: #666666;">"TestUsers"</span><span style="color: #008000;">/></span></div></li><br /> <li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;;white-space: nowrapcolor: #000020;"> <span style="color: #008000;"><</span>add key<span style="color: #008000;">=</span><span style="color: #666666;">"defaultRoles"</span> value<span style="color: #008000;">=</span><span style="color: #666666;">"Readers"</span><span style="color: #008000;">/></span></div></li><br /> <li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;;white-space: nowrapcolor: #000020;"> <span style="color: #008000;"><</span>add key<span style="color: #008000;">=</span><span style="color: #666666;">"connectionRolesContainer"</span> value<span style="color: #008000;">=</span><span style="color: #666666;">"Roles"</span><span style="color: #008000;">/></span></div></li><br /> <li style="font-weight: bold; vertical-align:top;font-weight: bold; color: #006060;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;;white-space: nowrapcolor: #000020;"> <span style="color: #008000;"><</span>add key<span style="color: #008000;">=</span><span style="color: #666666;">"connectionAdminsContainer"</span> value<span style="color: #008000;">=</span><span style="color: #666666;">"TestAdmin"</span><span style="color: #008000;">/></span></div></li><br /> <li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;;white-space: nowrapcolor: #000020;"> <span style="color: #008000;"></</span>appSettings<span style="color: #008000;">></span></div></li><br /> </ol></div><br /> </div><br /> <div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /> <div class="csharp" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"><ol><li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;;white-space: nowrapcolor: #000020;"><span style="color: #008000;"><</span>appSettings<span style="color: #008000;">></span></div></li></ol><br /> <div class="csharp" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"><ol><li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;;white-space: nowrapcolor: #000020;"><span style="color: #008000;"><</span>connectionStrings<span style="color: #008000;">></span></div></li></ol><br /> <li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;;white-space: nowrapcolor: #000020;"> <span style="color: #008000;"><</span>add name<span style="color: #008000;">=</span><span style="color: #666666;">"TestCon"</span> connectionString<span style="color: #008000;">=</span><span style="color: #666666;">"LDAP://localhost:50001/OU=TestUsers,O=Aest,DC=Testing,DC=COM"</span><span style="color: #008000;">/></span></div></li><br /> <li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;;white-space: nowrapcolor: #000020;"> <span style="color: #008000;"></</span>connectionStrings<span style="color: #008000;">></span></div></li><br /> </div><br /> </div><br /> </div> <br /> <div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /> <div class="csharp" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"><ol><li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;;white-space: nowrapcolor: #000020;"><span style="color: #008000;"><</span>appSettings<span style="color: #008000;">></span></div></li></ol><br /> <div class="csharp" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"><ol><li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;;white-space: nowrapcolor: #000020;"> <span style="color: #008000;"><</span>machineKey validationKey<span style="color: #008000;">=</span><span style="color: #666666;">"51AF1A8093A19043C4AAEC218BC36D9C3299C06AA823DDDAC5877431E7AFE90C1B053057EA760CA4DCC15D3CED15035588BB1B461C959434DE68B8381CDF99AA"</span> decryptionKey<span style="color: #008000;">=</span><span style="color: #666666;">"BCE825E1668990B11CE01AFF01C4AFE8D63AE300958A85EC"</span> validation<span style="color: #008000;">=</span><span style="color: #666666;">"SHA1"</span><span style="color: #008000;">/></span></div></li><br /><li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;;white-space: nowrapcolor: #000020;"> <span style="color: #008000;"><</span>membership defaultProvider<span style="color: #008000;">=</span><span style="color: #666666;">"MyADAMMembershipProvider"</span><span style="color: #008000;">></span></div></li><br /><li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;;white-space: nowrapcolor: #000020;"> <span style="color: #008000;"><</span>providers<span style="color: #008000;">></span></div></li><br /><li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;;white-space: nowrapcolor: #000020;"> <span style="color: #008000;"><</span>add name<span style="color: #008000;">=</span><span style="color: #666666;">"MyADAMMembershipProvider"</span></div></li><br /><li style="font-weight: bold; vertical-align:top;font-weight: bold; color: #006060;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;;white-space: nowrapcolor: #000020;"> type<span style="color: #008000;">=</span><span style="color: #666666;">"System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"</span> </div></li><br /><li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;;white-space: nowrapcolor: #000020;"> connectionStringName<span style="color: #008000;">=</span><span style="color: #666666;">"TestCon"</span></div></li><br /><li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;;white-space: nowrapcolor: #000020;"> connectionUsername<span style="color: #008000;">=</span><span style="color: #666666;">"CN=TestAdminUser,OU=TestAdmin,O=Aest,DC=Testing,DC=COM"</span></div></li><br /><li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;;white-space: nowrapcolor: #000020;"> connectionPassword<span style="color: #008000;">=</span><span style="color: #666666;">"hello"</span></div></li><br /><li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;;white-space: nowrapcolor: #000020;"> connectionProtection<span style="color: #008000;">=</span><span style="color: #666666;">"None"</span> </div></li><br /><li style="font-weight: bold; vertical-align:top;font-weight: bold; color: #006060;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;;white-space: nowrapcolor: #000020;"> enableSearchMethods<span style="color: #008000;">=</span><span style="color: #666666;">"true"</span></div></li><br /><li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;;white-space: nowrapcolor: #000020;"> requiresUniqueEmail<span style="color: #008000;">=</span><span style="color: #666666;">"false"</span></div></li><br /><li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;;white-space: nowrapcolor: #000020;"> enablePasswordReset<span style="color: #008000;">=</span><span style="color: #666666;">"true"</span></div></li><br /><li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;;white-space: nowrapcolor: #000020;"> requiresQuestionAndAnswer<span style="color: #008000;">=</span><span style="color: #666666;">"true"</span></div></li><br /><li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;;white-space: nowrapcolor: #000020;"> attributeMapPasswordQuestion<span style="color: #008000;">=</span><span style="color: #666666;">"PasswordQuestion"</span></div></li><br /><li style="font-weight: bold; vertical-align:top;font-weight: bold; color: #006060;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;;white-space: nowrapcolor: #000020;"> attributeMapPasswordAnswer<span style="color: #008000;">=</span><span style="color: #666666;">"PasswordAnswer"</span></div></li><br /><li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;;white-space: nowrapcolor: #000020;"> attributeMapFailedPasswordAnswerCount<span style="color: #008000;">=</span><span style="color: #666666;">"BadPasswordAnswerCount"</span></div></li><br /><li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;;white-space: nowrapcolor: #000020;"> attributeMapFailedPasswordAnswerTime<span style="color: #008000;">=</span><span style="color: #666666;">"BadPasswordAnswerTime"</span></div></li><br /><li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;;white-space: nowrapcolor: #000020;"> attributeMapFailedPasswordAnswerLockoutTime<span style="color: #008000;">=</span><span style="color: #666666;">"BadPasswordAnswerLockoutTime"</span></div></li><br /><li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;;white-space: nowrapcolor: #000020;"> minRequiredNonalphanumericCharacters<span style="color: #008000;">=</span><span style="color: #666666;">"0"</span></div></li><br /><li style="font-weight: bold; vertical-align:top;font-weight: bold; color: #006060;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;;white-space: nowrapcolor: #000020;"> passwordStrengthRegularExpression <span style="color: #008000;">=</span> <span style="color: #666666;">"(?=.{7,})(?=.*<span style="color: #008080; font-weight: bold;">\d</span>)(?=.*[a-z])(?=.*[A-Z])(?=.*[@`~$%^+=!*])"</span><span style="color: #008000;">/></span></div></li><br /><li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;;white-space: nowrapcolor: #000020;"> <span style="color: #008000;"></</span>providers<span style="color: #008000;">></span></div></li><br /><li style="font-weight: normal; vertical-align:top;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;;white-space: nowrapcolor: #000020;"> <span style="color: #008000;"></</span>membership<span style="color: #008000;">></span></div></li><br /></ol></div><br /> </div><br /> </div> <br /><div><br /><span style="font-size:85%;">Once you modified web.config as like above. Then run the registration page and create a User. If user created succesfully you can find a file created with user name in "TestUsers" section of ADAM. </span><br /><span style="font-size:0;"><b>Note:</b>Add "System.DirectoryServices" assembly reference to your application.</span><br /><span style="font-size:85%;"><a href="http://www.microsoft.com/windowsserver2003/adam/default.mspx" target="_blank">Download ADAM</a> </span><br /><span style="font-size:85%;"><br /><a href="http://www.4shared.com/file/72616165/2500360a/ADAM_Install.html" target="_blank">Download creating ADAM Instance Step by step Document.</a><br /></span><br /><span style="font-size:85%;"><a href="http://www.4shared.com/file/72618518/f326039f/AdamTest.html" target="_blank">Download Sample Application</a><br /></div></span></div>Ramkyhttp://www.blogger.com/profile/05722860132583858043noreply@blogger.com2tag:blogger.com,1999:blog-4955511806150724268.post-47084068278751887752008-11-04T02:08:00.000-08:002008-11-04T02:27:21.786-08:00Using Typed DataSet in .Net<span style="font-size:85%;">A typed DataSet is a strongly-typed container for collections of business entity data and inherits from the System.Data.DataSet class. However, unlike the standard DataSet that features late binding and weak typing, typed DataSets provide strongly-typed access to data. </span><br /><br /><span style="font-size:85%;">This means that they expose table, column, and relation objects as named properties, rather than generic collection elements. Essentially, we can write code as MyRow.ClientName, as opposed to MyRow["ClientName"].</span><br /><br /><span style="font-size:85%;">Here we can see how to create a Typed DataSet</span><br /><br /><br /><p align="center"><span style="font-size:85%;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiloIpmV6ZomcfcL2itpJJuqWmy53sIZo4EulbkI-0hTylLz37Qfge8sXhTL0efTeLyD2Bh0-SS6YS1Ha0glUAgbgOqaQHQch_hd1jAJifx0vvcSyg3Yg9u0Y3V-4Ud3_KMe7rcFU7n2Iy_/s1600-h/DS.bmp"><img id="BLOGGER_PHOTO_ID_5264744690339871858" style="WIDTH: 400px; CURSOR: hand; HEIGHT: 269px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiloIpmV6ZomcfcL2itpJJuqWmy53sIZo4EulbkI-0hTylLz37Qfge8sXhTL0efTeLyD2Bh0-SS6YS1Ha0glUAgbgOqaQHQch_hd1jAJifx0vvcSyg3Yg9u0Y3V-4Ud3_KMe7rcFU7n2Iy_/s400/DS.bmp" border="0" /></a></span></p><br /><span style="font-size:85%;">Typed DataSets also give us the ability to use IntelliSense for statement completion<br />and type checking at compile time. In the context of reporting, they aid in data-driven report design and provide an excellent form of self-documentation of stored procedure result sets.<br /></span><br /><br /><span style="font-size:85%;"><b>Benefits of Typed DataSets</b><br />Typed DataSets have many benefits over standard DataSets. Let’s take a look at how they simplifyand enhance the development process.</span><br /><br /><span style="font-size:85%;"><b>Strong Typing</b><br />Typed DataSets give you the ability to use IntelliSense for statement completion and type checking at compile time. Where as in Untyped we must type the column name correctly (or receive a runtime error), and you must cast the column object to the correct DataType.<br />Typed DataSets also make it easy to define default column values when you add new<br />DataRows </span><br /><br /><span style="font-size:85%;"><b>Easier Traversing of Hierarchical Data</b><br />If a typed DataSet contains table relations, the XML Schema Definition tool adds methods to the typed DataSet class for traversing hierarchical data</span><br /><br /><span style="font-size:85%;"><b>Using Find</b><br />Additionally, if you define a primary key for any table in a typed DataSet, the class exposes a FindXXX() method associated with the column name. We can perform a find against a table with a primary key of OrderID by using the pregenerated method FindByOrderID(). If the primary key is a concatenation of two columns (for example, CustomerID and OrderID), then it can be as FindByCustomerIDOrderID().<br /></span><br /><br /><span style="font-size:85%;"><b>Null Value Handling</b><br />Working with null values is a little easier when using typed DataSets. Each typed DataRow contains a method to check whether a column value is null: MyRow.IsAddressNull(). The DataRow also contains a second method to set a column value to null: MyRow.SetAddressNull().</span><br /><br /><span style="font-size:85%;"><b>Reporting</b><br />Typed DataSets are valuable in the reporting process. We can design report content from a typed DataSet definition, even before the stored procedures are constructed. Once again, the typed DataSet becomes a form of documentation for the report DataSource. </span><br /><br /><span style="font-size:85%;"><b>Subclassing</b><br />Since a typed DataSet is a class that inherits from System.DataSet, we can further subclass a typed DataSet to add validation code or any other methods. Alternatively, we can also take advantage of the new partial class capability in Visual Studio 2005 to add method code for our DataSet.</span><br /><br /><span style="font-size:85%;"><b>Simplify Data Binding</b><br />Typed DataSets can simplify design-time data binding—we can define a DataSource in the property sheet. Because our sample application stores all typed DataSets as a separate project DLL, we can add the DLL to the Visual Studio toolbox, and then drop an instance of the typed DataSet onto a form as a precursor to design-time data binding. Developers who define DataSources in code still gain the advantage of table/column name discovery through IntelliSense.</span><br /><br /><span style="font-size:85%;"><b>DataSet Operations</b></span><br /><br /><span style="font-size:85%;"><b>Adding Rows to Dataset</b></span><br /><br /><br /><div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /><br /><div class="csharp" style="BORDER-RIGHT: #d0d0d0 1px solid; BORDER-TOP: #d0d0d0 1px solid; BORDER-LEFT: #d0d0d0 1px solid; COLOR: #006; BORDER-BOTTOM: #d0d0d0 1px solid; FONT-FAMILY: monospace; BACKGROUND-COLOR: #f0f0f0"><br /><ol><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="FONT-STYLE: italic;color:#008080;" >//Adding Rows to Dataset </span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">Company cm <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> Company<span style="color:#000000;">(</span><span style="color:#000000;">)</span><span style="color:#008000;">;</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">cm.<span style="color:#0000ff;">Employee</span>.<span style="color:#0000ff;">AddEmployeeRow</span><span style="color:#000000;">(</span><span style="color:#666666;">"123"</span>, <span style="color:#666666;">"Ram"</span>, <span style="color:#666666;">"Krishna"</span>, <span style="color:#666666;">"9866"</span>, <span style="color:#666666;">"Hyderabad"</span>,<span style="color:#666666;">"22/08/2008"</span><span style="color:#000000;">)</span><span style="color:#008000;">;</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"></div></li><br /><br /><li style="FONT-WEIGHT: bold; VERTICAL-ALIGN: top; COLOR: #006060"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="FONT-STYLE: italic;color:#008080;" >//Adding Rows in Another way.</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">Company.<span style="color:#0000ff;">EmployeeRow</span> enewRow <span style="color:#008000;">=</span> cm.<span style="color:#0000ff;">Employee</span>.<span style="color:#0000ff;">NewEmployeeRow</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span><span style="color:#008000;">;</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">enewRow.<span style="color:#0000ff;">EMPID</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"235"</span><span style="color:#008000;">;</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">enewRow.<span style="color:#0000ff;">FName</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Ashfaq"</span><span style="color:#008000;">;</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">enewRow.<span style="color:#0000ff;">LName</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Sajju "</span><span style="color:#008000;">;</span></div></li><br /><br /><li style="FONT-WEIGHT: bold; VERTICAL-ALIGN: top; COLOR: #006060"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">enewRow.<span style="color:#0000ff;">Mobile</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"123"</span><span style="color:#008000;">;</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">enewRow.<span style="color:#0000ff;">City</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Sec-Bad"</span><span style="color:#008000;">;</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">cm.<span style="color:#0000ff;">Employee</span>.<span style="color:#0000ff;">AddEmployeeRow</span><span style="color:#000000;">(</span>enewRow<span style="color:#000000;">)</span><span style="color:#008000;">;</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">GridView1.<span style="color:#0000ff;">DataSource</span> <span style="color:#008000;">=</span> cm<span style="color:#008000;">;</span></div></li><br /><br /><li style="FONT-WEIGHT: bold; VERTICAL-ALIGN: top; COLOR: #006060"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">GridView1.<span style="color:#0000ff;">DataBind</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span><span style="color:#008000;">;</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"></div></li><br /></ol></div><br /></div><br /><span style="font-size:85%;"><b>Looping Through Dataset</b></span><br /><br /><br /><div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /><br /><div class="csharp" style="BORDER-RIGHT: #d0d0d0 1px solid; BORDER-TOP: #d0d0d0 1px solid; BORDER-LEFT: #d0d0d0 1px solid; COLOR: #006; BORDER-BOTTOM: #d0d0d0 1px solid; FONT-FAMILY: monospace; BACKGROUND-COLOR: #f0f0f0"><br /><ol><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">Company cmp <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> Company<span style="color:#000000;">(</span><span style="color:#000000;">)</span><span style="color:#008000;">;</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="FONT-STYLE: italic;color:#008080;" >// cmp = Genertate some method for rows();</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#0600ff;">foreach</span> <span style="color:#000000;">(</span>Company.<span style="color:#0000ff;">EmployeeRow</span> rw <span style="color:#0600ff;">in</span> cmp.<span style="color:#0000ff;">Employee</span>.<span style="color:#0000ff;">Rows</span><span style="color:#000000;">)</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#000000;">{</span></div></li><br /><br /><li style="FONT-WEIGHT: bold; VERTICAL-ALIGN: top; COLOR: #006060"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#ff0000;">string</span> name <span style="color:#008000;">=</span> rw.<span style="color:#0000ff;">FName</span><span style="color:#008000;">;</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#000000;">}</span></div></li><br /></ol></div><br /></div><br /><span style="font-size:85%;"><b>Using Date Math</b></span><br /><br /><br /><div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /><br /><div class="csharp" style="BORDER-RIGHT: #d0d0d0 1px solid; BORDER-TOP: #d0d0d0 1px solid; BORDER-LEFT: #d0d0d0 1px solid; COLOR: #006; BORDER-BOTTOM: #d0d0d0 1px solid; FONT-FAMILY: monospace; BACKGROUND-COLOR: #f0f0f0"><br /><ol><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="FONT-STYLE: italic;color:#008080;" >// To Check the emps who joined b/w 3 months from current date</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">Company com1 <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> Company<span style="color:#000000;">(</span><span style="color:#000000;">)</span><span style="color:#008000;">;</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#ff0000;">int</span> totDays<span style="color:#008000;">;</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">TimeSpan ts<span style="color:#008000;">;</span></div></li><br /><br /><li style="FONT-WEIGHT: bold; VERTICAL-ALIGN: top; COLOR: #006060"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">DateTime today <span style="color:#008000;">=</span> DateTime.<span style="color:#0000ff;">Today</span><span style="color:#008000;">;</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#0600ff;">foreach</span> <span style="color:#000000;">(</span>Company.<span style="color:#0000ff;">EmployeeRow</span> erow <span style="color:#0600ff;">in</span> com1.<span style="color:#0000ff;">Employee</span>.<span style="color:#0000ff;">Rows</span><span style="color:#000000;">)</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#000000;">{</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">ts <span style="color:#008000;">=</span> today.<span style="color:#0000ff;">Subtract</span><span style="color:#000000;">(</span>erow.<span style="color:#0000ff;">DOJ</span><span style="color:#000000;">)</span><span style="color:#008000;">;</span></div></li><br /><br /><li style="FONT-WEIGHT: bold; VERTICAL-ALIGN: top; COLOR: #006060"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">totDays <span style="color:#008000;">=</span> ts.<span style="color:#0000ff;">Days</span><span style="color:#008000;">;</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#0600ff;">if</span> <span style="color:#000000;">(</span>totDays <span style="color:#008000;">></span> <span style="color:#ff0000;">90</span><span style="color:#000000;">)</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#000000;">{</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="FONT-STYLE: italic;color:#008080;" >// Process Here</span></div></li><br /><br /><li style="FONT-WEIGHT: bold; VERTICAL-ALIGN: top; COLOR: #006060"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#000000;">}</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#000000;">}</span></div></li><br /></ol></div><br /></div><br /><span style="font-size:85%;"><b>Defining Primary key programmetically</b></span><br /><br /><br /><div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /><br /><div class="csharp" style="BORDER-RIGHT: #d0d0d0 1px solid; BORDER-TOP: #d0d0d0 1px solid; BORDER-LEFT: #d0d0d0 1px solid; COLOR: #006; BORDER-BOTTOM: #d0d0d0 1px solid; FONT-FAMILY: monospace; BACKGROUND-COLOR: #f0f0f0"><br /><ol><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">Company com2 <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> Company<span style="color:#000000;">(</span><span style="color:#000000;">)</span><span style="color:#008000;">;</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">com2.<span style="color:#0000ff;">Employee</span>.<span style="color:#0000ff;">PrimaryKey</span> <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> DataColumn<span style="color:#000000;">[</span><span style="color:#000000;">]</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#000000;">{</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">com2.<span style="color:#0000ff;">Employee</span>.<span style="color:#0000ff;">EMPIDColumn</span></div></li><br /><br /><li style="FONT-WEIGHT: bold; VERTICAL-ALIGN: top; COLOR: #006060"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#000000;">}</span><span style="color:#008000;">;</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">com2.<span style="color:#0000ff;">Employee</span>.<span style="color:#0000ff;">PrimaryKey</span> <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> DataColumn<span style="color:#000000;">[</span><span style="color:#000000;">]</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#000000;">{</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">com2.<span style="color:#0000ff;">Employee</span>.<span style="color:#0000ff;">Columns</span><span style="color:#000000;">[</span><span style="color:#666666;">"EMPID"</span><span style="color:#000000;">]</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#000000;">}</span><span style="color:#008000;">;</span></div></li><br /><br /><li style="FONT-WEIGHT: bold; VERTICAL-ALIGN: top; COLOR: #006060"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="FONT-STYLE: italic;color:#008080;" >// If the EMPID is defined are primary key..</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="FONT-STYLE: italic;color:#008080;" >// Then only we get FindByEMPID</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">Company.<span style="color:#0000ff;">EmployeeRow</span> eow <span style="color:#008000;">=</span> com2.<span style="color:#0000ff;">Employee</span>.<span style="color:#0000ff;">FindByEMPID</span><span style="color:#000000;">(</span><span style="color:#666666;">"123"</span><span style="color:#000000;">)</span><span style="color:#008000;">;</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#ff0000;">string</span> empid <span style="color:#008000;">=</span> eow.<span style="color:#0000ff;">EMPID</span><span style="color:#008000;">;</span></div></li><br /></ol></div><br /></div><br /><span style="font-size:85%;"><b>Filtering</b></span><br /><br /><br /><div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /><br /><div class="csharp" style="BORDER-RIGHT: #d0d0d0 1px solid; BORDER-TOP: #d0d0d0 1px solid; BORDER-LEFT: #d0d0d0 1px solid; COLOR: #006; BORDER-BOTTOM: #d0d0d0 1px solid; FONT-FAMILY: monospace; BACKGROUND-COLOR: #f0f0f0"><br /><ol><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="FONT-STYLE: italic;color:#008080;" >// We can apply filtering for Dates, Strings, Numerics, etc</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">Company cm <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> Company<span style="color:#000000;">(</span><span style="color:#000000;">)</span><span style="color:#008000;">;</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="color:#ff0000;">string</span> cFilterExpr <span style="color:#008000;">=</span> <span style="color:#666666;">""</span><span style="color:#008000;">;</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"></div></li><br /><br /><li style="FONT-WEIGHT: bold; VERTICAL-ALIGN: top; COLOR: #006060"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="FONT-STYLE: italic;color:#008080;" >// Date handling</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">cFilterExpr <span style="color:#008000;">=</span> <span style="color:#666666;">"DOJ >= '01/31/2006' AND InvoiceDate <= '02/28/2006'"</span><span style="color:#008000;">;</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">cFilterExpr <span style="color:#008000;">=</span> <span style="color:#666666;">"DOJ >= #01/31/2006"</span><span style="color:#008000;">;</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="FONT-STYLE: italic;color:#008080;" >// Full and partial text searches</span></div></li><br /><br /><li style="FONT-WEIGHT: bold; VERTICAL-ALIGN: top; COLOR: #006060"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">cFilterExpr <span style="color:#008000;">=</span> <span style="color:#666666;">"FName = 'Ram'"</span><span style="color:#008000;">;</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="FONT-STYLE: italic;color:#008080;" >// Search for "Construction" anywhere</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">cFilterExpr <span style="color:#008000;">=</span> <span style="color:#666666;">"FName LIKE '%Ram%'"</span><span style="color:#008000;">;</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"></div></li><br /><br /><li style="FONT-WEIGHT: bold; VERTICAL-ALIGN: top; COLOR: #006060"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="FONT-STYLE: italic;color:#008080;" >// Numeric data</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">cFilterExpr <span style="color:#008000;">=</span> <span style="color:#666666;">"Sal > 1000"</span><span style="color:#008000;">;</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="FONT-STYLE: italic;color:#008080;" >// Combining AND/OR</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">cFilterExpr <span style="color:#008000;">=</span> <span style="color:#666666;">"(FName LIKE '%Ram%' OR FName LIKE %Krishna%') AND Sal > 5000"</span><span style="color:#008000;">;</span></div></li><br /><br /><li style="FONT-WEIGHT: bold; VERTICAL-ALIGN: top; COLOR: #006060"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="FONT-STYLE: italic;color:#008080;" >// Using the IN function</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">cFilterExpr <span style="color:#008000;">=</span> <span style="color:#666666;">"Sal IN (1000,2000,3000)"</span><span style="color:#008000;">;</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">cFilterExpr <span style="color:#008000;">=</span> <span style="color:#666666;">"FName IN ('Ram','Rama')"</span><span style="color:#008000;">;</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">cFilterExpr <span style="color:#008000;">=</span> <span style="color:#666666;">"FName NOT IN ('Ashfaq','Sajju')"</span><span style="color:#008000;">;</span></div></li><br /><br /><li style="FONT-WEIGHT: bold; VERTICAL-ALIGN: top; COLOR: #006060"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="FONT-STYLE: italic;color:#008080;" >// Using the ISNULL function</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">cFilterExpr <span style="color:#008000;">=</span> <span style="color:#666666;">"ISNULL(InvoiceAmount,-9999)=-9999"</span><span style="color:#008000;">;</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"><span style="FONT-STYLE: italic;color:#008080;" >// Using the PARENT (or CHILD) function</span></div></li><br /><br /><li style="FONT-WEIGHT: bold; VERTICAL-ALIGN: top; COLOR: #006060"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">cFilterExpr <span style="color:#008000;">=</span> <span style="color:#666666;">"Parent(RelName) = like '%NATIONAL'"</span><span style="color:#008000;">;</span></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px"></div></li><br /><br /><li style="FONT: 100% 'Courier New', Courier, monospace; VERTICAL-ALIGN: top; COLOR: #003030"><br /><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; FONT: 1em/1.2em monospace; VERTICAL-ALIGN: top; PADDING-TOP: 0px">DataRow<span style="color:#000000;">[</span><span style="color:#000000;">]</span> dr <span style="color:#008000;">=</span> cm.<span style="color:#0000ff;">Employee</span>.<span style="color:#0000ff;">Select</span><span style="color:#000000;">(</span>cFilterExpr<span style="color:#000000;">)</span><span style="color:#008000;">;</span></div></li><br /></ol></div></div><p>We can peroform more operations like Data Relations, etc with Typed Datasets.</p>Ramkyhttp://www.blogger.com/profile/05722860132583858043noreply@blogger.com0tag:blogger.com,1999:blog-4955511806150724268.post-61775462848837589292008-10-24T20:44:00.000-07:002008-10-24T20:57:01.921-07:00.Net Keyboard Shortcuts<span style="font-size:85%;"><br /><ol><br /><li><b>For Uppar Case/Lower Case: <span style="color:blue;">Ctrl+SHFT+U/Ctrl+U</span></b></li><br /><li><b>To Specify regions and etc: <span style="color:blue;">CTRL+K, CTRL+S</span></b></li><br /><li><b>Word Wrap: <span style="color:blue;">CTRL+E, W</span></b></li><br /><li><b>Transpose Line: <span style="color:blue;">SHFT+ALT+T</span></b></li><br /><li><b>Delete white space: <span style="color:blue;">CTRL+K, \</span></b></li><br /><li><b>Move to Nav Bar: <span style="color:blue;">Ctrl + F2</span></b></li><br /><li><b>For Full Screen: <span style="color:blue;">Alt + Shift + Enter</span></b></li><br /><li><b>For Intellisense: <span style="color:blue;">Ctrl + J Or Ctrl + Space</span></b></li><br /><li><b>To close the current tab: <span style="color:blue;">Ctrl+F4</span></b></li><br /><li><b>Expand/collapse definitions : <span style="color:blue;">Ctrl+M+M </span></b></li><br /><li><b>Used to move pervious position: <span style="color:blue;">Ctrl +-</span></b></li><br /><li><b>Go to declaration/Find usages: <span style="color:blue;">F12</span></b></li><br /><li><b>To focus on Solution Explorer: <span style="color:blue;">Ctrl + Alt + L</span></b></li><br /><li><b>To copy any line in your .Net Editor don’t select complete line, just place the cursor on the line and press ctrl-c and press ctrl-v where ever you want to paste the line.</b></li><br /><li><b>For Comments: <span style="color:blue;">Ctrl – K + C</span></b></li><br /><li><b>For Un Comments: <span style="color:blue;">Ctrl – K + U</span></b></li><br /><li><b>To Format the document: <span style="color:blue;">Ctrl-K + D</span></b></li><br /><li><b>To Add new items: <span style="color:blue;">Ctrl-N or Ctrl-Shift+A</span></b></li><br /><li><b>To cut a line you also use: <span style="color:blue;">Ctrl-L</span></b></li><br /><li><b>To shift between .net editor Pages: <span style="color:blue;">Ctrl + Tab</span></b></li><br /><li><b>To Format the selection: <span style="color:blue;">Ctrl – K + F</span></b></li><br /><li><b>To cycle through clipboard "ring": <span style="color:blue;">Ctrl+Shift+V</span></b></li><br /><li><b>To Add a Book Mark use: <span style="color:blue;">Ctrl K + K</span></b></li><br /><li><b>To Navigate to new Book Mark: <span style="color:blue;">Ctrl K + N</span></b></li><br /><li><b>To Clear all book marks : <span style="color:blue;">CTRL+B, C</span></b></li><br /></ol><br /></span>Ramkyhttp://www.blogger.com/profile/05722860132583858043noreply@blogger.com0tag:blogger.com,1999:blog-4955511806150724268.post-63582833507119061002008-10-16T21:19:00.000-07:002008-10-16T21:31:49.649-07:00Creating PDFs on Fly with ASP.Net for Free of Cost<span style="font-size:85%;">Here I am going to show you how we can create PDFs with ASP.Net with Free of cost. There is tool called “iTextSharp” using this dll we can create pdfs. Not only pdfs we can able to crate rtf also. iTextSharp provides various classes to make pdf with different options.</span><br /><span style="font-size:85%;">In the generated pdf file we can add tables, Images, Links etc. Here in I am explaining with some examples.</span><br /><span style="font-size:85%;">First add the ‘iTextSharp” dll to your applications.</span><br /><div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid; WHITE-SPACE: nowrapfont-family:Courier New;font-size:10pt;color:black;" ><br /><div class="csharp csharp" style="BORDER-RIGHT: #d0d0d0 1px solid; BORDER-TOP: #d0d0d0 1px solid; BORDER-LEFT: #d0d0d0 1px solid; COLOR: #006; BORDER-BOTTOM: #d0d0d0 1px solidfont-family:monospace;color:#f0f0f0;" ><ol><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" ><span style="color:#0600ff;">using</span> <span style="color:#008080;">sharp</span><span style="color:#008000;">=</span>iTextSharp.<span style="color:#0000ff;">text</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" ><span style="color:#0600ff;">using</span> <span style="color:#008080;">iTextSharp.text.pdf</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" ><span style="color:#0600ff;">using</span> <span style="color:#008080;">iTextSharp.text.xml</span>;</div></li><br /></ol></div><br /></div><br /><span style="font-size:85%;"><b>Creating Sample PDF</b></span><br /><div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid; WHITE-SPACE: nowrapfont-family:Courier New;font-size:10pt;color:black;" ><br /><div class="csharp csharp" style="BORDER-RIGHT: #d0d0d0 1px solid; BORDER-TOP: #d0d0d0 1px solid; BORDER-LEFT: #d0d0d0 1px solid; COLOR: #006; BORDER-BOTTOM: #d0d0d0 1px solidfont-family:monospace;color:#f0f0f0;" ><ol><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > sharp.<span style="color:#0000ff;">Document</span> document <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Document</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > <span style="color:#ff0000;">string</span> path <span style="color:#008000;">=</span> Server.<span style="color:#0000ff;">MapPath</span><span style="color:#000000;">(</span><span style="color:#666666;">"."</span><span style="color:#000000;">)</span> <span style="color:#008000;">+</span> <span style="color:#666666;">"<span style="FONT-WEIGHT: bold;color:#008080;" >\\</span>"</span> <span style="color:#008000;">+</span> <span style="color:#666666;">"Sample.pdf"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > PdfWriter.<span style="color:#0000ff;">GetInstance</span><span style="color:#000000;">(</span>document, <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> FileStream<span style="color:#000000;">(</span>path, FileMode.<span style="color:#0000ff;">Create</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > document.<span style="color:#0000ff;">Open</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > <span style="FONT-STYLE: italic;color:#008080;" >//Here I am adding a Paragraph to the document</span></div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > document.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span><a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Paragraph</span><span style="color:#000000;">(</span><span style="color:#666666;">"Its a Sample Example for Creating PDF File Using iTextSharp. Its For Free of Cost."</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > document.<span style="color:#0000ff;">Close</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /></ol></div><br /></div><br /><span style="font-size:85%;"><b>PDF with Different Fonts</b></span><br /><div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid; WHITE-SPACE: nowrapfont-family:Courier New;font-size:10pt;color:black;" ><br /><div class="csharp csharp" style="BORDER-RIGHT: #d0d0d0 1px solid; BORDER-TOP: #d0d0d0 1px solid; BORDER-LEFT: #d0d0d0 1px solid; COLOR: #006; BORDER-BOTTOM: #d0d0d0 1px solidfont-family:monospace;color:#f0f0f0;" ><ol><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" >sharp.<span style="color:#0000ff;">Document</span> document <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Document</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > <span style="color:#ff0000;">string</span> path <span style="color:#008000;">=</span> Server.<span style="color:#0000ff;">MapPath</span><span style="color:#000000;">(</span><span style="color:#666666;">"."</span><span style="color:#000000;">)</span> <span style="color:#008000;">+</span> <span style="color:#666666;">"<span style="FONT-WEIGHT: bold;color:#008080;" >\\</span>"</span> <span style="color:#008000;">+</span> <span style="color:#666666;">"Fonts.pdf"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > PdfWriter.<span style="color:#0000ff;">GetInstance</span><span style="color:#000000;">(</span>document, <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> FileStream<span style="color:#000000;">(</span>path, FileMode.<span style="color:#0000ff;">Create</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > document.<span style="color:#0000ff;">Open</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > </div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > sharp.<span style="color:#0000ff;">Phrase</span> myPhrase <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Phrase</span><span style="color:#000000;">(</span><span style="color:#666666;">"Hello 1! "</span>, <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Font</span><span style="color:#000000;">(</span>sharp.<span style="color:#0000ff;">Font</span>.<span style="color:#0000ff;">TIMES_ROMAN</span>, <span style="color:#ff0000;">8</span>, sharp.<span style="color:#0000ff;">Font</span>.<span style="color:#0000ff;">BOLD</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > myPhrase.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span><a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Phrase</span><span style="color:#000000;">(</span><span style="color:#666666;">"some other font "</span>, <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Font</span><span style="color:#000000;">(</span>sharp.<span style="color:#0000ff;">Font</span>.<span style="color:#0000ff;">HELVETICA</span>, <span style="color:#ff0000;">8</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > myPhrase.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span><a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Phrase</span><span style="color:#000000;">(</span><span style="color:#666666;">"This is the end of the sentence.<span style="FONT-WEIGHT: bold;color:#008080;" >\n</span>"</span>, <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Font</span><span style="color:#000000;">(</span>sharp.<span style="color:#0000ff;">Font</span>.<span style="color:#0000ff;">TIMES_ROMAN</span>, <span style="color:#ff0000;">8</span>, sharp.<span style="color:#0000ff;">Font</span>.<span style="color:#0000ff;">ITALIC</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > document.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span>myPhrase<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > </div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > myPhrase <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Phrase</span><span style="color:#000000;">(</span><span style="color:#666666;">"Hello 1bis! "</span>, sharp.<span style="color:#0000ff;">FontFactory</span>.<span style="color:#0000ff;">GetFont</span><span style="color:#000000;">(</span>sharp.<span style="color:#0000ff;">FontFactory</span>.<span style="color:#0000ff;">TIMES_ROMAN</span>, <span style="color:#ff0000;">8</span>, sharp.<span style="color:#0000ff;">Font</span>.<span style="color:#0000ff;">BOLD</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > myPhrase.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span><a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Phrase</span><span style="color:#000000;">(</span><span style="color:#666666;">"some other font "</span>, sharp.<span style="color:#0000ff;">FontFactory</span>.<span style="color:#0000ff;">GetFont</span><span style="color:#000000;">(</span>sharp.<span style="color:#0000ff;">FontFactory</span>.<span style="color:#0000ff;">HELVETICA</span>, <span style="color:#ff0000;">8</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > myPhrase.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span><a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Phrase</span><span style="color:#000000;">(</span><span style="color:#666666;">"This is the end of the sentence.<span style="FONT-WEIGHT: bold;color:#008080;" >\n</span>"</span>, sharp.<span style="color:#0000ff;">FontFactory</span>.<span style="color:#0000ff;">GetFont</span><span style="color:#000000;">(</span>sharp.<span style="color:#0000ff;">FontFactory</span>.<span style="color:#0000ff;">TIMES_ROMAN</span>, <span style="color:#ff0000;">8</span>, sharp.<span style="color:#0000ff;">Font</span>.<span style="color:#0000ff;">ITALIC</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > document.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span>myPhrase<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > </div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > sharp.<span style="color:#0000ff;">Paragraph</span> myParagraph <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Paragraph</span><span style="color:#000000;">(</span><span style="color:#666666;">"Hello 2! "</span>, <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Font</span><span style="color:#000000;">(</span>sharp.<span style="color:#0000ff;">Font</span>.<span style="color:#0000ff;">TIMES_ROMAN</span>, <span style="color:#ff0000;">8</span>, sharp.<span style="color:#0000ff;">Font</span>.<span style="color:#0000ff;">BOLD</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > myParagraph.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span><a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Paragraph</span><span style="color:#000000;">(</span><span style="color:#666666;">"This is the end of the sentence."</span>, <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Font</span><span style="color:#000000;">(</span>sharp.<span style="color:#0000ff;">Font</span>.<span style="color:#0000ff;">TIMES_ROMAN</span>, <span style="color:#ff0000;">8</span>, sharp.<span style="color:#0000ff;">Font</span>.<span style="color:#0000ff;">ITALIC</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > document.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span>myParagraph<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > </div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > myParagraph <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Paragraph</span><span style="color:#000000;">(</span><span style="color:#ff0000;">12</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > myParagraph.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span><a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Paragraph</span><span style="color:#000000;">(</span><span style="color:#666666;">"Hello 3! "</span>, <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Font</span><span style="color:#000000;">(</span>sharp.<span style="color:#0000ff;">Font</span>.<span style="color:#0000ff;">TIMES_ROMAN</span>, <span style="color:#ff0000;">8</span>, sharp.<span style="color:#0000ff;">Font</span>.<span style="color:#0000ff;">BOLD</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > myParagraph.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span><a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Paragraph</span><span style="color:#000000;">(</span><span style="color:#666666;">"This is the end of the sentence."</span>, <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Font</span><span style="color:#000000;">(</span>sharp.<span style="color:#0000ff;">Font</span>.<span style="color:#0000ff;">TIMES_ROMAN</span>, <span style="color:#ff0000;">8</span>, sharp.<span style="color:#0000ff;">Font</span>.<span style="color:#0000ff;">ITALIC</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > document.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span>myParagraph<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > </div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > myPhrase <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Phrase</span><span style="color:#000000;">(</span><span style="color:#ff0000;">12</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > myPhrase.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span><a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Phrase</span><span style="color:#000000;">(</span><span style="color:#666666;">"Hello 4! "</span>, <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Font</span><span style="color:#000000;">(</span>sharp.<span style="color:#0000ff;">Font</span>.<span style="color:#0000ff;">TIMES_ROMAN</span>, <span style="color:#ff0000;">8</span>, sharp.<span style="color:#0000ff;">Font</span>.<span style="color:#0000ff;">BOLD</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > myPhrase.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span><a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Phrase</span><span style="color:#000000;">(</span><span style="color:#666666;">"This is the end of the sentence.<span style="FONT-WEIGHT: bold;color:#008080;" >\n</span>"</span>, <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Font</span><span style="color:#000000;">(</span>sharp.<span style="color:#0000ff;">Font</span>.<span style="color:#0000ff;">TIMES_ROMAN</span>, <span style="color:#ff0000;">8</span>, sharp.<span style="color:#0000ff;">Font</span>.<span style="color:#0000ff;">ITALIC</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > document.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span>myPhrase<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > </div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > myPhrase <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Phrase</span><span style="color:#000000;">(</span><span style="color:#ff0000;">12</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > myPhrase.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span><a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Phrase</span><span style="color:#000000;">(</span><span style="color:#666666;">"Hello 5! "</span>, <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Font</span><span style="color:#000000;">(</span>sharp.<span style="color:#0000ff;">Font</span>.<span style="color:#0000ff;">COURIER</span>, <span style="color:#ff0000;">12</span>, sharp.<span style="color:#0000ff;">Font</span>.<span style="color:#0000ff;">BOLD</span>, sharp.<span style="color:#0000ff;">Color</span>.<span style="color:#0000ff;">RED</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > myPhrase.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span><a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Phrase</span><span style="color:#000000;">(</span><span style="color:#666666;">"This Font in Blue Color.<span style="FONT-WEIGHT: bold;color:#008080;" >\n</span>"</span>, <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Font</span><span style="color:#000000;">(</span>sharp.<span style="color:#0000ff;">Font</span>.<span style="color:#0000ff;">COURIER</span>, <span style="color:#ff0000;">12</span>, sharp.<span style="color:#0000ff;">Font</span>.<span style="color:#0000ff;">ITALIC</span>, sharp.<span style="color:#0000ff;">Color</span>.<span style="color:#0000ff;">BLUE</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > document.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span>myPhrase<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > </div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > document.<span style="color:#0000ff;">Close</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /></ol></div><br /></div><br /><span style="font-size:85%;"><b>Creating Links, Lists, Annotations</b></span><br /><div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid; WHITE-SPACE: nowrapfont-family:Courier New;font-size:10pt;color:black;" ><br /><div class="csharp csharp" style="BORDER-RIGHT: #d0d0d0 1px solid; BORDER-TOP: #d0d0d0 1px solid; BORDER-LEFT: #d0d0d0 1px solid; COLOR: #006; BORDER-BOTTOM: #d0d0d0 1px solidfont-family:monospace;color:#f0f0f0;" ><ol><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" ><span style="FONT-STYLE: italic;color:#008080;" >// Here I am Creating Multiple Pages. </span></div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > sharp.<span style="color:#0000ff;">Document</span> document <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Document</span><span style="color:#000000;">(</span>sharp.<span style="color:#0000ff;">PageSize</span>.<span style="color:#0000ff;">A4</span>, <span style="color:#ff0000;">50</span>, <span style="color:#ff0000;">50</span>, <span style="color:#ff0000;">50</span>, <span style="color:#ff0000;">50</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > <span style="color:#ff0000;">string</span> path <span style="color:#008000;">=</span> Server.<span style="color:#0000ff;">MapPath</span><span style="color:#000000;">(</span><span style="color:#666666;">"."</span><span style="color:#000000;">)</span> <span style="color:#008000;">+</span> <span style="color:#666666;">"<span style="FONT-WEIGHT: bold;color:#008080;" >\\</span>"</span> <span style="color:#008000;">+</span> <span style="color:#666666;">"Links.pdf"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > PdfWriter writer <span style="color:#008000;">=</span> PdfWriter.<span style="color:#0000ff;">GetInstance</span><span style="color:#000000;">(</span>document, <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> FileStream<span style="color:#000000;">(</span>path, FileMode.<span style="color:#0000ff;">Create</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > </div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > document.<span style="color:#0000ff;">Open</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > </div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > <span style="FONT-STYLE: italic;color:#008080;" >//Page 1 Links</span></div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > document.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span><a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Paragraph</span><span style="color:#000000;">(</span><span style="color:#666666;">"Sample Link: <span style="FONT-WEIGHT: bold;color:#008080;" >\n</span>"</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > sharp.<span style="color:#0000ff;">Paragraph</span> para <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Paragraph</span><span style="color:#000000;">(</span><span style="color:#666666;">"Here is link for my blog:"</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > sharp.<span style="color:#0000ff;">Anchor</span> anchor <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Anchor</span><span style="color:#000000;">(</span><span style="color:#666666;">"Ramcrishna.Blogspot.com"</span>, sharp.<span style="color:#0000ff;">FontFactory</span>.<span style="color:#0000ff;">GetFont</span><span style="color:#000000;">(</span>sharp.<span style="color:#0000ff;">FontFactory</span>.<span style="color:#0000ff;">HELVETICA_BOLD</span>, <span style="color:#ff0000;">12</span>,sharp.<span style="color:#0000ff;">Font</span>.<span style="color:#0000ff;">UNDERLINE</span>, <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Color</span><span style="color:#000000;">(</span>0,0,<span style="color:#ff0000;">255</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > anchor.<span style="color:#0000ff;">Reference</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"http://ramcrishna.blogspot.com"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > anchor.<span style="color:#0000ff;">Name</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"top"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > para.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span>anchor<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > document.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span>para<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > </div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > <span style="FONT-STYLE: italic;color:#008080;" >//Page 2 Lists</span></div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > document.<span style="color:#0000ff;">NewPage</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > document.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span><a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Paragraph</span><span style="color:#000000;">(</span><span style="color:#666666;">"Sample List: <span style="FONT-WEIGHT: bold;color:#008080;" >\n</span>"</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > sharp.<span style="color:#0000ff;">List</span> lst <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">List</span><span style="color:#000000;">(</span><span style="color:#0600ff;">true</span>, <span style="color:#ff0000;">20</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > lst.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span><a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">ListItem</span><span style="color:#000000;">(</span><span style="color:#666666;">"Fist Item"</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > lst.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span><a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">ListItem</span><span style="color:#000000;">(</span><span style="color:#666666;">"Second Item"</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > lst.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span><a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">ListItem</span><span style="color:#000000;">(</span><span style="color:#666666;">"Third Item"</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > document.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span>lst<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > </div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > sharp.<span style="color:#0000ff;">Paragraph</span> para1 <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Paragraph</span><span style="color:#000000;">(</span><span style="color:#666666;">"Different List Type:"</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > lst <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">List</span><span style="color:#000000;">(</span><span style="color:#0600ff;">false</span>,<span style="color:#ff0000;">10</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > lst.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span><span style="color:#666666;">"ASP.Net"</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > lst.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span><span style="color:#666666;">"VB.Net"</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > lst.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span><span style="color:#666666;">"C#.Net"</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > para1.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span>lst<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > document.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span>para1<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > </div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > </div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > <span style="FONT-STYLE: italic;color:#008080;" >//Page 3 Annotations </span></div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > document.<span style="color:#0000ff;">NewPage</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > document.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span><a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Paragraph</span><span style="color:#000000;">(</span><span style="color:#666666;">"Sample Annotations: <span style="FONT-WEIGHT: bold;color:#008080;" >\n</span>"</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > PdfContentByte cb <span style="color:#008000;">=</span> writer.<span style="color:#0000ff;">DirectContent</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > </div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > cb.<span style="color:#0000ff;">SetRGBColorStroke</span><span style="color:#000000;">(</span>0x00, 0x00, 0xFF<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > cb.<span style="color:#0000ff;">Rectangle</span><span style="color:#000000;">(</span><span style="color:#ff0000;">100</span>, <span style="color:#ff0000;">700</span>, <span style="color:#ff0000;">100</span>, <span style="color:#ff0000;">100</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > cb.<span style="color:#0000ff;">Stroke</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > sharp.<span style="color:#0000ff;">Annotation</span> annot <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Annotation</span><span style="color:#000000;">(</span>100f, 700f, 200f, 800f, <span style="color:#666666;">"http://ramcrishna.blogspot.com"</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > document.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span>annot<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > cb.<span style="color:#0000ff;">SetRGBColorStroke</span><span style="color:#000000;">(</span>0xFF, 0x00, 0x00<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > cb.<span style="color:#0000ff;">Rectangle</span><span style="color:#000000;">(</span><span style="color:#ff0000;">200</span>, <span style="color:#ff0000;">700</span>, <span style="color:#ff0000;">100</span>, <span style="color:#ff0000;">100</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > cb.<span style="color:#0000ff;">Stroke</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > <span style="color:#0600ff;">try</span></div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > <span style="color:#000000;">{</span></div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > document.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span><a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Annotation</span><span style="color:#000000;">(</span>200f, 700f, 300f, 800f, <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> Uri<span style="color:#000000;">(</span><span style="color:#666666;">"http://www.asp.net"</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > <span style="color:#000000;">}</span></div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > <span style="color:#0600ff;">catch</span></div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > <span style="color:#000000;">{</span></div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > <span style="color:#000000;">}</span></div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > cb.<span style="color:#0000ff;">SetRGBColorStroke</span><span style="color:#000000;">(</span>0x00, 0xFF, 0x00<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > cb.<span style="color:#0000ff;">Rectangle</span><span style="color:#000000;">(</span><span style="color:#ff0000;">300</span>, <span style="color:#ff0000;">700</span>, <span style="color:#ff0000;">100</span>, <span style="color:#ff0000;">100</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > cb.<span style="color:#0000ff;">Stroke</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > document.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span><a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Annotation</span><span style="color:#000000;">(</span>300f, 700f, 400f, 800f, <span style="color:#666666;">"http://ramcrishna.blogspot.com"</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > cb.<span style="color:#0000ff;">SetRGBColorStroke</span><span style="color:#000000;">(</span>0x00, 0x00, 0xFF<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > cb.<span style="color:#0000ff;">Rectangle</span><span style="color:#000000;">(</span><span style="color:#ff0000;">100</span>, <span style="color:#ff0000;">500</span>, <span style="color:#ff0000;">100</span>, <span style="color:#ff0000;">100</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > cb.<span style="color:#0000ff;">Stroke</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > </div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > </div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > document.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span><a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Annotation</span><span style="color:#000000;">(</span><span style="color:#666666;">"Annotation"</span>, <span style="color:#666666;">"Its a Sample Annotation"</span>,100f, 500f, 200f, 600f<span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > cb.<span style="color:#0000ff;">SetRGBColorStroke</span><span style="color:#000000;">(</span>0xFF, 0x00, 0x00<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > cb.<span style="color:#0000ff;">Rectangle</span><span style="color:#000000;">(</span><span style="color:#ff0000;">200</span>, <span style="color:#ff0000;">500</span>, <span style="color:#ff0000;">100</span>, <span style="color:#ff0000;">100</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > cb.<span style="color:#0000ff;">Stroke</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > </div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > document.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span><a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Annotation</span><span style="color:#000000;">(</span>200f, 500f, 300f, 600f, <span style="color:#666666;">"http://ramcrishna.blogspot.com"</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > cb.<span style="color:#0000ff;">SetRGBColorStroke</span><span style="color:#000000;">(</span>0x00, 0xFF, 0x00<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > cb.<span style="color:#0000ff;">Rectangle</span><span style="color:#000000;">(</span><span style="color:#ff0000;">300</span>, <span style="color:#ff0000;">500</span>, <span style="color:#ff0000;">100</span>, <span style="color:#ff0000;">100</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > cb.<span style="color:#0000ff;">Stroke</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > document.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span><a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Annotation</span><span style="color:#000000;">(</span>300f, 500f, 400f, 600f, <span style="color:#666666;">"http://ramcrishna.blogspot.com"</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > </div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > document.<span style="color:#0000ff;">Close</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /></ol></div><br /></div><br /><span style="font-size:85%;"><b>Creating Headers & Footers</b></span><br /><div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid; WHITE-SPACE: nowrapfont-family:Courier New;font-size:10pt;color:black;" ><br /><div class="csharp csharp" style="BORDER-RIGHT: #d0d0d0 1px solid; BORDER-TOP: #d0d0d0 1px solid; BORDER-LEFT: #d0d0d0 1px solid; COLOR: #006; BORDER-BOTTOM: #d0d0d0 1px solidfont-family:monospace;color:#f0f0f0;" ><ol><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > <span style="FONT-STYLE: italic;color:#008080;" >// Creating Headers & Footer</span></div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > </div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > sharp.<span style="color:#0000ff;">Document</span> document <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Document</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > <span style="color:#ff0000;">string</span> path <span style="color:#008000;">=</span> Server.<span style="color:#0000ff;">MapPath</span><span style="color:#000000;">(</span><span style="color:#666666;">"."</span><span style="color:#000000;">)</span> <span style="color:#008000;">+</span> <span style="color:#666666;">"<span style="FONT-WEIGHT: bold;color:#008080;" >\\</span>"</span> <span style="color:#008000;">+</span> <span style="color:#666666;">"Header.pdf"</span>;</div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > PdfWriter.<span style="color:#0000ff;">GetInstance</span><span style="color:#000000;">(</span>document, <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> FileStream<span style="color:#000000;">(</span>path, FileMode.<span style="color:#0000ff;">Create</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > document.<span style="color:#0000ff;">Open</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > </div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > sharp.<span style="color:#0000ff;">HeaderFooter</span> hf <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">HeaderFooter</span><span style="color:#000000;">(</span><a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Phrase</span><span style="color:#000000;">(</span><span style="color:#666666;">"Header Text"</span><span style="color:#000000;">)</span>, <span style="color:#0600ff;">false</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > document.<span style="color:#0000ff;">Header</span> <span style="color:#008000;">=</span> hf;</div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > </div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > sharp.<span style="color:#0000ff;">HeaderFooter</span> foot <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">HeaderFooter</span><span style="color:#000000;">(</span><a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Phrase</span><span style="color:#000000;">(</span><span style="color:#666666;">"Footer Text"</span><span style="color:#000000;">)</span>, <span style="color:#0600ff;">false</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > document.<span style="color:#0000ff;">Footer</span> <span style="color:#008000;">=</span> foot;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > document.<span style="color:#0000ff;">Open</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > document.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span><a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Paragraph</span><span style="color:#000000;">(</span><span style="color:#666666;">"Page 1"</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > document.<span style="color:#0000ff;">NewPage</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > document.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span><a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Paragraph</span><span style="color:#000000;">(</span><span style="color:#666666;">"Page 2"</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > document.<span style="color:#0000ff;">Close</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /></ol></div><br /></div><br /><span style="font-size:85%;"><b>Creating Tables</b></span><br /><div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid; WHITE-SPACE: nowrapfont-family:Courier New;font-size:10pt;color:black;" ><br /><div class="csharp csharp" style="BORDER-RIGHT: #d0d0d0 1px solid; BORDER-TOP: #d0d0d0 1px solid; BORDER-LEFT: #d0d0d0 1px solid; COLOR: #006; BORDER-BOTTOM: #d0d0d0 1px solidfont-family:monospace;color:#f0f0f0;" ><ol><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > <span style="FONT-STYLE: italic;color:#008080;" >// Creating tables</span></div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > sharp.<span style="color:#0000ff;">Document</span> document <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Document</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > <span style="color:#ff0000;">string</span> path <span style="color:#008000;">=</span> Server.<span style="color:#0000ff;">MapPath</span><span style="color:#000000;">(</span><span style="color:#666666;">"."</span><span style="color:#000000;">)</span> <span style="color:#008000;">+</span> <span style="color:#666666;">"<span style="FONT-WEIGHT: bold;color:#008080;" >\\</span>"</span> <span style="color:#008000;">+</span> <span style="color:#666666;">"Tables.pdf"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > PdfWriter.<span style="color:#0000ff;">GetInstance</span><span style="color:#000000;">(</span>document, <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> FileStream<span style="color:#000000;">(</span>path, FileMode.<span style="color:#0000ff;">Create</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > document.<span style="color:#0000ff;">Open</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > <span style="FONT-STYLE: italic;color:#008080;" >// Static Table with 2 rows and 2 columns</span></div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > sharp.<span style="color:#0000ff;">Table</span> tbl <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Table</span><span style="color:#000000;">(</span><span style="color:#ff0000;">2</span>,<span style="color:#ff0000;">2</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > tbl.<span style="color:#0000ff;">Cellpadding</span> <span style="color:#008000;">=</span> <span style="color:#ff0000;">3</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > tbl.<span style="color:#0000ff;">Cellspacing</span> <span style="color:#008000;">=</span> <span style="color:#ff0000;">1</span>;</div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > tbl.<span style="color:#0000ff;">BorderColor</span> <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Color</span><span style="color:#000000;">(</span>0, 0, <span style="color:#ff0000;">255</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > tbl.<span style="color:#0000ff;">AddCell</span><span style="color:#000000;">(</span><span style="color:#666666;">"Col1"</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > tbl.<span style="color:#0000ff;">AddCell</span><span style="color:#000000;">(</span><span style="color:#666666;">"Col2"</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > tbl.<span style="color:#0000ff;">AddCell</span><span style="color:#000000;">(</span><span style="color:#666666;">"Col3"</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > tbl.<span style="color:#0000ff;">AddCell</span><span style="color:#000000;">(</span><span style="color:#666666;">"Col4"</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > document.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span>tbl<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > </div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > <span style="FONT-STYLE: italic;color:#008080;" >//Dynamic table from Dataset</span></div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > document.<span style="color:#0000ff;">NewPage</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > </div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > DataTable dt <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> DataTable<span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > DataColumn dtcol;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > DataRow dr;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > </div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dtcol <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> DataColumn<span style="color:#000000;">(</span><span style="color:#666666;">"UserName"</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dt.<span style="color:#0000ff;">Columns</span>.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span>dtcol<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dtcol <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> DataColumn<span style="color:#000000;">(</span><span style="color:#666666;">"FName"</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dt.<span style="color:#0000ff;">Columns</span>.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span>dtcol<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dtcol <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> DataColumn<span style="color:#000000;">(</span><span style="color:#666666;">"LName"</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dt.<span style="color:#0000ff;">Columns</span>.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span>dtcol<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dtcol <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> DataColumn<span style="color:#000000;">(</span><span style="color:#666666;">"City"</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dt.<span style="color:#0000ff;">Columns</span>.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span>dtcol<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dtcol <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> DataColumn<span style="color:#000000;">(</span><span style="color:#666666;">"Email"</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dt.<span style="color:#0000ff;">Columns</span>.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span>dtcol<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dtcol <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> DataColumn<span style="color:#000000;">(</span><span style="color:#666666;">"Mobile"</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dt.<span style="color:#0000ff;">Columns</span>.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span>dtcol<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > </div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr <span style="color:#008000;">=</span> dt.<span style="color:#0000ff;">NewRow</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"UserName"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Ram"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"FName"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Ram"</span>;</div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"LName"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Krishna "</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"City"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Hyderabad"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"Email"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"n.ramakrishna27@gmail.com"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"Mobile"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"123456"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dt.<span style="color:#0000ff;">Rows</span>.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span>dr<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > </div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr <span style="color:#008000;">=</span> dt.<span style="color:#0000ff;">NewRow</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"UserName"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Naveen"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"FName"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Naveen"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"LName"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Reddy"</span>;</div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"City"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Sec-Bad"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"Email"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"naveen@yahoo.co.in"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"Mobile"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"4210"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dt.<span style="color:#0000ff;">Rows</span>.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span>dr<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > </div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr <span style="color:#008000;">=</span> dt.<span style="color:#0000ff;">NewRow</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"UserName"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Raj"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"FName"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Raja"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"LName"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Shekar"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"City"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Banglore"</span>;</div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"Email"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"raj4u@yahoo.com"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"Mobile"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"01200"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dt.<span style="color:#0000ff;">Rows</span>.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span>dr<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > </div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr <span style="color:#008000;">=</span> dt.<span style="color:#0000ff;">NewRow</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"UserName"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Suresh"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"FName"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Suresh"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"LName"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Kumar"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"City"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Chennai"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"Email"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"suri@hotmail.com"</span>;</div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"Mobile"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"10120"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dt.<span style="color:#0000ff;">Rows</span>.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span>dr<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > </div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr <span style="color:#008000;">=</span> dt.<span style="color:#0000ff;">NewRow</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"UserName"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Ravi"</span>;</div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"FName"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Ravi"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"LName"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Kumar"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"City"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Vizag"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"Email"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"ravi@gmail.com"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"Mobile"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"1234"</span>;</div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dt.<span style="color:#0000ff;">Rows</span>.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span>dr<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > </div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr <span style="color:#008000;">=</span> dt.<span style="color:#0000ff;">NewRow</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"UserName"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Shaik"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"FName"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Shaik"</span>;</div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"LName"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Khan"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"City"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Vijayawada"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"Email"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"shaik@rediff.com"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"Mobile"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"1234"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dt.<span style="color:#0000ff;">Rows</span>.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span>dr<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > </div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr <span style="color:#008000;">=</span> dt.<span style="color:#0000ff;">NewRow</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"UserName"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Kiran"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"FName"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Kiran"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"LName"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Kumar"</span>;</div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"City"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Hyderabad"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"Email"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"kiran@yahoo.com"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"Mobile"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"12453"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dt.<span style="color:#0000ff;">Rows</span>.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span>dr<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > </div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr <span style="color:#008000;">=</span> dt.<span style="color:#0000ff;">NewRow</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"UserName"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Santu"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"FName"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Santhosh"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"LName"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Reddy"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"City"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Hyderabad"</span>;</div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"Email"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"santu@yahoo.com"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"Mobile"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"123"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dt.<span style="color:#0000ff;">Rows</span>.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span>dr<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > </div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr <span style="color:#008000;">=</span> dt.<span style="color:#0000ff;">NewRow</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"UserName"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Ashfak"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"FName"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Ashfak"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"LName"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Khan"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"City"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Hyderabad"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"Email"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"ash@yahoo.com"</span>;</div></li><br /><li style="FONT-WEIGHT: bold;color:#006060;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"Mobile"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"123"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dt.<span style="color:#0000ff;">Rows</span>.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span>dr<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > </div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr <span style="color:#008000;">=</span> dt.<span style="color:#0000ff;">NewRow</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"UserName"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Sajju"</span>;</div></li><br /><li style="FONT-WEIGHT: bold" color="#006060"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"FName"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Sajju"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"LName"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"MD"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"City"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"Hyderabad"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"Email"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"sajju@gmail.com"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dr<span style="color:#000000;">[</span><span style="color:#666666;">"Mobile"</span><span style="color:#000000;">]</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"123"</span>;</div></li><br /><li style="FONT-WEIGHT: bold" color="#006060"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > dt.<span style="color:#0000ff;">Rows</span>.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span>dr<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > </div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > <span style="color:#ff0000;">int</span> rowcount, coloumscount;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > rowcount <span style="color:#008000;">=</span> dt.<span style="color:#0000ff;">Rows</span>.<span style="color:#0000ff;">Count</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > coloumscount <span style="color:#008000;">=</span> dt.<span style="color:#0000ff;">Columns</span>.<span style="color:#0000ff;">Count</span>;</div></li><br /><li style="FONT-WEIGHT: bold" color="#006060"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > </div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > PdfPTable pdftbl <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> PdfPTable<span style="color:#000000;">(</span>coloumscount<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > pdftbl.<span style="color:#0000ff;">DefaultCell</span>.<span style="color:#0000ff;">Padding</span> <span style="color:#008000;">=</span> <span style="color:#ff0000;">3</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > <span style="color:#ff0000;">float</span><span style="color:#000000;">[</span><span style="color:#000000;">]</span> headerwidths <span style="color:#008000;">=</span> <span style="color:#000000;">{</span> <span style="color:#ff0000;">9</span>, <span style="color:#ff0000;">9</span>, <span style="color:#ff0000;">8</span>, <span style="color:#ff0000;">10</span>, <span style="color:#ff0000;">12</span>, <span style="color:#ff0000;">8</span> <span style="color:#000000;">}</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > pdftbl.<span style="color:#0000ff;">SetWidths</span><span style="color:#000000;">(</span>headerwidths<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT-WEIGHT: bold" color="#006060"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > pdftbl.<span style="color:#0000ff;">WidthPercentage</span> <span style="color:#008000;">=</span> <span style="color:#ff0000;">100</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > pdftbl.<span style="color:#0000ff;">DefaultCell</span>.<span style="color:#0000ff;">BorderWidth</span> <span style="color:#008000;">=</span> <span style="color:#ff0000;">2</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normalfont-family:monospace;" > pdftbl.<span style="color:#0000ff;">DefaultCell</span>.<span style="color:#0000ff;">HorizontalAlignment</span> <span style="color:#008000;">=</span> sharp.<span style="color:#0000ff;">Element</span>.<span style="color:#0000ff;">ALIGN_CENTER</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> </div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> pdftbl.<span style="color:#0000ff;">AddCell</span><span style="color:#000000;">(</span><span style="color:#666666;">"UserName"</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT-WEIGHT: bold" color="#006060"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> pdftbl.<span style="color:#0000ff;">AddCell</span><span style="color:#000000;">(</span><span style="color:#666666;">"FName"</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> pdftbl.<span style="color:#0000ff;">AddCell</span><span style="color:#000000;">(</span><span style="color:#666666;">"LName"</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace;color:#003030;" ><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> pdftbl.<span style="color:#0000ff;">AddCell</span><span style="color:#000000;">(</span><span style="color:#666666;">"City"</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace" color="#003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> pdftbl.<span style="color:#0000ff;">AddCell</span><span style="color:#000000;">(</span><span style="color:#666666;">"Email"</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace" color="#003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> pdftbl.<span style="color:#0000ff;">AddCell</span><span style="color:#000000;">(</span><span style="color:#666666;">"Mobile"</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT-WEIGHT: bold" color="#006060"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> </div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace" color="#003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> pdftbl.<span style="color:#0000ff;">HeaderRows</span> <span style="color:#008000;">=</span> <span style="color:#ff0000;">1</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace" color="#003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> pdftbl.<span style="color:#0000ff;">DefaultCell</span>.<span style="color:#0000ff;">BorderWidth</span> <span style="color:#008000;">=</span> <span style="color:#ff0000;">1</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace" color="#003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> </div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace" color="#003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> <span style="color:#ff0000;">int</span> max <span style="color:#008000;">=</span> dt.<span style="color:#0000ff;">Rows</span>.<span style="color:#0000ff;">Count</span>;</div></li><br /><li style="FONT-WEIGHT: bold" color="#006060"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> <span style="color:#0600ff;">for</span> <span style="color:#000000;">(</span><span style="color:#ff0000;">int</span> row <span style="color:#008000;">=</span> <span style="color:#ff0000;">1</span>,j<span style="color:#008000;">=</span><span style="color:#ff0000;">1</span> ; row <span style="color:#008000;"><</span> rowcount j<span style="color:#008000;"><</span>max; row<span style="color:#008000;">++</span>,j<span style="color:#008000;">++</span><span style="color:#000000;">)</span></div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace" color="#003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> <span style="color:#000000;">{</span></div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace" color="#003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> <span style="color:#0600ff;">if</span> <span style="color:#000000;">(</span>j <span style="color:#008000;">%</span> <span style="color:#ff0000;">2</span> <span style="color:#008000;">==</span> <span style="color:#ff0000;">1</span><span style="color:#000000;">)</span></div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace" color="#003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> <span style="color:#000000;">{</span></div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace" color="#003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> pdftbl.<span style="color:#0000ff;">DefaultCell</span>.<span style="color:#0000ff;">GrayFill</span> <span style="color:#008000;">=</span> 0.9f;</div></li><br /><li style="FONT-WEIGHT: bold" color="#006060"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> <span style="color:#000000;">}</span></div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace" color="#003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> <span style="color:#0600ff;">for</span> <span style="color:#000000;">(</span><span style="color:#ff0000;">int</span> colm <span style="color:#008000;">=</span> 0; colm <span style="color:#008000;"><</span> coloumscount; colm<span style="color:#008000;">++</span><span style="color:#000000;">)</span></div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace" color="#003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> <span style="color:#000000;">{</span></div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace" color="#003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> pdftbl.<span style="color:#0000ff;">AddCell</span><span style="color:#000000;">(</span>dt.<span style="color:#0000ff;">Rows</span><span style="color:#000000;">[</span>row <span style="color:#008000;">-</span> <span style="color:#ff0000;">1</span><span style="color:#000000;">]</span><span style="color:#000000;">[</span>colm<span style="color:#000000;">]</span>.<span style="color:#0000ff;">ToString</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace" color="#003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> </div></li><br /><li style="FONT-WEIGHT: bold" color="#006060"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> <span style="color:#000000;">}</span></div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace" color="#003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> <span style="color:#0600ff;">if</span> <span style="color:#000000;">(</span>j <span style="color:#008000;">%</span> <span style="color:#ff0000;">2</span> <span style="color:#008000;">==</span> <span style="color:#ff0000;">1</span><span style="color:#000000;">)</span></div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace" color="#003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> <span style="color:#000000;">{</span></div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace" color="#003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> pdftbl.<span style="color:#0000ff;">DefaultCell</span>.<span style="color:#0000ff;">GrayFill</span> <span style="color:#008000;">=</span> 0.4f;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace" color="#003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> <span style="color:#000000;">}</span></div></li><br /><li style="FONT-WEIGHT: bold" color="#006060"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> <span style="color:#000000;">}</span></div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace" color="#003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> document.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span>pdftbl<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace" color="#003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> document.<span style="color:#0000ff;">Close</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /></ol></div><br /></div><br /><span style="font-size:85%;"><b>PDF with Image</b></span><br /><div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid; WHITE-SPACE: nowrapfont-family:Courier New;font-size:10pt;color:black;" ><br /><div class="csharp csharp" style="BORDER-RIGHT: #d0d0d0 1px solid; BORDER-TOP: #d0d0d0 1px solid; BORDER-LEFT: #d0d0d0 1px solid; COLOR: #006; BORDER-BOTTOM: #d0d0d0 1px solidfont-family:monospace;color:#f0f0f0;" ><ol><li style="FONT: 100% 'Courier New', Courier, monospace" color="#003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> <span style="FONT-STYLE: italic;color:#008080;" >// Creating Images And water Marks</span></div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace" color="#003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> sharp.<span style="color:#0000ff;">Document</span> document <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Document</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace" color="#003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> <span style="color:#ff0000;">string</span> path <span style="color:#008000;">=</span> Server.<span style="color:#0000ff;">MapPath</span><span style="color:#000000;">(</span><span style="color:#666666;">"."</span><span style="color:#000000;">)</span> <span style="color:#008000;">+</span> <span style="color:#666666;">"<span style="FONT-WEIGHT: bold;color:#008080;" >\\</span>"</span> <span style="color:#008000;">+</span> <span style="color:#666666;">"Images.pdf"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace" color="#003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> PdfWriter.<span style="color:#0000ff;">GetInstance</span><span style="color:#000000;">(</span>document, <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> FileStream<span style="color:#000000;">(</span>path, FileMode.<span style="color:#0000ff;">Create</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT-WEIGHT: bold; COLOR: #006060"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> document.<span style="color:#0000ff;">Open</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace" color="#003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> </div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace" color="#003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> <span style="FONT-STYLE: italic;color:#008080;" >//Adding Images </span></div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace" color="#003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> <span style="color:#ff0000;">string</span> imgpath <span style="color:#008000;">=</span> Server.<span style="color:#0000ff;">MapPath</span><span style="color:#000000;">(</span><span style="color:#666666;">"images"</span><span style="color:#000000;">)</span> <span style="color:#008000;">+</span> <span style="color:#666666;">"<span style="FONT-WEIGHT: bold;color:#008080;" >\\</span>"</span> <span style="color:#008000;">+</span> <span style="color:#666666;">"img1.jpg"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace" color="#003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> sharp.<span style="color:#0000ff;">Image</span> img <span style="color:#008000;">=</span> sharp.<span style="color:#0000ff;">Image</span>.<span style="color:#0000ff;">GetInstance</span><span style="color:#000000;">(</span>imgpath<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT-WEIGHT: bold; COLOR: #006060"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> img.<span style="color:#0000ff;">ScalePercent</span><span style="color:#000000;">(</span><span style="color:#ff0000;">50</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace" color="#003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> document.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span>img<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace" color="#003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> document.<span style="color:#0000ff;">Close</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /></ol></div><br /></div><br /><span style="font-size:85%;"><b>Creating Password to PDF</b></span><br /><div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid; WHITE-SPACE: nowrapfont-family:Courier New;font-size:10pt;color:black;" ><br /><div class="csharp csharp" style="BORDER-RIGHT: #d0d0d0 1px solid; BORDER-TOP: #d0d0d0 1px solid; BORDER-LEFT: #d0d0d0 1px solid; COLOR: #006; BORDER-BOTTOM: #d0d0d0 1px solidfont-family:monospace;color:#f0f0f0;" ><ol><li style="FONT: 100% 'Courier New', Courier, monospace" color="#003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal" face="monospace"> sharp.<span style="color:#0000ff;">Document</span> document <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Document</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace" color="#003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> <span style="color:#ff0000;">string</span> path <span style="color:#008000;">=</span> Server.<span style="color:#0000ff;">MapPath</span><span style="color:#000000;">(</span><span style="color:#666666;">"."</span><span style="color:#000000;">)</span> <span style="color:#008000;">+</span> <span style="color:#666666;">"<span style="FONT-WEIGHT: bold;color:#008080;" >\\</span>"</span> <span style="color:#008000;">+</span> <span style="color:#666666;">"Password.pdf"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace" color="#003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> PdfWriter pd <span style="color:#008000;">=</span> PdfWriter.<span style="color:#0000ff;">GetInstance</span><span style="color:#000000;">(</span>document, <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> FileStream<span style="color:#000000;">(</span>path, FileMode.<span style="color:#0000ff;">Create</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace; COLOR: #003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> pd.<span style="color:#0000ff;">SetEncryption</span><span style="color:#000000;">(</span>PdfWriter.<span style="color:#0000ff;">STRENGTH128BITS</span>, <span style="color:#666666;">"userpass"</span>, <span style="color:#666666;">"password"</span>, PdfWriter.<span style="color:#0000ff;">AllowPrinting</span> PdfWriter.<span style="color:#0000ff;">AllowCopy</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT-WEIGHT: bold; COLOR: #006060"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> document.<span style="color:#0000ff;">Open</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace; COLOR: #003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> document.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span><a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Paragraph</span><span style="color:#000000;">(</span><span style="color:#666666;">"Congrats, You can access this file now."</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace; COLOR: #003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> document.<span style="color:#0000ff;">Close</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /></ol></div><br /></div><br /><span style="font-size:85%;"><b>Creating BarCodes in PDF</b></span><br /><div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid; WHITE-SPACE: nowrapfont-family:Courier New;font-size:10pt;color:black;" ><br /><div class="csharp csharp" style="BORDER-RIGHT: #d0d0d0 1px solid; BORDER-TOP: #d0d0d0 1px solid; BORDER-LEFT: #d0d0d0 1px solid; COLOR: #006; BORDER-BOTTOM: #d0d0d0 1px solidfont-family:monospace;color:#f0f0f0;" ><ol><li style="FONT: 100% 'Courier New', Courier, monospace; COLOR: #003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace">sharp.<span style="color:#0000ff;">Document</span> document <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Document</span><span style="color:#000000;">(</span>sharp.<span style="color:#0000ff;">PageSize</span>.<span style="color:#0000ff;">A4</span>, <span style="color:#ff0000;">50</span>, <span style="color:#ff0000;">50</span>, <span style="color:#ff0000;">50</span>, <span style="color:#ff0000;">50</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace; COLOR: #003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> <span style="color:#ff0000;">string</span> path <span style="color:#008000;">=</span> Server.<span style="color:#0000ff;">MapPath</span><span style="color:#000000;">(</span><span style="color:#666666;">"."</span><span style="color:#000000;">)</span> <span style="color:#008000;">+</span> <span style="color:#666666;">"<span style="FONT-WEIGHT: bold;color:#008080;" >\\</span>"</span> <span style="color:#008000;">+</span> <span style="color:#666666;">"d.pdf"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace; COLOR: #003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> PdfWriter pd <span style="color:#008000;">=</span> PdfWriter.<span style="color:#0000ff;">GetInstance</span><span style="color:#000000;">(</span>document, <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> FileStream<span style="color:#000000;">(</span>path, FileMode.<span style="color:#0000ff;">Create</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace; COLOR: #003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> document.<span style="color:#0000ff;">Open</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT-WEIGHT: bold; COLOR: #006060"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> PdfContentByte cb <span style="color:#008000;">=</span> pd.<span style="color:#0000ff;">DirectContent</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace; COLOR: #003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> sharp.<span style="color:#0000ff;">pdf</span>.<span style="color:#0000ff;">Barcode39</span> code39 <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">pdf</span>.<span style="color:#0000ff;">Barcode39</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace; COLOR: #003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> code39.<span style="color:#0000ff;">Code</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"CODE39-1234567890"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace; COLOR: #003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> code39.<span style="color:#0000ff;">StartStopText</span> <span style="color:#008000;">=</span> false;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace; COLOR: #003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> sharp.<span style="color:#0000ff;">Image</span> image39 <span style="color:#008000;">=</span> code39.<span style="color:#0000ff;">CreateImageWithBarcode</span><span style="color:#000000;">(</span>cb, <span style="color:#0600ff;">null</span>, <span style="color:#0600ff;">null</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT-WEIGHT: bold; COLOR: #006060"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> sharp.<span style="color:#0000ff;">pdf</span>.<span style="color:#0000ff;">Barcode39</span> code39ext <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">pdf</span>.<span style="color:#0000ff;">Barcode39</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace; COLOR: #003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> code39ext.<span style="color:#0000ff;">Code</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"The willows."</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace; COLOR: #003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> code39ext.<span style="color:#0000ff;">StartStopText</span> <span style="color:#008000;">=</span> false;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace; COLOR: #003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> code39ext.<span style="color:#0000ff;">Extended</span> <span style="color:#008000;">=</span> true;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace; COLOR: #003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> sharp.<span style="color:#0000ff;">Image</span> image39ext <span style="color:#008000;">=</span> code39ext.<span style="color:#0000ff;">CreateImageWithBarcode</span><span style="color:#000000;">(</span>cb, <span style="color:#0600ff;">null</span>, <span style="color:#0600ff;">null</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT-WEIGHT: bold; COLOR: #006060"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> sharp.<span style="color:#0000ff;">pdf</span>.<span style="color:#0000ff;">Barcode128</span> code128 <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">pdf</span>.<span style="color:#0000ff;">Barcode128</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace; COLOR: #003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> code128.<span style="color:#0000ff;">Code</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"1Z234786 hello"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace; COLOR: #003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> sharp.<span style="color:#0000ff;">Image</span> image128 <span style="color:#008000;">=</span> code128.<span style="color:#0000ff;">CreateImageWithBarcode</span><span style="color:#000000;">(</span>cb, <span style="color:#0600ff;">null</span>, <span style="color:#0600ff;">null</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace; COLOR: #003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> sharp.<span style="color:#0000ff;">pdf</span>.<span style="color:#0000ff;">BarcodeEAN</span> codeEAN <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">pdf</span>.<span style="color:#0000ff;">BarcodeEAN</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace; COLOR: #003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> codeEAN.<span style="color:#0000ff;">CodeType</span> <span style="color:#008000;">=</span> BarcodeEAN.<span style="color:#0000ff;">EAN13</span>;</div></li><br /><li style="FONT-WEIGHT: bold; COLOR: #006060"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> codeEAN.<span style="color:#0000ff;">Code</span> <span style="color:#008000;">=</span> <span style="color:#666666;">"9780201615883"</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace; COLOR: #003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> sharp.<span style="color:#0000ff;">Image</span> imageEAN <span style="color:#008000;">=</span> codeEAN.<span style="color:#0000ff;">CreateImageWithBarcode</span><span style="color:#000000;">(</span>cb, <span style="color:#0600ff;">null</span>, <span style="color:#0600ff;">null</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace; COLOR: #003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> </div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace; COLOR: #003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> PdfPTable table <span style="color:#008000;">=</span> <a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> PdfPTable<span style="color:#000000;">(</span><span style="color:#ff0000;">2</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace; COLOR: #003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> table.<span style="color:#0000ff;">WidthPercentage</span> <span style="color:#008000;">=</span> <span style="color:#ff0000;">100</span>;</div></li><br /><li style="FONT-WEIGHT: bold; COLOR: #006060"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> table.<span style="color:#0000ff;">DefaultCell</span>.<span style="color:#0000ff;">Border</span> <span style="color:#008000;">=</span> sharp.<span style="color:#0000ff;">Rectangle</span>.<span style="color:#0000ff;">NO_BORDER</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace; COLOR: #003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> table.<span style="color:#0000ff;">DefaultCell</span>.<span style="color:#0000ff;">HorizontalAlignment</span> <span style="color:#008000;">=</span> sharp.<span style="color:#0000ff;">Element</span>.<span style="color:#0000ff;">ALIGN_CENTER</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace; COLOR: #003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> table.<span style="color:#0000ff;">DefaultCell</span>.<span style="color:#0000ff;">VerticalAlignment</span> <span style="color:#008000;">=</span> sharp.<span style="color:#0000ff;">Element</span>.<span style="color:#0000ff;">ALIGN_MIDDLE</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace; COLOR: #003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> table.<span style="color:#0000ff;">DefaultCell</span>.<span style="color:#0000ff;">FixedHeight</span> <span style="color:#008000;">=</span> <span style="color:#ff0000;">70</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace; COLOR: #003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> table.<span style="color:#0000ff;">AddCell</span><span style="color:#000000;">(</span><span style="color:#666666;">"CODE 39"</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT-WEIGHT: bold; COLOR: #006060"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> table.<span style="color:#0000ff;">AddCell</span><span style="color:#000000;">(</span><a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Phrase</span><span style="color:#000000;">(</span><a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Chunk</span><span style="color:#000000;">(</span>image39, 0, 0<span style="color:#000000;">)</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace; COLOR: #003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> table.<span style="color:#0000ff;">AddCell</span><span style="color:#000000;">(</span><span style="color:#666666;">"CODE 39 EXTENDED"</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace; COLOR: #003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> table.<span style="color:#0000ff;">AddCell</span><span style="color:#000000;">(</span><a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Phrase</span><span style="color:#000000;">(</span><a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Chunk</span><span style="color:#000000;">(</span>image39ext, 0, 0<span style="color:#000000;">)</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace; COLOR: #003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> table.<span style="color:#0000ff;">AddCell</span><span style="color:#000000;">(</span><span style="color:#666666;">"CODE 128"</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace; COLOR: #003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> table.<span style="color:#0000ff;">AddCell</span><span style="color:#000000;">(</span><a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Phrase</span><span style="color:#000000;">(</span><a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Chunk</span><span style="color:#000000;">(</span>image128, 0, 0<span style="color:#000000;">)</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT-WEIGHT: bold; COLOR: #006060"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> table.<span style="color:#0000ff;">AddCell</span><span style="color:#000000;">(</span><span style="color:#666666;">"CODE EAN"</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace; COLOR: #003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> table.<span style="color:#0000ff;">AddCell</span><span style="color:#000000;">(</span><a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Phrase</span><span style="color:#000000;">(</span><a style="COLOR: #000060" href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> sharp.<span style="color:#0000ff;">Chunk</span><span style="color:#000000;">(</span>imageEAN, 0, 0<span style="color:#000000;">)</span><span style="color:#000000;">)</span><span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace; COLOR: #003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> </div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace; COLOR: #003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> document.<span style="color:#0000ff;">Add</span><span style="color:#000000;">(</span>table<span style="color:#000000;">)</span>;</div></li><br /><li style="FONT: 100% 'Courier New', Courier, monospace; COLOR: #003030"><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: normal; BACKGROUND: none transparent scroll repeat 0% 0%; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-STYLE: normal; FONT-FAMILY: monospace"> document.<span style="color:#0000ff;">Close</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div></li><br /></ol></div><br /></div><br /><span style="font-size:85%;">You Can Find more samples here <a href="http://itextsharp.sourceforge.net/tutorial/ch01.html">http://itextsharp.sourceforge.net/tutorial/ch01.html</a></span><br /><span style="font-size:85%;">Download Complete Application of Above Examples: <a href="http://www.4shared.com/file/67242127/ede3e72a/PDFSample.html" target="_blank">Click Here</a><br /></span>Ramkyhttp://www.blogger.com/profile/05722860132583858043noreply@blogger.com4tag:blogger.com,1999:blog-4955511806150724268.post-65639745757700215892008-10-07T00:50:00.000-07:002008-10-07T01:53:51.094-07:00What are the Good Qualities of a Developer??<span style="font-size:85%;">A developer doesn’t becomes a good developer simply by using a particular programming language.</span><br /><span style="font-size:85%;">The rapid development environments made this industry evolve faster then anything other I know today. This has positive and negative outcomes. Today’s developers can choose from a rich variety of programming languages, development tools and platforms, but it’s a lot harder to set up a secure, scalable environment. Hardware and software are getting more complex every day, it’s much harder to learn about new technologies today then it was yesterday.</span><br /><span style="font-size:85%;">Here are some qualities…</span><br /><span style="font-size:85%;"><br /><br /><li><b>Languages and Tools:</b><br />The first skill any developer needs to have is ability to work with programming languages and the main tools that are used with them. These could include build tools, IDEs, web frameworks, messaging APIs. </li><br /></span><span style="font-size:85%;"></span><span style="font-size:85%;"><p><br /><br /></p><li><b>Programming Paradigm: </b><br />Having a good understanding of object orientation which is vital for writing maintainable code with imperative languages. An understanding of ways to approach different problems you might encounter in enterprise development by knowing different patterns and when to apply them is also useful. </span></li><br /><li><span style="font-size:85%;"><br /><br /></li></span><span style="font-size:85%;"><li><b>Domain Specific Knowledge: </b><br />Specific knowledge about the domain is vital for writing a system which is closely linked to the problems it is trying to solve.<br /><br />Although a lot of this knowledge is acquired by the Business Analyst on the project if Developers can gain it too then conversations with users will be much easier to deal with as amongst other things the terminology they use will make sense. </span></li><br /><li><span style="font-size:85%;"><br /><br /></li></span><span style="font-size:85%;"><li><b>People Skills: </b><br />One of the most important skills in software development is the ability to work effectively with other people - fellow developers, Quality/Business Analysts, clients, users, the list is endless. If you can do this effectively then you go a long way to ensuring your success. </span></li><li><span style="font-size:85%;"><br /><br /></li></span><span style="font-size:85%;"><li><b>Problem Solving: </b><br />The ability to solve problems that don't have an obvious solution is key in software. Coding wise it could be debugging a class-path issue when deploying your application to JBoss or finding a tricky bug that a test reveals. </span></li><li><span style="font-size:85%;"><br /><br /></li></span><span style="font-size:85%;"><li><b>Good Communication skills: </b><br />In the software world, people usually define good communication skills as fluency in a spoken language. That's not really what it is. It is how effectively you are able to communicate with others. As a 'good' developer, you should be able to express yourself well, listen well, as well as manage the communication process well. </span></li><li><span style="font-size:85%;"><br /><br /></li></span><span style="font-size:85%;"><li><b>Read Books: </b><br />Read plenty of them to get a good idea of different technologies. Reading books gives you quick and handy insight into a technology. You should choose books that are usually written by known professionals who recommend best practices and different methods of solving a business problem using the technology. During the course of time, you will learn to develop your own methods. Who knows you may one day write a book!! </span></li><li><span style="font-size:85%;"><br /><br /></li></span><span style="font-size:85%;"><li><b>Practice, Practice and Practice: </b><br />A lot of developers having good amount of theoretical knowledge. They read a lot of books and technical material. However when it comes to applying that knowledge, they take a back foot. That is because they do not practice. Efficiency and effectiveness in your work can only be attained if you practice code. The only way you can make a good developer of yourself is to practice, and then practice some more. </span></li><li><span style="font-size:85%;"><br /><br /></li></span><span style="font-size:85%;"><li><b>Follow Patterns and Best Practices : </b><br />Patterns & practices reflect technical guidance, technical problem domain and engineering practices based on real-world experiences. The process to learn it is gradual, but once done; it can save you a lot of time and efforts and enable you to work smartly. Follow a Code Design Guideline. Always use a code analysis tools that will evaluate and analyze your code. </span></li><li><span style="font-size:85%;"><br /><br /></li></span><span style="font-size:85%;"><li><b>Discussion/Newsgroup: </b><br />Participating in communities develops the quality of leadership and contribution, both ingredients of success. Having participated in a good technical discussion on the community leaves you with a feeling of self-satisfaction. It also increases your knowledge, as you find smart people who can validate your solutions, as you validate theirs. It also teaches you to appreciate suggestions. Do not forget to 'pat someone on the back' if he/her has made a positive contribution. Believe me it makes all the difference. </span></li><li><span style="font-size:85%;"><br /><br /></li></span><span style="font-size:85%;"><li><b>Knowledge of Networking and Databases: </b><br />People may contradict this point, but a good developer should know the basics of networking and databases. Almost all the solutions that we create, involve interactions with networks and databases. Having knowledge of these two, helps you write better code and saves you on a lot of time too. </span></li><li><span style="font-size:85%;"><br /><br /></li></span><span style="font-size:85%;"><li><b>Blog/ Write Articles: </b><br />How many of us can remember everything? I cannot. So I document them. It helps me to reference stuff when I need them. Over and above, it also helps me get some good feedback from readers and shows me multiple approaches to do the same stuff. I have received a lot of feedback about my work, some good and some not so good. However, I do validate them and learn from this process. It develops the developer in you. </span></li><li><span style="font-size:85%;"><br /><br /></li></span><span style="font-size:85%;"><li><b>KISS: </b><br />Hey its not about that KISS ur thinking its a Keep Implementations/Approaches Short and Simple. Do not over complicate things by using jargons, which people find it hard to understand. The key is to simplify your designs and avoid over-engineering things. </span></li><li><span style="font-size:85%;"><br /><br /></li></span><li><b>Think as a Tester: </b><br />Developers and Testers; two sets of people from different camps, ready to take on each other. I have observed that the intersection of the two produces good results. It does not harm taking off the developer's hat for some time and putting on the tester's hat. In fact, in the long run it helps you reduce bugs/defects in your code. You develop a mindset of about breaking your code, when you are creating one. </li><br /></span><span style="font-size:85%;"></span><span style="font-size:85%;"><p><br /></p><li><b>Consistency is the name of the game: </b><br />Do you hop jobs too often or are bitten by the 'salary' bug? If yes, then it’s time for you to sit down, relax and plan. Invest time in thinking and let your decisions not be spontaneous. To move ahead, you need a solid foundation and that comes with consistency. </li><br /></span><span style="font-size:85%;"><p><br /></p><li><b>Attend technology seminars and events: </b><br />If there is one hosted in your city, make sure you take out time to attend one. Most of them are free and provide a valuable source of information about new technologies. </li><br /></span><span style="font-size:85%;"><p><br /></p><li><b>Jack of all or Master of One?: </b><br />Well that's a difficult one to answer. In today's scenario, you have to master more than one technology. Practically it is quite difficult to do so, but the good ones do it. However the key is adaptability over here. If you are good at any one technology and confident in it, given an opportunity, it would be easier for to relate to a new technology in a short period of time. Try it out as it enables you to compare technologies and make decisions, once you have worked with them. </li><br /></span><span style="font-size:85%;"><p><br /><br /></p><li><b>Stop complaining : </b><br />Did the software fail or are the testers giving you a tough time by finding a lot of bugs? A natural tendency for a lot of developers is to react and then overreact in such situations. While the reaction is natural, it may not be desirable. Analyze why the software failed or why was the bug reported. It is going to be a learning experience and will help you in your future projects. </span></li><br /><span style="font-size:85%;"><br />At the end, just remember that you are not going to remain a programmer for ever. So once you are satisfied and get a feeling that you have proven yourself as a good programmer, it’s time to re-program yourself. Expand your interests. Development is just a part of the process. Understanding the users and business is in itself an art, one should aim for and should master over a period of time.<br /></span><br /><span style="font-size:85%;"><br /><b>Source:</b>I have collected Information from various blogs and articles which Inspired me a lot.<br /></span><br /></span>Ramkyhttp://www.blogger.com/profile/05722860132583858043noreply@blogger.com2tag:blogger.com,1999:blog-4955511806150724268.post-3924297495481202952008-10-04T05:18:00.000-07:002008-10-06T03:16:12.044-07:00Most Useful JavaScript Functions<span style="font-size:85%;">We use Java Script in many situations in our web applications. For the validation purse. Here I am writing some useful java script functions which we use frequently.</span> <br /> <span style="font-size:85%;">I am giving the code for the fallowing…</span> <br /> <span style="font-size:85%;"><br /> <ul><br /> <li>Validate the date format</li><br /> <li>Not allowing to select previous date</li><br /> <li>Not allowing to select future date</li><br /> <li>Allowing only to enter date</li><br /> <li>Allowing only phone numbers(US Format)</li><br /> <li>Check for valid phone no or not (US Format)</li><br /> <li>Allowing only zip code</li><br /> <li>Check for valid zip code or not</li><br /> <li>Allowing only SSN</li><br /> <li>Check for valid SSN or not</li><br /> <li>Allowing only Numbers</li><br /> <li>Allowing only Alphabets</li><br /> <li>Allowing only Alpha Numeric characters</li><br /> <li>Allowing only special characters</li><br /> <li>Allowing Only Decimal values</li><br /> <li>Allowing only capital letters</li><br /> <li>Allowing only small letters</li><br /> <li>Trims trailing whitespace chars</li><br /> <li>Trims leading whitespace chars</li><br /> <li>Removes leading and trailing spaces</li><br /> <li>Prevents event firing on enter key press</li><br /> <li>Disabling BackSpace and delte button</li><br /> </ul><br /> </span> <br /> <span style="font-size:85%;"><br /> <b>how to Use this validations???</b> <br /><br /> We have to Use this functions based on the situations, we can use textbox's "onkeypress()", "onblur()" events.<br /><br /> Here is a sample...<br /> </span> <br /> <div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /> <div class="asp asp" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"><ol><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #006600; font-weight: bold"><</span>asp<span style="color: #006600; font-weight: bold">:</span>TextBox ID<span style="color: #006600; font-weight: bold">=</span><span style="color: #cc0000;">"txtname"</span> runat<span style="color: #006600; font-weight: bold">=</span><span style="color: #cc0000;">"server"</span> onkeypress<span style="color: #006600; font-weight: bold">=</span><span style="color: #cc0000;">"isDateNumberKey(event,this)"</span> onblur<span style="color: #006600; font-weight: bold">=</span><span style="color: #cc0000;">"return ValidateDateNoBack(this)"</span><span style="color: #006600; font-weight: bold">></</span>asp<span style="color: #006600; font-weight: bold">:</span>TextBox<span style="color: #006600; font-weight: bold">></span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #006600; font-weight: bold"><</span>cc1<span style="color: #006600; font-weight: bold">:</span>CalendarExtender ID<span style="color: #006600; font-weight: bold">=</span><span style="color: #cc0000;">"CalendarExtender1"</span> runat<span style="color: #006600; font-weight: bold">=</span><span style="color: #cc0000;">"server"</span> TargetControlID<span style="color: #006600; font-weight: bold">=</span><span style="color: #cc0000;">"txtname"</span> Format<span style="color: #006600; font-weight: bold">=</span><span style="color: #cc0000;">"MM/dd/yyyy"</span><span style="color: #006600; font-weight: bold">></span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #006600; font-weight: bold"></</span>cc1<span style="color: #006600; font-weight: bold">:</span>CalendarExtender<span style="color: #006600; font-weight: bold">></span></div></li><br /></ol></div><br /> </div> <br /> <span style="font-size:85%;"><br /> In the above code, I use two functions one for Not allowing the previous date and another for the <br /> allow to enter only date. Here you can enter only date.<br /> </span> <br /> <span style="font-size:85%;"><br /> <b>1.Validate the date format</b><br /> </span> <br /> <div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /> <div class="javascript javascript" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"><ol><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #003366; font-weight: bold;">function</span> ValidateDate<span style="color: #009900;">(</span>ctrl<span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>ctrl.<span style="color: #660066;">value</span>.<span style="color: #660066;">length</span> <span style="color: #339933;">!=</span> <span style="color: #CC0000;">10</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>ctrl.<span style="color: #660066;">value</span>.<span style="color: #660066;">length</span> <span style="color: #339933;">==</span> 0<span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">else</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066;">alert</span><span style="color: #009900;">(</span><span style="color: #3366CC;">'Invalid Date! Please enter in MM/DD/YYYY or MM-DD-YYYY format.'</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #660066;">value</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">""</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #000066;">focus</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> window.<span style="color: #660066;">event</span>.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">=</span> 0;</div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span>; </div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> </div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>ctrl.<span style="color: #660066;">value</span>.<span style="color: #660066;">length</span> <span style="color: #339933;">></span> 0<span style="color: #009900;">)</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> strValue <span style="color: #339933;">=</span> ctrl.<span style="color: #660066;">value</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> objRegExp <span style="color: #339933;">=</span> <span style="color: #009966; font-style: italic;">/^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{4}$/</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> </div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #006600; font-style: italic;">//check to see if in correct format</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">(</span><span style="color: #339933;">!</span>objRegExp.<span style="color: #660066;">test</span><span style="color: #009900;">(</span>strValue<span style="color: #009900;">)</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066;">alert</span><span style="color: #009900;">(</span><span style="color: #3366CC;">'Invalid Date! Please enter in MM/DD/YYYY or MM-DD-YYYY format.'</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #660066;">value</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">""</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #000066;">focus</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> window.<span style="color: #660066;">event</span>.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">=</span> 0;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span>; <span style="color: #006600; font-style: italic;">//doesn't match pattern, bad date</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">else</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> strSeparator <span style="color: #339933;">=</span> strValue.<span style="color: #660066;">substring</span><span style="color: #009900;">(</span><span style="color: #CC0000;">2</span><span style="color: #339933;">,</span><span style="color: #CC0000;">3</span><span style="color: #009900;">)</span> <span style="color: #006600; font-style: italic;">//find date separator</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> arrayDate <span style="color: #339933;">=</span> strValue.<span style="color: #660066;">split</span><span style="color: #009900;">(</span>strSeparator<span style="color: #009900;">)</span>; <span style="color: #006600; font-style: italic;">//split date into month, day, year</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #006600; font-style: italic;">//create a lookup for months not equal to Feb.</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> arrayLookup <span style="color: #339933;">=</span> <span style="color: #009900;">{</span> <span style="color: #3366CC;">'01'</span> <span style="color: #339933;">:</span> <span style="color: #CC0000;">31</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'03'</span> <span style="color: #339933;">:</span> <span style="color: #CC0000;">31</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'04'</span> <span style="color: #339933;">:</span> <span style="color: #CC0000;">30</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'05'</span> <span style="color: #339933;">:</span> <span style="color: #CC0000;">31</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'06'</span> <span style="color: #339933;">:</span> <span style="color: #CC0000;">30</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'07'</span> <span style="color: #339933;">:</span> <span style="color: #CC0000;">31</span><span style="color: #339933;">,</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #3366CC;">'08'</span> <span style="color: #339933;">:</span> <span style="color: #CC0000;">31</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'09'</span> <span style="color: #339933;">:</span> <span style="color: #CC0000;">30</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'10'</span> <span style="color: #339933;">:</span> <span style="color: #CC0000;">31</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'11'</span> <span style="color: #339933;">:</span> <span style="color: #CC0000;">30</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'12'</span> <span style="color: #339933;">:</span> <span style="color: #CC0000;">31</span><span style="color: #009900;">}</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> intDay <span style="color: #339933;">=</span> parseInt<span style="color: #009900;">(</span>arrayDate<span style="color: #009900;">[</span><span style="color: #CC0000;">1</span><span style="color: #009900;">]</span><span style="color: #339933;">,</span><span style="color: #CC0000;">10</span><span style="color: #009900;">)</span>; </div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> </div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> intYear <span style="color: #339933;">=</span> parseInt<span style="color: #009900;">(</span>arrayDate<span style="color: #009900;">[</span><span style="color: #CC0000;">2</span><span style="color: #009900;">]</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span><span style="color: #009900;">(</span>intYear <span style="color: #339933;"><</span> <span style="color: #CC0000;">1900</span><span style="color: #009900;">)</span> || <span style="color: #009900;">(</span>intYear <span style="color: #339933;">></span> <span style="color: #CC0000;">2020</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066;">alert</span><span style="color: #009900;">(</span><span style="color: #3366CC;">'Invalid Date! Please enter a year between 1900 and 2020.'</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #660066;">value</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">""</span>; </div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #000066;">focus</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> </div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> window.<span style="color: #660066;">event</span>.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">=</span> 0;</div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> </div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #006600; font-style: italic;">//check if month value and day value agree</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">(</span>arrayLookup<span style="color: #009900;">[</span>arrayDate<span style="color: #009900;">[</span>0<span style="color: #009900;">]</span><span style="color: #009900;">]</span> <span style="color: #339933;">!=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #009900;">)</span> </div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span><span style="color: #009900;">(</span>intDay <span style="color: #339933;"><=</span> arrayLookup<span style="color: #009900;">[</span>arrayDate<span style="color: #009900;">[</span>0<span style="color: #009900;">]</span><span style="color: #009900;">]</span><span style="color: #009900;">)</span> <span style="color: #339933;">&&</span> <span style="color: #009900;">(</span>intDay <span style="color: #339933;">></span> 0<span style="color: #009900;">)</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">else</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066;">alert</span><span style="color: #009900;">(</span><span style="color: #3366CC;">'Invalid Date! Please enter a valid Date.'</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #660066;">value</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">""</span>; </div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #000066;">focus</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> window.<span style="color: #660066;">event</span>.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">=</span> 0;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> </div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> intMonth <span style="color: #339933;">=</span> parseInt<span style="color: #009900;">(</span>arrayDate<span style="color: #009900;">[</span>0<span style="color: #009900;">]</span><span style="color: #339933;">,</span><span style="color: #CC0000;">10</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> </div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span><span style="color: #009900;">(</span>intMonth <span style="color: #339933;"><</span> 0<span style="color: #009900;">)</span> ||<span style="color: #009900;">(</span>intMonth <span style="color: #339933;">></span> <span style="color: #CC0000;">11</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066;">alert</span><span style="color: #009900;">(</span><span style="color: #3366CC;">'Invalid Month! Please enter a valid month.'</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #660066;">value</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">""</span>; </div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #000066;">focus</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> window.<span style="color: #660066;">event</span>.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">=</span> 0;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> </div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>intMonth <span style="color: #339933;">==</span> <span style="color: #CC0000;">2</span><span style="color: #009900;">)</span> </div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span> </div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> intYear <span style="color: #339933;">=</span> parseInt<span style="color: #009900;">(</span>arrayDate<span style="color: #009900;">[</span><span style="color: #CC0000;">2</span><span style="color: #009900;">]</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>intDay <span style="color: #339933;">></span> 0 <span style="color: #339933;">&&</span> intDay <span style="color: #339933;"><</span> <span style="color: #CC0000;">29</span><span style="color: #009900;">)</span> </div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>intDay <span style="color: #339933;">==</span> <span style="color: #CC0000;">29</span><span style="color: #009900;">)</span> </div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span><span style="color: #009900;">(</span>intYear <span style="color: #339933;">%</span> <span style="color: #CC0000;">4</span> <span style="color: #339933;">==</span> 0<span style="color: #009900;">)</span> <span style="color: #339933;">&&</span> <span style="color: #009900;">(</span>intYear <span style="color: #339933;">%</span> <span style="color: #CC0000;">100</span> <span style="color: #339933;">!=</span> 0<span style="color: #009900;">)</span> || <span style="color: #009900;">(</span>intYear <span style="color: #339933;">%</span> <span style="color: #CC0000;">400</span> <span style="color: #339933;">==</span> 0<span style="color: #009900;">)</span><span style="color: #009900;">)</span> </div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #006600; font-style: italic;">// year div by 4 and ((not div by 100) or div by 400) ->ok</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span> </div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">else</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066;">alert</span><span style="color: #009900;">(</span><span style="color: #3366CC;">'Invalid Date! Please enter a valid Date.'</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #660066;">value</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">""</span>; </div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #000066;">focus</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> window.<span style="color: #660066;">event</span>.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">=</span> 0;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> </div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span> </div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066;">alert</span><span style="color: #009900;">(</span><span style="color: #3366CC;">'Invalid Date! Please enter in MM/DD/YYYY or MM-DD-YYYY format.'</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #660066;">value</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">""</span>; </div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #000066;">focus</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> window.<span style="color: #660066;">event</span>.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">=</span> 0;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span>; <span style="color: #006600; font-style: italic;">//any other values, bad date</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">else</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">}</span></div></li><br /></ol></div><br /> </div> <br /> <br /> <span style="font-size:85%;"><br /> <b>2.Not allowing to select previous date</b><br /> </span> <br /> <div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /> <div class="javascript javascript" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"><ol><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #006600; font-style: italic;">//No Back date</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #003366; font-weight: bold;">function</span> ValidateDateNoBack<span style="color: #009900;">(</span>ctrl<span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>ctrl.<span style="color: #660066;">value</span>.<span style="color: #660066;">length</span> <span style="color: #339933;">></span> 0 <span style="color: #339933;">&&</span> ValidateDate<span style="color: #009900;">(</span>ctrl<span style="color: #009900;">)</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> strValue <span style="color: #339933;">=</span> ctrl.<span style="color: #660066;">value</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> </div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #006600; font-style: italic;">//Check here to validate previous dates.</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> strSeparator2 <span style="color: #339933;">=</span> strValue.<span style="color: #660066;">substring</span><span style="color: #009900;">(</span><span style="color: #CC0000;">2</span><span style="color: #339933;">,</span><span style="color: #CC0000;">3</span><span style="color: #009900;">)</span>; <span style="color: #006600; font-style: italic;">//find date separator</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> arrayDate2 <span style="color: #339933;">=</span> strValue.<span style="color: #660066;">split</span><span style="color: #009900;">(</span>strSeparator2<span style="color: #009900;">)</span>; <span style="color: #006600; font-style: italic;">//split date into month, day, year</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> myDate<span style="color: #339933;">=</span><span style="color: #003366; font-weight: bold;">new</span> Date<span style="color: #009900;">(</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> yr1 <span style="color: #339933;">=</span> parseInt<span style="color: #009900;">(</span>arrayDate2<span style="color: #009900;">[</span><span style="color: #CC0000;">2</span><span style="color: #009900;">]</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> mon1 <span style="color: #339933;">=</span> parseInt<span style="color: #009900;">(</span>arrayDate2<span style="color: #009900;">[</span>0<span style="color: #009900;">]</span><span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #339933;">,</span><span style="color: #CC0000;">10</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> day1 <span style="color: #339933;">=</span> parseInt<span style="color: #009900;">(</span>arrayDate2<span style="color: #009900;">[</span><span style="color: #CC0000;">1</span><span style="color: #009900;">]</span><span style="color: #339933;">,</span><span style="color: #CC0000;">10</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> myDate.<span style="color: #660066;">setFullYear</span><span style="color: #009900;">(</span>yr1<span style="color: #339933;">,</span>mon1<span style="color: #339933;">,</span>day1<span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> today <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Date<span style="color: #009900;">(</span><span style="color: #009900;">)</span>; </div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>myDate<span style="color: #339933;"><</span>today<span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066;">alert</span><span style="color: #009900;">(</span><span style="color: #3366CC;">'Invalid Date! This field accepts only future dates. Please enter a future date'</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #660066;">value</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">""</span>; </div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #000066;">focus</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> window.<span style="color: #660066;">event</span>.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">=</span> 0;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">else</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">}</span></div></li><br /></ol></div><br /> </div> <br /> <br /> <span style="font-size:85%;"><br /> <b>3.Not allowing to select future date</b><br /> </span> <br /> <div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /> <div class="javascript javascript" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"><ol><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #006600; font-style: italic;">//No Future Date</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #003366; font-weight: bold;">function</span> ValidateDateNoFuture<span style="color: #009900;">(</span>ctrl<span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>ctrl.<span style="color: #660066;">value</span>.<span style="color: #660066;">length</span> <span style="color: #339933;">></span> 0 <span style="color: #339933;">&&</span> ValidateDate<span style="color: #009900;">(</span>ctrl<span style="color: #009900;">)</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> strValue <span style="color: #339933;">=</span> ctrl.<span style="color: #660066;">value</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> </div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #006600; font-style: italic;">//Check here to validate previous dates.</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> strSeparator2 <span style="color: #339933;">=</span> strValue.<span style="color: #660066;">substring</span><span style="color: #009900;">(</span><span style="color: #CC0000;">2</span><span style="color: #339933;">,</span><span style="color: #CC0000;">3</span><span style="color: #009900;">)</span>; <span style="color: #006600; font-style: italic;">//find date separator</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> arrayDate2 <span style="color: #339933;">=</span> strValue.<span style="color: #660066;">split</span><span style="color: #009900;">(</span>strSeparator2<span style="color: #009900;">)</span>; <span style="color: #006600; font-style: italic;">//split date into month, day, year</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> myDate<span style="color: #339933;">=</span><span style="color: #003366; font-weight: bold;">new</span> Date<span style="color: #009900;">(</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> yr1 <span style="color: #339933;">=</span> parseInt<span style="color: #009900;">(</span>arrayDate2<span style="color: #009900;">[</span><span style="color: #CC0000;">2</span><span style="color: #009900;">]</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> mon1 <span style="color: #339933;">=</span> parseInt<span style="color: #009900;">(</span>arrayDate2<span style="color: #009900;">[</span>0<span style="color: #009900;">]</span><span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #339933;">,</span><span style="color: #CC0000;">10</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> day1 <span style="color: #339933;">=</span> parseInt<span style="color: #009900;">(</span>arrayDate2<span style="color: #009900;">[</span><span style="color: #CC0000;">1</span><span style="color: #009900;">]</span><span style="color: #339933;">,</span><span style="color: #CC0000;">10</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> myDate.<span style="color: #660066;">setFullYear</span><span style="color: #009900;">(</span>yr1<span style="color: #339933;">,</span>mon1<span style="color: #339933;">,</span>day1<span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> today <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Date<span style="color: #009900;">(</span><span style="color: #009900;">)</span>; </div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>myDate<span style="color: #339933;">></span>today<span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066;">alert</span><span style="color: #009900;">(</span><span style="color: #3366CC;">'Invalid Date! This field does not accept a future date. Please enter a valid Date'</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #660066;">value</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">""</span>; </div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #000066;">focus</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> window.<span style="color: #660066;">event</span>.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">=</span> 0;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">else</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> </div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">}</span></div></li><br /></ol></div><br /> </div> <br /> <br /> <span style="font-size:85%;"><br /> <b>4.Allowing only to enter date</b><br /> </span> <br /> <div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /> <div class="javascript javascript" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"><ol><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #006600; font-style: italic;">//Alow only Enter to date </span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #003366; font-weight: bold;">function</span> isDateNumberKey<span style="color: #009900;">(</span>evt<span style="color: #339933;">,</span>ctrl<span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #006600; font-style: italic;">// Will allow '/' and numbers only.</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> charCode <span style="color: #339933;">=</span> <span style="color: #009900;">(</span>evt.<span style="color: #660066;">which</span><span style="color: #009900;">)</span> <span style="color: #339933;">?</span> evt.<span style="color: #660066;">which</span> <span style="color: #339933;">:</span> event.<span style="color: #660066;">keyCode</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> </div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>charCode <span style="color: #339933;">==</span> <span style="color: #CC0000;">47</span> || charCode <span style="color: #339933;">==</span> <span style="color: #CC0000;">45</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">else</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>charCode <span style="color: #339933;">></span> <span style="color: #CC0000;">31</span> <span style="color: #339933;">&&</span> <span style="color: #009900;">(</span>charCode <span style="color: #339933;"><</span> <span style="color: #CC0000;">48</span> || charCode <span style="color: #339933;">></span> <span style="color: #CC0000;">57</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> window.<span style="color: #660066;">event</span>.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">=</span> 0;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span>;</div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">else</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>ctrl.<span style="color: #660066;">value</span>.<span style="color: #660066;">length</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">2</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #660066;">value</span> <span style="color: #339933;">=</span> ctrl.<span style="color: #660066;">value</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">"/"</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>ctrl.<span style="color: #660066;">value</span>.<span style="color: #660066;">length</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">5</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> idx <span style="color: #339933;">=</span> ctrl.<span style="color: #660066;">value</span>.<span style="color: #660066;">indexOf</span><span style="color: #009900;">(</span><span style="color: #3366CC;">"-"</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>idx <span style="color: #339933;">==</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #660066;">value</span> <span style="color: #339933;">=</span> ctrl.<span style="color: #660066;">value</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">"/"</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">else</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #660066;">value</span> <span style="color: #339933;">=</span> ctrl.<span style="color: #660066;">value</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">"-"</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span>;</div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> </div></li><br /></ol></div><br /> </div> <br /> <br /> <span style="font-size:85%;"><br /> <b>5.Allowing only phone numbers(USA Format)</b><br /> </span> <br /> <div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /> <div class="javascript javascript" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"><ol><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #006600; font-style: italic;">//only phone numbers</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #003366; font-weight: bold;">function</span> isPhoneNumberKey<span style="color: #009900;">(</span>evt<span style="color: #339933;">,</span>ctrl<span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> charCode <span style="color: #339933;">=</span> <span style="color: #009900;">(</span>evt.<span style="color: #660066;">which</span><span style="color: #009900;">)</span> <span style="color: #339933;">?</span> evt.<span style="color: #660066;">which</span> <span style="color: #339933;">:</span> event.<span style="color: #660066;">keyCode</span>;</div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> </div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>charCode <span style="color: #339933;">==</span> <span style="color: #CC0000;">45</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">else</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span> </div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>charCode <span style="color: #339933;">></span> <span style="color: #CC0000;">31</span> <span style="color: #339933;">&&</span> <span style="color: #009900;">(</span>charCode <span style="color: #339933;"><</span> <span style="color: #CC0000;">48</span> || charCode <span style="color: #339933;">></span> <span style="color: #CC0000;">57</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> window.<span style="color: #660066;">event</span>.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">=</span> 0;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">else</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>ctrl.<span style="color: #660066;">value</span>.<span style="color: #660066;">length</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">3</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #660066;">value</span> <span style="color: #339933;">=</span> ctrl.<span style="color: #660066;">value</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">"-"</span>;</div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>ctrl.<span style="color: #660066;">value</span>.<span style="color: #660066;">length</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">7</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #660066;">value</span> <span style="color: #339933;">=</span> ctrl.<span style="color: #660066;">value</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">"-"</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">}</span></div></li><br /></ol></div><br /> </div> <br /> <br /> <br /> <span style="font-size:85%;"><br /> <b>6.Check for valid phone no or not (USA Format)</b><br /> </span> <br /> <div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /> <div class="javascript javascript" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"><ol><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #006600; font-style: italic;">//Allow phone numbers format only(US Format)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #003366; font-weight: bold;">function</span> ValidatePhone<span style="color: #009900;">(</span>ctrl<span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> strvalue <span style="color: #339933;">=</span> ctrl.<span style="color: #660066;">value</span>;</div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>strvalue <span style="color: #339933;">!=</span> <span style="color: #3366CC;">""</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> </div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> objRegExp <span style="color: #339933;">=</span> <span style="color: #009966; font-style: italic;">/^(\d{3})-?\d{3}-?\d{4}$/</span>; </div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> </div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>objRegExp.<span style="color: #660066;">test</span><span style="color: #009900;">(</span>strvalue<span style="color: #009900;">)</span> <span style="color: #339933;">==</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066;">alert</span><span style="color: #009900;">(</span><span style="color: #3366CC;">'Invalid Home Phone number. Please use XXX-XXX-XXXX format.'</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #660066;">value</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">""</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #000066;">focus</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> window.<span style="color: #660066;">event</span>.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">=</span> 0;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>strvalue.<span style="color: #660066;">length</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">10</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066;">alert</span><span style="color: #009900;">(</span><span style="color: #3366CC;">'Invalid Home Phone number. Please use XXX-XXX-XXXX format.'</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #660066;">value</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">""</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #000066;">focus</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> window.<span style="color: #660066;">event</span>.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">=</span> 0;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span>;</div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">else</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">}</span></div></li><br /></ol></div><br /> </div> <br /> <br /> <br /> <span style="font-size:85%;"><br /> <b>7.Allowing only zip code(USA)</b><br /> </span> <br /> <div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /> <div class="javascript javascript" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"><ol><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #006600; font-style: italic;">//only zip code numbers</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #003366; font-weight: bold;">function</span> isZipNumberKey<span style="color: #009900;">(</span>evt<span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> charCode <span style="color: #339933;">=</span> <span style="color: #009900;">(</span>evt.<span style="color: #660066;">which</span><span style="color: #009900;">)</span> <span style="color: #339933;">?</span> evt.<span style="color: #660066;">which</span> <span style="color: #339933;">:</span> event.<span style="color: #660066;">keyCode</span>;</div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>charCode <span style="color: #339933;">==</span> <span style="color: #CC0000;">45</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">else</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span> </div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>charCode <span style="color: #339933;">></span> <span style="color: #CC0000;">31</span> <span style="color: #339933;">&&</span> <span style="color: #009900;">(</span>charCode <span style="color: #339933;"><</span> <span style="color: #CC0000;">48</span> || charCode <span style="color: #339933;">></span> <span style="color: #CC0000;">57</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> window.<span style="color: #660066;">event</span>.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">=</span> 0;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">else</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">}</span></div></li><br /></ol></div><br /> </div> <br /> <br /> <br /> <span style="font-size:85%;"><br /> <b>8.Check for valid zip code or not(USA)</b><br /> </span> <br /> <div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /> <div class="javascript javascript" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"><ol><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #006600; font-style: italic;">//Zip Code</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #003366; font-weight: bold;">function</span> validateUSZip<span style="color: #009900;">(</span>ctrl<span style="color: #009900;">)</span> </div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> strValue <span style="color: #339933;">=</span> ctrl.<span style="color: #660066;">value</span>;</div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> objRegExp <span style="color: #339933;">=</span> <span style="color: #009966; font-style: italic;">/(^\d{5}$)|(^\d{5}-\d{4}$)/</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>objRegExp.<span style="color: #660066;">test</span><span style="color: #009900;">(</span>strValue<span style="color: #009900;">)</span> <span style="color: #339933;">==</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066;">alert</span><span style="color: #009900;">(</span><span style="color: #3366CC;">'Invalid Zipcode.'</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #660066;">value</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">""</span>;</div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #000066;">focus</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> window.<span style="color: #660066;">event</span>.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">=</span> 0;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span>;</div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">}</span></div></li><br /></ol></div><br /> </div> <br /> <br /> <span style="font-size:85%;"><br /> <b>9.Allowing only SSN(USA)</b><br /> </span> <br /> <div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /> <div class="javascript javascript" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"><ol><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #006600; font-style: italic;">//only zip code numbers</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #003366; font-weight: bold;">function</span> isZipNumberKey<span style="color: #009900;">(</span>evt<span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> charCode <span style="color: #339933;">=</span> <span style="color: #009900;">(</span>evt.<span style="color: #660066;">which</span><span style="color: #009900;">)</span> <span style="color: #339933;">?</span> evt.<span style="color: #660066;">which</span> <span style="color: #339933;">:</span> event.<span style="color: #660066;">keyCode</span>;</div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>charCode <span style="color: #339933;">==</span> <span style="color: #CC0000;">45</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">else</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span> </div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>charCode <span style="color: #339933;">></span> <span style="color: #CC0000;">31</span> <span style="color: #339933;">&&</span> <span style="color: #009900;">(</span>charCode <span style="color: #339933;"><</span> <span style="color: #CC0000;">48</span> || charCode <span style="color: #339933;">></span> <span style="color: #CC0000;">57</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> window.<span style="color: #660066;">event</span>.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">=</span> 0;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">else</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> </div></li><br /></ol></div><br /> </div> <br /> <br /> <br /> <span style="font-size:85%;"><br /> <b>10.Check for valid SSN or not(USA)</b><br /> </span> <br /> <div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /> <div class="javascript javascript" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"><ol><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #006600; font-style: italic;">//Allow SSN format only</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #003366; font-weight: bold;">function</span> ValidateSSN<span style="color: #009900;">(</span>ctrl<span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>ctrl.<span style="color: #660066;">value</span>.<span style="color: #660066;">length</span> <span style="color: #339933;">></span> 0<span style="color: #009900;">)</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> strval <span style="color: #339933;">=</span> ctrl.<span style="color: #660066;">value</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>strval.<span style="color: #660066;">length</span> <span style="color: #339933;">!=</span> <span style="color: #CC0000;">11</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066;">alert</span><span style="color: #009900;">(</span><span style="color: #3366CC;">'Invalid SSN! Please use XXX-XX-XXXX format.'</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #660066;">value</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">""</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #000066;">focus</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> window.<span style="color: #660066;">event</span>.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">=</span> 0;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">else</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> data <span style="color: #339933;">=</span> strval.<span style="color: #660066;">replace</span><span style="color: #009900;">(</span><span style="color: #3366CC;">'-'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">''</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> data <span style="color: #339933;">=</span> data.<span style="color: #660066;">replace</span><span style="color: #009900;">(</span><span style="color: #3366CC;">'-'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">''</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>data.<span style="color: #660066;">length</span> <span style="color: #339933;">!=</span> <span style="color: #CC0000;">9</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066;">alert</span><span style="color: #009900;">(</span><span style="color: #3366CC;">'Invalid SSN! Please use XXX-XX-XXXX format.'</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #660066;">value</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">""</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #000066;">focus</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> window.<span style="color: #660066;">event</span>.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">=</span> 0;</div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>data.<span style="color: #660066;">indexOf</span><span style="color: #009900;">(</span><span style="color: #3366CC;">"-"</span><span style="color: #009900;">)</span> <span style="color: #339933;">!=</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066;">alert</span><span style="color: #009900;">(</span><span style="color: #3366CC;">'Invalid SSN! Please use XXX-XX-XXXX format.'</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #660066;">value</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">""</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #000066;">focus</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> window.<span style="color: #660066;">event</span>.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">=</span> 0;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">else</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> part1 <span style="color: #339933;">=</span> strval.<span style="color: #660066;">charAt</span><span style="color: #009900;">(</span><span style="color: #CC0000;">3</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> part2 <span style="color: #339933;">=</span> strval.<span style="color: #660066;">charAt</span><span style="color: #009900;">(</span><span style="color: #CC0000;">6</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>part1 <span style="color: #339933;">!=</span> <span style="color: #3366CC;">'-'</span><span style="color: #009900;">)</span> </div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066;">alert</span><span style="color: #009900;">(</span><span style="color: #3366CC;">'Invalid SSN! Please use XXX-XX-XXXX format.'</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #660066;">value</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">""</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #000066;">focus</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> window.<span style="color: #660066;">event</span>.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">=</span> 0;</div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>part2 <span style="color: #339933;">!=</span> <span style="color: #3366CC;">'-'</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066;">alert</span><span style="color: #009900;">(</span><span style="color: #3366CC;">'Invalid SSN! Please use XXX-XX-XXXX format.'</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #660066;">value</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">""</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #000066;">focus</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> window.<span style="color: #660066;">event</span>.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">=</span> 0;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">}</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> </div></li><br /></ol></div><br /> </div> <br /> <br /> <br /> <span style="font-size:85%;"><br /> <b>11.Allowing only Numbers</b><br /> </span> <br /> <div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /> <div class="javascript javascript" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"><ol><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #006600; font-style: italic;">//Number only</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #003366; font-weight: bold;">function</span> isOnlyNumberKey<span style="color: #009900;">(</span>evt<span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> charCode <span style="color: #339933;">=</span> <span style="color: #009900;">(</span>evt.<span style="color: #660066;">which</span><span style="color: #009900;">)</span> <span style="color: #339933;">?</span> evt.<span style="color: #660066;">which</span> <span style="color: #339933;">:</span> event.<span style="color: #660066;">keyCode</span>;</div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>charCode <span style="color: #339933;">></span> <span style="color: #CC0000;">31</span> <span style="color: #339933;">&&</span> <span style="color: #009900;">(</span>charCode <span style="color: #339933;"><</span> <span style="color: #CC0000;">48</span> || charCode <span style="color: #339933;">></span> <span style="color: #CC0000;">57</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> window.<span style="color: #660066;">event</span>.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">=</span> 0;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">else</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">}</span></div></li><br /></ol></div><br /> </div> <br /> <br /> <br /> <span style="font-size:85%;"><br /> <b>12.Allowing only Alphabets</b><br /> </span> <br /> <div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /> <div class="javascript javascript" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"><ol><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #006600; font-style: italic;">//Alphabets only</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #003366; font-weight: bold;">function</span> isOnlyAlphaKey<span style="color: #009900;">(</span>evt<span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> charCode <span style="color: #339933;">=</span> <span style="color: #009900;">(</span>evt.<span style="color: #660066;">which</span><span style="color: #009900;">)</span> <span style="color: #339933;">?</span> evt.<span style="color: #660066;">which</span> <span style="color: #339933;">:</span> event.<span style="color: #660066;">keyCode</span>;</div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span><span style="color: #009900;">(</span><span style="color: #009900;">(</span>charCode <span style="color: #339933;">>=</span> <span style="color: #CC0000;">65</span><span style="color: #009900;">)</span> <span style="color: #339933;">&&</span> <span style="color: #009900;">(</span>charCode <span style="color: #339933;"><=</span> <span style="color: #CC0000;">90</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span> || <span style="color: #009900;">(</span><span style="color: #009900;">(</span>charCode <span style="color: #339933;">>=</span> <span style="color: #CC0000;">97</span><span style="color: #009900;">)</span> <span style="color: #339933;">&&</span> <span style="color: #009900;">(</span>charCode <span style="color: #339933;"><=</span> <span style="color: #CC0000;">122</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span> || <span style="color: #009900;">(</span>charCode <span style="color: #339933;">==</span> <span style="color: #CC0000;">32</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">else</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> window.<span style="color: #660066;">event</span>.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">=</span> 0;</div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">}</span></div></li><br /></ol></div><br /> </div> <br /> <br /> <br /> <span style="font-size:85%;"><br /> <b>13.Allowing only Alpha Numeric characters</b><br /> </span> <br /> <div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /> <div class="javascript javascript" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"><ol><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #006600; font-style: italic;">//Alphanumerals only</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #003366; font-weight: bold;">function</span> isAlphaNumericKey<span style="color: #009900;">(</span>evt<span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> charCode <span style="color: #339933;">=</span> <span style="color: #009900;">(</span>evt.<span style="color: #660066;">which</span><span style="color: #009900;">)</span> <span style="color: #339933;">?</span> evt.<span style="color: #660066;">which</span> <span style="color: #339933;">:</span> event.<span style="color: #660066;">keyCode</span>;</div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span><span style="color: #009900;">(</span><span style="color: #009900;">(</span>charCode <span style="color: #339933;">>=</span> <span style="color: #CC0000;">48</span><span style="color: #009900;">)</span> <span style="color: #339933;">&&</span> <span style="color: #009900;">(</span>charCode <span style="color: #339933;"><=</span> <span style="color: #CC0000;">57</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span> || <span style="color: #009900;">(</span><span style="color: #009900;">(</span><span style="color: #009900;">(</span>charCode <span style="color: #339933;">>=</span> <span style="color: #CC0000;">65</span><span style="color: #009900;">)</span> <span style="color: #339933;">&&</span> <span style="color: #009900;">(</span>charCode <span style="color: #339933;"><=</span> <span style="color: #CC0000;">90</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span> || <span style="color: #009900;">(</span><span style="color: #009900;">(</span>charCode <span style="color: #339933;">>=</span> <span style="color: #CC0000;">97</span><span style="color: #009900;">)</span> <span style="color: #339933;">&&</span> <span style="color: #009900;">(</span>charCode <span style="color: #339933;"><=</span> <span style="color: #CC0000;">122</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">else</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> window.<span style="color: #660066;">event</span>.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">=</span> 0;</div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /></ol></div><br /> </div> <br /> <br /> <br /> <span style="font-size:85%;"><br /> <b>14.Allowing only special characters</b><br /> </span> <br /> <div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /> <div class="javascript javascript" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"><ol><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #006600; font-style: italic;">//Only Special Characters</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #003366; font-weight: bold;">function</span> isSpecialCharsKey<span style="color: #009900;">(</span>evt<span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> charCode <span style="color: #339933;">=</span> <span style="color: #009900;">(</span>evt.<span style="color: #660066;">which</span><span style="color: #009900;">)</span> <span style="color: #339933;">?</span> evt.<span style="color: #660066;">which</span> <span style="color: #339933;">:</span> event.<span style="color: #660066;">keyCode</span>;</div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span><span style="color: #009900;">(</span><span style="color: #009900;">(</span>charCode <span style="color: #339933;">>=</span> <span style="color: #CC0000;">48</span><span style="color: #009900;">)</span> <span style="color: #339933;">&&</span> <span style="color: #009900;">(</span>charCode <span style="color: #339933;"><=</span> <span style="color: #CC0000;">57</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span> || <span style="color: #009900;">(</span><span style="color: #009900;">(</span><span style="color: #009900;">(</span>charCode <span style="color: #339933;">>=</span> <span style="color: #CC0000;">65</span><span style="color: #009900;">)</span> <span style="color: #339933;">&&</span> <span style="color: #009900;">(</span>charCode <span style="color: #339933;"><=</span> <span style="color: #CC0000;">90</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span> || <span style="color: #009900;">(</span><span style="color: #009900;">(</span>charCode <span style="color: #339933;">>=</span> <span style="color: #CC0000;">97</span><span style="color: #009900;">)</span> <span style="color: #339933;">&&</span> <span style="color: #009900;">(</span>charCode <span style="color: #339933;"><=</span> <span style="color: #CC0000;">122</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> window.<span style="color: #660066;">event</span>.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">=</span> 0;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">else</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /></ol></div><br /> </div> <br /> <br /> <br /> <span style="font-size:85%;"><br /> <b>15.Allowing Only Decimal values</b><br /> </span> <br /> <div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /> <div class="javascript javascript" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"><ol><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #006600; font-style: italic;">//Only Decimal values</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #006600; font-style: italic;">//onkeypress="return isKeyDecimal(this,event);"</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #003366; font-weight: bold;">function</span> isKeyDecimal<span style="color: #009900;">(</span>ctrl<span style="color: #339933;">,</span>evt<span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">{</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> charCode <span style="color: #339933;">=</span> <span style="color: #009900;">(</span>evt.<span style="color: #660066;">which</span><span style="color: #009900;">)</span> <span style="color: #339933;">?</span> evt.<span style="color: #660066;">which</span> <span style="color: #339933;">:</span> event.<span style="color: #660066;">keyCode</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>charCode <span style="color: #339933;">!=</span> <span style="color: #CC0000;">46</span> <span style="color: #339933;">&&</span> <span style="color: #009900;">(</span>charCode <span style="color: #339933;"><</span> <span style="color: #CC0000;">48</span> || charCode <span style="color: #339933;">></span> <span style="color: #CC0000;">57</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> window.<span style="color: #660066;">event</span>.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">=</span> 0;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span>;</div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">else</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>charCode <span style="color: #339933;">==</span> <span style="color: #CC0000;">46</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> abc <span style="color: #339933;">=</span> ctrl.<span style="color: #660066;">value</span>.<span style="color: #660066;">split</span><span style="color: #009900;">(</span><span style="color: #3366CC;">"."</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>abc.<span style="color: #660066;">length</span> <span style="color: #339933;">></span> <span style="color: #CC0000;">1</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> window.<span style="color: #660066;">event</span>.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">=</span> 0;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span>;</div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">else</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">else</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">}</span></div></li><br /></ol></div><br /> </div> <br /> <br /> <br /> <span style="font-size:85%;"><br /> <b>16.Allowing Only Capital letters</b><br /> </span> <br /> <div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /> <div class="javascript javascript" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"><ol><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #006600; font-style: italic;">//ALLOW ONLY CAPITAL LETTERS</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #003366; font-weight: bold;">function</span> onlyUpperCase<span style="color: #009900;">(</span>ctrl<span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #660066;">value</span> <span style="color: #339933;">=</span> <span style="color: #009900;">(</span>ctrl.<span style="color: #660066;">value</span>.<span style="color: #660066;">toUpperCase</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">}</span></div></li><br /></ol></div><br /> </div> <br /> <br /> <br /> <span style="font-size:85%;"><br /> <b>17.Allowing Only small letters</b><br /> </span> <br /> <div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /> <div class="javascript javascript" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"><ol><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #006600; font-style: italic;">//ALLOW ONLY SMALL LETTERS</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #003366; font-weight: bold;">function</span> onlyLowerCase<span style="color: #009900;">(</span>ctrl<span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> ctrl.<span style="color: #660066;">value</span> <span style="color: #339933;">=</span> <span style="color: #009900;">(</span>ctrl.<span style="color: #660066;">value</span>.<span style="color: #660066;">toLowerCase</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> </div></li><br /></ol></div><br /> </div> <br /> <br /> <br /> <br /> <span style="font-size:85%;"><br /> <b>18.Trims trailing whitespace chars</b><br /> </span> <br /> <div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /> <div class="javascript javascript" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"><ol><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #006600; font-style: italic;">//Trims trailing whitespace chars.</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #006600; font-style: italic;">//strValue - String to be trimmed.</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #006600; font-style: italic;">//returns - Source string with right whitespaces removed.</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #003366; font-weight: bold;">function</span> rightTrim<span style="color: #009900;">(</span> strValue <span style="color: #009900;">)</span> </div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> objRegExp <span style="color: #339933;">=</span> <span style="color: #009966; font-style: italic;">/^([\w\W]*)(\b\s*)$/</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> </div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">(</span>objRegExp.<span style="color: #660066;">test</span><span style="color: #009900;">(</span>strValue<span style="color: #009900;">)</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #006600; font-style: italic;">//remove trailing a whitespace characters</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> strValue <span style="color: #339933;">=</span> strValue.<span style="color: #660066;">replace</span><span style="color: #009900;">(</span>objRegExp<span style="color: #339933;">,</span> <span style="color: #3366CC;">'$1'</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> strValue;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> </div></li><br /></ol></div><br /> </div> <br /> <br /> <br /> <span style="font-size:85%;"><br /> <b>19.Trims leading whitespace chars</b><br /> </span> <br /> <div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /> <div class="javascript javascript" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"><ol><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #006600; font-style: italic;">//Trims leading whitespace chars.</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #006600; font-style: italic;">//strValue - String to be trimmed.</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #006600; font-style: italic;">//returns - Source string with left whitespaces removed.</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #003366; font-weight: bold;">function</span> leftTrim<span style="color: #009900;">(</span> strValue <span style="color: #009900;">)</span> </div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> objRegExp <span style="color: #339933;">=</span> <span style="color: #009966; font-style: italic;">/^(\s*)(\b[\w\W]*)$/</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> </div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">(</span>objRegExp.<span style="color: #660066;">test</span><span style="color: #009900;">(</span>strValue<span style="color: #009900;">)</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #006600; font-style: italic;">//remove leading a whitespace characters</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> strValue <span style="color: #339933;">=</span> strValue.<span style="color: #660066;">replace</span><span style="color: #009900;">(</span>objRegExp<span style="color: #339933;">,</span> <span style="color: #3366CC;">'$2'</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> strValue;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">}</span></div></li><br /></ol></div><br /> </div> <br /> <br /> <br /> <span style="font-size:85%;"><br /> <b>20.Removes leading and trailing spaces</b><br /> </span> <br /> <div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /> <div class="javascript javascript" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"><ol><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #006600; font-style: italic;">//Removes leading and trailing spaces.</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #006600; font-style: italic;">//strValue - Source string to be trimmed.</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #006600; font-style: italic;">//returns - Source string with whitespaces removed.</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #003366; font-weight: bold;">function</span> trimAll<span style="color: #009900;">(</span> strValue <span style="color: #009900;">)</span> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> </div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> objRegExp <span style="color: #339933;">=</span> <span style="color: #009966; font-style: italic;">/^(\s*)$/</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> </div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #006600; font-style: italic;">//check for all spaces</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">(</span>objRegExp.<span style="color: #660066;">test</span><span style="color: #009900;">(</span>strValue<span style="color: #009900;">)</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> strValue <span style="color: #339933;">=</span> strValue.<span style="color: #660066;">replace</span><span style="color: #009900;">(</span>objRegExp<span style="color: #339933;">,</span> <span style="color: #3366CC;">''</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">(</span> strValue.<span style="color: #660066;">length</span> <span style="color: #339933;">==</span> 0<span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> strValue;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> </div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #006600; font-style: italic;">//check for leading &amp; trailing spaces</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> objRegExp <span style="color: #339933;">=</span> <span style="color: #009966; font-style: italic;">/^(\s*)([\W\w]*)(\b\s*$)/</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">(</span>objRegExp.<span style="color: #660066;">test</span><span style="color: #009900;">(</span>strValue<span style="color: #009900;">)</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #006600; font-style: italic;">//remove leading and trailing whitespace characters</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> strValue <span style="color: #339933;">=</span> strValue.<span style="color: #660066;">replace</span><span style="color: #009900;">(</span>objRegExp<span style="color: #339933;">,</span> <span style="color: #3366CC;">'$2'</span><span style="color: #009900;">)</span>;</div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> strValue;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> </div></li><br /></ol></div><br /> </div> <br /> <br /> <br /> <span style="font-size:85%;"><br /> <b>21.Prevents event firing on enter key press</b><br /> </span> <br /> <div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /> <div class="javascript javascript" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"><ol><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #006600; font-style: italic;">//Prevents event firing on enter key press</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #003366; font-weight: bold;">function</span> AvoidEnterKeyEvent<span style="color: #009900;">(</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">(</span>window.<span style="color: #660066;">event</span>.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">13</span><span style="color: #009900;">)</span> </div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> event.<span style="color: #660066;">returnValue</span><span style="color: #339933;">=</span><span style="color: #003366; font-weight: bold;">false</span>; </div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> event.<span style="color: #660066;">cancel</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">}</span></div></li><br /></ol></div><br /> </div> <br /> <br /> <br /> <span style="font-size:85%;"><br /> <b>22.Disabling BackSpace and delete button</b><br /> </span> <br /> <div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /> <div class="javascript javascript" style="font-family:monospace;color: #006; border: 1px solid #d0d0d0; background-color: #f0f0f0;"><ol><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #003366; font-weight: bold;">function</span> funkey<span style="color: #009900;">(</span>evt<span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #003366; font-weight: bold;">var</span> charCode <span style="color: #339933;">=</span> <span style="color: #009900;">(</span>evt.<span style="color: #660066;">which</span><span style="color: #009900;">)</span> <span style="color: #339933;">?</span> evt.<span style="color: #660066;">which</span> <span style="color: #339933;">:</span> event.<span style="color: #660066;">keyCode</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> </div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">(</span><span style="color: #009900;">(</span>charCode <span style="color: #339933;">==</span> <span style="color: #CC0000;">8</span><span style="color: #009900;">)</span> || <span style="color: #009900;">(</span>charCode <span style="color: #339933;">==</span> <span style="color: #CC0000;">46</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">{</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #009900;">}</span></div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">else</span></div></li><br /><li style="font-weight: bold;font-weight: bold; color: #006060;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span>;</div></li><br /><li style="font-weight: normal;font: normal normal 100% 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: monospace; font-weight: normal; font-style: normal; margin:0; padding:0; background:inherit;;white-space: nowrapcolor: #000020;"><span style="color: #009900;">}</span></div></li><br /></ol></div><br /> </div>Ramkyhttp://www.blogger.com/profile/05722860132583858043noreply@blogger.com3tag:blogger.com,1999:blog-4955511806150724268.post-92149037103320783502008-10-02T23:41:00.000-07:002008-10-02T23:54:34.886-07:00New Features of VS2008Here are the main features of VS 2008 compare to previous versions like vs2005 and vs2003.<br />The Main Features are..<br /><ul><li>Dramatically improved HTML designer.</li><li>Rich CSS support</li><li>Spilt View Editing</li><li>CSS Style Manager</li><li>CSS Properties window</li><li>CSS source view intelligence </li><li>Nested Master page support</li><li>LINQ Support</li><li>Expression Belnd Support</li><li>Windows Presentation Foundation</li><li>VS 2008 Multi-Targeting Support</li><li>AJAX support for ASP.NET</li><li>JavaScript Debugging Support</li><li>LINQ Intellisense and Javascript Intellisense support for silverlight applications</li><li>Organize Imports or Usings</li><li>Intellisense Filtering</li><li>In built Silverlight Library</li><li>Inbuilt C++ SDK</li></ul><p>The details explanation about these features in details with examples you can find in the below links. And here I am providing some useful links so that you can know much details about VS2008.</p><p> Hope it will useful for you..! </p><p><strong><u><span style="color:#3366ff;">Resources:</span></u></strong></p><ul><li><u><span style="color:#3366ff;"><a href="http://msdotnetsupport.blogspot.com/2007/11/22-new-features-of-visual-studio-2008.html">http://msdotnetsupport.blogspot.com/2007/11/22-new-features-of-visual-studio-2008.html</a></span></u></li><li><a href="http://searchwindevelopment.techtarget.com/generic/0,295582,sid8_gci1280711,00.html">http://searchwindevelopment.techtarget.com/generic/0,295582,sid8_gci1280711,00.html</a></li><li><a href="http://weblogs.asp.net/scottgu/archive/2007/02/08/my-first-look-at-orcas-presentation.aspx">http://weblogs.asp.net/scottgu/archive/2007/02/08/my-first-look-at-orcas-presentation.aspx</a></li><li><a href="http://weblogs.asp.net/scottgu/archive/2007/07/25/vs-2008-web-designer-and-css-support.aspx">http://weblogs.asp.net/scottgu/archive/2007/07/25/vs-2008-web-designer-and-css-support.aspx</a></li><li><a href="http://morewally.com/cs/blogs/wallym/archive/tags/My+life+with+Visual+Studio+2008/default.aspx">http://morewally.com/cs/blogs/wallym/archive/tags/My+life+with+Visual+Studio+2008/default.aspx</a></li></ul><p> </p>Ramkyhttp://www.blogger.com/profile/05722860132583858043noreply@blogger.com0tag:blogger.com,1999:blog-4955511806150724268.post-16718997589078480972008-09-30T00:57:00.000-07:002008-09-30T01:16:43.179-07:00Visual Studio 2010 & .Net Framework 4.0I found an Article about Visual Studio Team System (VSTS) 2010. I was amazing to see the Microsoft Announcement. Because till now most of the developers (me also) dint use the Visual Studio 2008. And don’t know much about Framework 3.5. But being a programmer we have to update our knowledge with current technology. So I decided to start VS2008 as soon as possible....!<br /><br />So..Here I am mentioning some details about VS2010. Microsoft Announce that this Framework as .Net Framework 4.0 and it code name is “Rosario”. The main features are collaborative development, modeling, and debugging.<br /><br /><br /><p align="center"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiodi4Qj_k-NUuszOTejr4Q3pEEoNOEzfBZejU7AacWWW3ObSJWFdHJkU1GlfWElpy7WZBR6PH8Khm2dZoZVirP7-QAHrvxrrrKntYoyaAlVgM-V4iEmST3pBVbdxffcf0dm6QILZ_AOPXC/s1600-h/msdnshot2_full.jpg"><img id="BLOGGER_PHOTO_ID_5251721836065813474" style="CURSOR: hand" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiodi4Qj_k-NUuszOTejr4Q3pEEoNOEzfBZejU7AacWWW3ObSJWFdHJkU1GlfWElpy7WZBR6PH8Khm2dZoZVirP7-QAHrvxrrrKntYoyaAlVgM-V4iEmST3pBVbdxffcf0dm6QILZ_AOPXC/s400/msdnshot2_full.jpg" border="0" /></a></p><br /><br /><br /><br /><p align="center"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPmBfdiuHcKu_b4BhgIjbbFJe58JYHIBURByVtneKBdwU2BYAinOTRnAfeBgmRk6ecBQHHI0rqdsrth1LcbX1xGYRP2QVlwnQfZOSzDRB5KnTNn9vTZOr9dXX_mdEy585nD1OAd3-iCLOp/s1600-h/msdnshot_full.jpg"><img id="BLOGGER_PHOTO_ID_5251722008543405794" style="CURSOR: hand" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPmBfdiuHcKu_b4BhgIjbbFJe58JYHIBURByVtneKBdwU2BYAinOTRnAfeBgmRk6ecBQHHI0rqdsrth1LcbX1xGYRP2QVlwnQfZOSzDRB5KnTNn9vTZOr9dXX_mdEy585nD1OAd3-iCLOp/s400/msdnshot_full.jpg" border="0" /></a></p><br /><br /><br /><br />In This Framework Major pillars are..<br /><ul><li>Democratizing Application Lifecycle Management(ALM)</li><li>Enabling emerging trends</li><li>Inspiring developer delight</li><li>Riding the next generation platform wave</li><li>Breakthrough Departmental Applications.</li></ul><p>If you like to know more details here are the links....</p><br /><a href="http://msdn.microsoft.com/en-us/vstudio/products/cc948977.aspx">http://msdn.microsoft.com/en-us/vstudio/products/cc948977.aspx</a><br /><br /><a href="http://www.microsoft.com/presspass/press/2008/sep08/09-29VS10PR.mspx">http://www.microsoft.com/presspass/press/2008/sep08/09-29VS10PR.mspx</a><br /><br /><a href="http://www.codeproject.com/KB/cs/concept_ide.aspx">http://www.codeproject.com/KB/cs/concept_ide.aspx</a><br /><br /><a href="http://www.informationweek.com/news/windows/operatingsystems/showArticle.jhtml?articleID=210604432">http://www.informationweek.com/news/windows/operatingsystems/showArticle.jhtml?articleID=210604432</a>Ramkyhttp://www.blogger.com/profile/05722860132583858043noreply@blogger.com0tag:blogger.com,1999:blog-4955511806150724268.post-66839507663139098412008-09-26T01:37:00.000-07:002008-09-27T01:15:59.371-07:00Playing Videos - Part II<span style="font-size:85%;"></span><br /><span style="font-size:85%;">In Playing Videos-I I have been explained to upload a videos, how convert video from one format to another format and how to generate thumbnail automatically. In this post I am going to expalin how to retrive the videos and thumbnail dynamically from database. </span><br /><span style="font-size:85%;"></span><span style="font-size:85%;"><br />First I am starting with DataBase part, Here I am creating a table called videos. And it contains 3 fields the are<br />Video_ID,Video_File,Video_Image. You can see the table design pic.<br /><br /><br /><p align="center"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwAmvuQweaVW5X3PTX8OqBExerVnA-zKC8NubtBF3ih-259A-27FH9imk8imNWsZXucS4bidw01I_oNXj4HS3PHd8HEjibjD3ddUIe-WqJ8lkbO4cXcVeAuHJn9d5LdtfIms39zUepYeXk/s1600-h/v3.GIF"><img id="BLOGGER_PHOTO_ID_5250247809033498850" style="CURSOR: hand" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwAmvuQweaVW5X3PTX8OqBExerVnA-zKC8NubtBF3ih-259A-27FH9imk8imNWsZXucS4bidw01I_oNXj4HS3PHd8HEjibjD3ddUIe-WqJ8lkbO4cXcVeAuHJn9d5LdtfIms39zUepYeXk/s400/v3.GIF" border="0" /></a></p><br /><br /></span><span style="font-size:85%;">Here "Video_File" field contains Name of the video with extension. Here I am going to store the file name only. But the video file is located in server. "Video_Image" is the thumbnail file name with extension. Same as video thumbnail also located in server. </span><br /><br /><span style="font-size:85%;">When I am uploading video, I am going to save the videofilename, Image name in database. Here I used very simple code to insert this details. Here is the code..... </span><br /><br /><br /><div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br />private void Savedetails()<br />{<br />string filename, imgname;<br />filename = Session["outputfile"].ToString();<br />imgname = Session["thumbname"].ToString();<br />SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["TestConnectionString"].ConnectionString);<br />con.Open();<br />SqlCommand cmd = new SqlCommand("insert into video(Video_File,Video_Image) values('" + filename + "','" + imgname + "')", con);<br />cmd.ExecuteNonQuery();<br />cmd.Dispose();<br />con.Close();<br />}<br /></div><br /><span style="font-size:85%;">You can use stored procedures in back end for the better performance. Once the video uploading is finished then I am going to show these details in DataList. Here is the code to bind the video thumbnail in Datalist<br /></span><br /><span style="font-size:85%;"><br /></span><span style="font-size:85%;"></span><div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /><asp:DataList ID="dtlstVideo" runat="server" GridLines="Vertical"<br />RepeatColumns="2" RepeatDirection="Horizontal" BackColor="White"<br />BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="5"><br /><ItemTemplate><br /><td><a href="Play.aspx?vid=<%# DataBinder.Eval(Container.DataItem, "Video_ID") %>"><br /><img src="Video/Thumb/<%# DataBinder.Eval(Container.DataItem, "Video_Image") %>" border="0" /><br /></a><br /></td><br /></ItemTemplate><br /><FooterStyle BackColor="#CCCCCC" ForeColor="Black" /><br /><AlternatingItemStyle BackColor="#DCDCDC" /><br /><ItemStyle BackColor="#EEEEEE" ForeColor="Black" /><br /><SelectedItemStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" /><br /><HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" /><br /></asp:DataList><br /></div><br /><br /><br /><p align="center"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-tFvCkvpTYgQ1Zae5YX2x1DHXfdbWBvW_Yz1oXw-hiPFg6tuCQWCG55_cZ5LW_RdzMuzT3AuwzUDSdkq5ZCcOBGQzgJlCvU5fuIGPS2PnPlOp9pfw69htcoDTqOIHBuEMSQMT47AuvxsU/s1600-h/v1.GIF"><img id="BLOGGER_PHOTO_ID_5250248185655162738" style="CURSOR: hand" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-tFvCkvpTYgQ1Zae5YX2x1DHXfdbWBvW_Yz1oXw-hiPFg6tuCQWCG55_cZ5LW_RdzMuzT3AuwzUDSdkq5ZCcOBGQzgJlCvU5fuIGPS2PnPlOp9pfw69htcoDTqOIHBuEMSQMT47AuvxsU/s400/v1.GIF" border="0" /></a></p><span style="font-size:85%;">when the user click on the datalist it will be redirected to play.aspx with video ID as the query string. In the<br />play.aspx page I am goign to bind the SWF player with video file name. Here is the code...<br /></span><br /><div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br />string vid,vfname;<br />protected void Page_Load(object sender, EventArgs e)<br />{<br />vid = Request.QueryString["vid"].ToString();<br />DataSet dst = (DataSet)Session["videods"];<br />DataRow[] dw = dst.Tables[0].Select("Video_ID= '"+ vid +"'");<br />if (dw.Length > 0)<br />{<br />vfname = dw[0]["Video_File"].ToString();<br />}<br />string plyr = "<embed src='Players/flvplayer.swf' width='425' height='355'<br />bgcolor='#FFFFFF' type='application/x-shockwave-flash'<br />pluginspage='http://www.macromedia.com/go/getflashplayer'<br />flashvars='file=Video/SWF/" + vfname + "&autostart=false&frontcolor=0xCCCCCC&<br />backcolor=0x000000&lightcolor=0x996600&showdownload=false&showeq=false&repeat=false&<br />volume=100&useaudio=false&usecaptions=false&usefullscreen=true&usekeys=true'><br /></embed>";<br />plh.Controls.Add(new LiteralControl(plyr));<br />}<br /></div><br /><span style="font-size:85%;">You can see the screen shot of playing a video dynamically..<br /><br /><br /></span><span style="font-size:85%;"><p align="center"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO6av66F0k-AURey5umslJ2Fw11KJhdRfc9gI0qxK51OtvpPjCnT3OxJMQumFfeIeOZwXMBvqW5r8ndCsC2KrCaeKBaOJVo8IoP_sad32MCeDgobR-JO-fiPDStHRnc6MM0xOWOhmOtfK2/s1600-h/v2.GIF"><img id="BLOGGER_PHOTO_ID_5250248930619671842" style="CURSOR: hand" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO6av66F0k-AURey5umslJ2Fw11KJhdRfc9gI0qxK51OtvpPjCnT3OxJMQumFfeIeOZwXMBvqW5r8ndCsC2KrCaeKBaOJVo8IoP_sad32MCeDgobR-JO-fiPDStHRnc6MM0xOWOhmOtfK2/s400/v2.GIF" border="0" /></a></p><br /></span><span style="font-size:85%;"><a href="http://www.4shared.com/file/64534253/1c2fa244/VideoThumb-II.html" target="_blank">Source Code</a><br /><br /></span></span><br /><br /><!-- AddThis Button for Post BEGIN --><br /><div><script type="text/javascript">addthis_url='<data:post.url/>'; addthis_title='<data:post.title/>'; addthis_pub='ramcrishna';</script><br /><script src="http://s7.addthis.com/js/addthis_widget.php?v=12" type="text/javascript"></script></div><br /><!-- AddThis Button for Post END -->Ramkyhttp://www.blogger.com/profile/05722860132583858043noreply@blogger.com22tag:blogger.com,1999:blog-4955511806150724268.post-58941448925868938542008-09-22T22:11:00.000-07:002008-09-23T05:06:02.700-07:00Playing Videos like YouTube and Thumbnail Creation in ASP.Net - I<span style="font-size:85%;">If you want to play video like youtube in your ASP.Net application what will you do? Can you able to generate thumbnail for the video programmatically? How did you play converted video?? All these are for Free of cost. No need to buy any software then how??. </span><br /><span style="font-size:85%;"></span><br /><span style="font-size:85%;">This article will provide solutions for the above questions. Generally we can see some video sites like youtube. Here we can watch streaming media. But when you upload a wmv file into server and try to play it. What happen? If the video is long it will take time to play. For this reason we have to convert the video to a streaming media(like swf) so that when the page is opened automatically video playing started. </span><br /><br /><span style="font-size:85%;">For this we have to convert the video which is uploaded by the user to swf. Then only we can able to play the video quickly. In order to convert the video we will use a software called FFMPEG. It’s open source software you can download this software from here.</span><br /><br /><span style="font-size:85%;">Using FFMPEG we can able to generate thumbnails for the video what ever we are uploading. By using FFMPEG’s API we can perform various operations for the videos and audios.</span><br /><span style="font-size:85%;">In order to start this Application first we have to import following name spaces…<br /></span><br /><br /><div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap">using System.IO;<br />using System.Diagnostics;<br /></div><p><span style="font-size:85%;">When User Clicks on Upload button then we have to perform following tasks.</span> </p><ul><li><span style="font-size:85%;">Check the Format of Video</span></li><li><span style="font-size:85%;">Convert the Video to flv format with FFMPEG</span></li><li><span style="font-size:85%;">Generate a Thumbnail for the uploaded video</span></li><li><span style="font-size:85%;">Delete the original video.</span><span style="font-size:85%;"></li></ul></span><li><b>Check the Format of Video</b><br /><br />Here I am using Regular Expression to check the video format. I want to upload only wmv, mpeg, or avi format videos. Here is the regular expression<br /><br /><div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /><asp:RegularExpressionValidator id="req1" runat="server"<br /><br />ErrorMessage="Only wmv, avi or mpeg files are allowed!"<br /><br />ValidationExpression="^(([a-zA-Z]:)(\\{2}\w+)\$?)(\\(\w[\w].*))+(.wmv.avi.mpeg.MPEG)$"<br /><br />ControlToValidate="FileUpload1" Display="dynamic"></asp:RegularExpressionValidator><br /><br /></div><br /></li><span style="font-size:85%;"><br /></span></span><span style="font-size:85%;"><li><b>Convert the Video to flv format with FFMPEG</b><br />To Convert our video to SWF format FFMPEG need File Name, File Arguments. File Name is the name of the FFMPEG folder with full path. Arguments can be write as.. </li><p>The general syntax is ..<br />ffmpeg [[infile options][@option{-i} infile]]... {[outfile options] outfile}...<br /><br /></p><p style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br />filargs = "-i " + inputfile + " -ar 22050 " + outputfile;<br />To run the FFMPEG exe we have to start a Process. This can be write as..<br />Process proc;<br />proc = new Process();<br />proc.StartInfo.FileName = spath + "\\ffmpeg\\ffmpeg.exe";<br />proc.StartInfo.Arguments = filargs;<br />proc.StartInfo.UseShellExecute = false;<br />proc.StartInfo.CreateNoWindow = false;<br />proc.StartInfo.RedirectStandardOutput = false;<br />try<br />{<br />proc.Start();<br />}<br />catch (Exception ex)<br />{<br />Response.Write(ex.Message);<br />}<br />proc.WaitForExit();<br />proc.Close();<br /><br /></p><p><br /></p></span><span style="font-size:85%;"><ul><li><b>Generate a Thumbnail for the uploaded video</b><br /><br />For the thumbnail we have to provide path to where we have to save our thumbnail. Here is code for thumbnails..<br /></li></ul><li><div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br />//Create Thumbs<br />string thumbpath, thumbname;<br />string thumbargs;<br />string thumbre;<br />thumbpath = AppDomain.CurrentDomain.BaseDirectory + "Video\\Thumb\\";<br />thumbname = thumbpath + withoutext + "%d" + ".jpg";<br />thumbargs = "-i " + inputfile + " -vframes 1 -ss 00:00:07 -s 150x150 " + thumbname;<br />Process thumbproc = new Process();<br />thumbproc = new Process();<br />thumbproc.StartInfo.FileName = spath + "\\ffmpeg\\ffmpeg.exe";<br />thumbproc.StartInfo.Arguments = thumbargs;<br />thumbproc.StartInfo.UseShellExecute = false;<br />thumbproc.StartInfo.CreateNoWindow = false;<br />thumbproc.StartInfo.RedirectStandardOutput = false;<br />try<br />{<br />thumbproc.Start();<br />}<br />catch (Exception ex)<br />{<br />Response.Write(ex.Message);<br />}<br />thumbproc.WaitForExit();<br />thumbproc.Close();<br /><br /></div><br /></span></li><li><span style="font-size:85%;"></li></span><span style="font-size:85%;"><li><b>Delete the original video.</b><br />Once the conversion process is completed we delete wmv file. Here is the code.<br /><div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap">File.Delete(inputfile);<br /></div><br /></span></li><span style="font-size:85%;">Here the most important thing is “Permissions”. In order to convert the video and generate the thumbnails we have to provide all permissions to our application. Especially for the folder where your going to save the videos and thumbnails. </span><span style="font-size:85%;"><p></span></p><span style="font-size:85%;">If you’re using FFMPEG in Remote server then you have to give all permissions to FFMPEG folder also. Because here we are running an exe to convert the videos.<br /></span><br /><p><span style="font-size:85%;">When ever you upload videos more then 4096 KB, ASP.Net does not allow you to upload the video because It’s the Max HTTP Request size for any application. If you want change the HTTP request size you have to change the “maxRequestLength” in web.config section. Here is the complete code..<br /></p></span><div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /><system.web><br /><httpRuntime<br />executionTimeout="110"<br />maxRequestLength="30000"<br />requestLengthDiskThreshold="80"<br />useFullyQualifiedRedirectUrl="false"<br />minFreeThreads="8"<br />minLocalRequestFreeThreads="4"<br />appRequestQueueLimit="5000"<br />enableKernelOutputCache="true"<br />enableVersionHeader="true"<br />requireRootedSaveAsPath="true"<br />enable="true"<br />shutdownTimeout="90"<br />delayNotificationTimeout="5"<br />waitChangeNotification="0"<br />maxWaitChangeNotification="0"<br />enableHeaderChecking="true"<br />sendCacheControlHeader="true"<br />apartmentThreading="false" /><br /></system.web><br /><br /></div><span style="font-size:85%;">Now you can able to upload videos upto 30MB.<br /></span><br /><span style="font-size:85%;"><b>How to Play Video:</b><br />Using swf player we can play the video. In the sample application you can find this player. For this player we have to give the source file name with correct path. You can find play.aspx file in source code to know more about how to play the videos.</span><br /><span style="font-size:85%;"></span><span style="font-size:85%;"><br />In Part-I, I am explained how to convert the video from one format to another format and generating thumbnails. In Part-II I am going to explain how to bind this thumbnail to Gridview or DataList dynamically from Database and how to play the videos.<br /><br /></span><span style="font-size:85%;"><span style="color:#ff6666;"><strong>Note:</strong></span> In the sample I did not place the ffmpeg software due to the size.(Its around 10MB)<br />You can download for here:<a href="http://www.4shared.com/file/64111456/be47cb3d/ffmpeg.html" target="_blank">ffmpeg.rar</a><br /><a href="http://www.4shared.com/file/64082701/8beb0ab8/VideoThumb.html" target="_blank">Downloadm Source Code</a><br /><br /><br /></span></span><span style="font-size:85%;"></span>Ramkyhttp://www.blogger.com/profile/05722860132583858043noreply@blogger.com85tag:blogger.com,1999:blog-4955511806150724268.post-22976279968520156152008-09-13T01:54:00.000-07:002008-09-13T02:21:10.954-07:00Reading Contacts(Address Book) from Yahoo, Gmail, Rediff, MSN, AOL<span style="font-size:85%;">When we are developing a scoal networking websites or Some Referal websites, when the user registration completed then we have to provide an interface to invite the registerd user friends. For this purpose we have to provide option to get contcats (AddressBook) from various Email Providers. </span><br /><br /><br /><br /><p align="center"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6wf36MbaRV4iL_ZF0zr9v6qfnH9ql1AgggAfo-JA0KsyfAlCQLXVyS5qhpBdU8eY2CwVtuQLPAId4EyBxzfJYQc9d2mmDwtyoiXVTdRPPU5E_v3_Jkfdfhb-P2cNfJbCT4ZbHP68snsWZ/s1600-h/conatct2.GIF"><img id="BLOGGER_PHOTO_ID_5245428824253339602" style="CURSOR: hand" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6wf36MbaRV4iL_ZF0zr9v6qfnH9ql1AgggAfo-JA0KsyfAlCQLXVyS5qhpBdU8eY2CwVtuQLPAId4EyBxzfJYQc9d2mmDwtyoiXVTdRPPU5E_v3_Jkfdfhb-P2cNfJbCT4ZbHP68snsWZ/s400/conatct2.GIF" border="0" /></a></p><br /><br /><span style="font-size:85%;">Here I am taking some popular Email Providers like Yahoo, Google, MSN, Rediff, AOL. In order to Read the Address book of Yahoo, Google, Rediff, MSN, AOL we have access the API which provided by them itself.<br />Few days before I download one one dll from net. Its provided by Ideabubling. It contains all API of Yahoo,Google, Rediff, MSN, AOL, which is ready to use. Here In this application I use the dll. </span><br /><span style="font-size:85%;"></span><span style="font-size:85%;"><br /></span><span style="font-size:85%;">The Core Functionality is, when user provides Email Address and Password, If these details are valid then we will call getContact method and these details are stored in DataTable. You can see the sample code here.. </span><br /><br /><div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br />DataTable dtContatct = new DataTable();<br /><br />MailType mt = FindTheMailType();<br /><br />MailClient.GetContacts(mt, strUserid, strPassword, out boolIsOK, out dtContatct, out strError);<br /><br />dtContatct = MailClient.GetFormat(mt, dtContatct);<br /></div><br /><br /><br /><span style="font-size:85%;">Here “mt” is the mail type. It will check what type of Email Address It is. Either Yahoo, Gmail, etc.<br /></span><span style="font-size:85%;">Then this DataTable is binded with GridView, so that User can able to see his contcats and he can select some of the or all to send a mail. </span><br /><span style="font-size:85%;">You can see the Screen Shot..<br /><br /><br /></span><span style="font-size:85%;"></span><p align="center"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFcG4L1mmLqQdrgsnn5Qeg7RcazpIb9XYMssoqetoICrZWAHr93HMR1X_yNx8T2-wRc3h5a8QCiSYR0Ga0qbFsusD_QWnthDAPaMt8zpw9p8b3mBsk1O8-Mvmzf90u924hrSg5LyUoL90g/s1600-h/conatct3.GIF"><img id="BLOGGER_PHOTO_ID_5245429541822032530" style="CURSOR: hand" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFcG4L1mmLqQdrgsnn5Qeg7RcazpIb9XYMssoqetoICrZWAHr93HMR1X_yNx8T2-wRc3h5a8QCiSYR0Ga0qbFsusD_QWnthDAPaMt8zpw9p8b3mBsk1O8-Mvmzf90u924hrSg5LyUoL90g/s400/conatct3.GIF" border="0" /></a></p>Download Complete Application.. <a href="http://www.4shared.com/file/62826389/b198ff/ContactReader.html" target="_blank">Click Here..!</a>Ramkyhttp://www.blogger.com/profile/05722860132583858043noreply@blogger.com24tag:blogger.com,1999:blog-4955511806150724268.post-50507960240593044362008-09-11T02:08:00.000-07:002008-09-11T03:10:43.375-07:00Ajax ModalPopupExtender<span style="font-size:85%;"><strong>Actual Functionality Of A Modal Popup:</strong></span><br /><span style="font-size:85%;">Modal pop ups were among the first JavaScript effects to be widely adopted by web Sites like Google and Amazon who were looking for an interactive edge with their Customers.</span><br /><span style="font-size:85%;"><br />The window.alert( ) method implements the effect, however, the layout of these pop ups could not be changed. Thanks to CSS and the DOM, today you can Create better pop ups, without the need to open new windows.<br /></span><span style="font-size:85%;"><br />Modal pop ups are commonly generated by creating a new DOM element (usually a <div> container), using JavaScript to display the element, then CSS to style it. To Make the pop up modal, you also create a second <div> element that consumes the Complete display area of the browser.<br /></span><span style="font-size:85%;"><br />Then using the z-order CSS property (which Sets the virtual z coordinate of an element, effectively placing elements in front of or Behind each other), stack both elements over the current content of the page; “100%<br />display area” <div> first, then the pop up <div>.<br /></span><br /><span style="font-size:85%;">Now The stacking part is taken care of by ASP.NET AJAX; you just have to provide the rest.</span><br /><span style="font-size:85%;"></span><br /><span style="font-size:85%;">Then, the original content of the page is still visible, but since a 100 percent width, 100 percent height element is placed over it, the user cannot click any links outside the pop up, effectively making the pop up modal.<br /></span><span style="font-size:85%;"></span><span style="font-size:85%;"><br /><strong>Steps for Creating Modal popup:</strong> </span><span style="font-size:85%;"><br />The first step to implement this is to create the appropriate CSS classes. We need two: one for the pop up, one for the 100 percent display area <div>.<br />For the first class, we just apply a border, a background color, and a width (the height is determined automatically by the browser’s rendering engine):<br /><br /></span></span><span style="font-size:85%;"><div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br />.popup {<br />border: solid;<br />background-color: yellow;<br />width: 200px;<br />}<br /></div></span><span style="font-size:85%;"></span><br /></span><span style="font-size:85%;">The second CSS class also uses a background color, such as gray, but we also set an opacity value so that the background (the content of the page) is visible through the element. Internet Explorer supports the filter property for this task, and all other browsers use the opacity style.<br /><br /><br /></span><span style="font-size:85%;"><div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br />.content {<br />background-color: grey;<br />filter: alpha(opacity=50);<br />opacity: 0.5;<br />}<br /></div><br /></span><span style="font-size:85%;">Next, we need a server control to display the modal pop up. A link is a good choice:<br /><asp:HyperLink ID="HyperLink1" runat="server" Text="More ..." NavigateUrl="#" /><br /></span><span style="font-size:85%;">Now we create the actual pop up. As shown here, the user could be prompted to log in:<br /><br /><br /></span></span><span style="font-size:85%;"><div style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; OVERFLOW-Y: scroll; FONT-SIZE: 10pt; BACKGROUND: white; OVERFLOW-X: scroll; BORDER-LEFT: black 1px solid; COLOR: black; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Courier New; WHITE-SPACE: nowrap"><br /><asp:Panel ID="popupPanel" runat="server" CssClass="popup"><br /><p>Login to get more information!<br /><br />User <input type="text" /> - Password <input type="password" /><br /><input type="button" value="Login" id="Button1" runat="server" /><br /></p><br /></asp:Panel><br /></div></span><span style="font-size:85%;"></span><br /></span><span style="font-size:85%;">Finally, the ModalPopupExtender from the ASP.NET AJAX Control Toolkit comes into play. It lets you create a modal pop up that can be put over the current content of the page. This includes a bit of work, both from the toolkit and from you. You will need the following properties for ModalPopupExtender: </span><br /><span style="font-size:85%;"><br /><b>BackgroundCssClass:</b>The CSS class to use to make the page’s contents look disabled<br /><b>PopupControlID:</b>The ID of the pop up to display<br /><b>TargetControlID:</b>The ID of the element that triggers showing the pop up<br /><b>OKControlID:</b>The ID of the element that lets the pop up disappear<br />(The default position is the center of the page.)<br /></span><span style="font-size:85%;"><strong></strong></span><br /></span><span style="font-size:85%;"><strong>A Complex Modal PopUp:</strong> </span><span style="font-size:85%;"><br />In this situation, Assume that we have a Registration form which may contains username, password, conformpassword,Email. Then we have a Register Button, when user clicks on Register Button we have to perform Following actions </span><br /><ul><li><span style="font-size:85%;">Check the validation</span></li><li><span style="font-size:85%;">If validation success then dispaly Licensense Aggreement in ModelPopup.</span></li></ul><p><span style="font-size:85%;">In this situation modelpopup will not display if gave TargetControlID="btnregister". For this purpose we have to take an hidden button pass the hidden button id as TargetControlID. </span><span style="font-size:85%;"><br />In the register button click event write the follwing code<br />modelpopup.show();<br />Now when the validation successful then only modal popup control visible.<br />You can download the complete source code. <a href="http://www.4shared.com/file/62574913/e2461b5b/ModalPopup.html" target="_blank">Click Here</a></p></span>Ramkyhttp://www.blogger.com/profile/05722860132583858043noreply@blogger.com1tag:blogger.com,1999:blog-4955511806150724268.post-67268244040705892592008-09-10T02:31:00.000-07:002008-09-10T02:56:32.432-07:00Working with POPUPs in ASP.Net<span style="font-size:85%;">In an application I have a requirement like in this way. There are some details about USER like User Name, First Name, Last Name, Email, Mobile Number, and City. After that I have Four buttons with named as Search, Clear, Save, Delete.</span><br /><span style="font-size:85%;">You can see the Screen Shot</span><br /><span style="font-size:0;"><br /><br /></span><span style="font-size:0;"><p align="center"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSm9SEIZTAV2QZqXexIq6dBE7O31cvXjkuhLEisqGKpJTLrZqNmPdclWFozI4Kn1XyAtKBDo4mv1s90DVXD3Jd8pwWTt0d8M5CC0URAeOi7Z-4503wNqtCJuAxzwJdqttmeuqAzck6akoI/s1600-h/mainpage.GIF"><img id="BLOGGER_PHOTO_ID_5244324969004992882" style="CURSOR: hand" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSm9SEIZTAV2QZqXexIq6dBE7O31cvXjkuhLEisqGKpJTLrZqNmPdclWFozI4Kn1XyAtKBDo4mv1s90DVXD3Jd8pwWTt0d8M5CC0URAeOi7Z-4503wNqtCJuAxzwJdqttmeuqAzck6akoI/s400/mainpage.GIF" border="0" /></a></p><br /></span><br /><span style="font-size:85%;">Here the main functionality is when I click on Search button a POPUP Window has to be opened that window contains search functionality for users. When I open the window it will provide a functionality to search user by User Name, City Name. When I provide User Name or City Name and clicked on Search button it will display all related details in Grid. And this grid has to be allowing me to select a row. When I clicks on any row of the grid automatically the grid has to be closed and a selected row detail has to be displayed in the Main Form where search button located. </span><br /><br /><span style="font-size:85%;">Search Screen shot</span><br /><span style="font-size:0;"><br /><br /></span></span><span style="font-size:0;"><p align="center"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjERaxGwon_NJUk7kVj1i8aPC1Ze5-Wj28yWrKuCcb5cJARJ8ay0PE4jfqCJdJmfhi97xxY7X-nb5QhOeE5D_pa5GC21x1XLZd7OUi_4oJiXwP633_IvZ61ghdzoVMQ6J060fW620fQnoRz/s1600-h/searchpage.GIF"><img id="BLOGGER_PHOTO_ID_5244325585485441378" style="CURSOR: hand" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjERaxGwon_NJUk7kVj1i8aPC1Ze5-Wj28yWrKuCcb5cJARJ8ay0PE4jfqCJdJmfhi97xxY7X-nb5QhOeE5D_pa5GC21x1XLZd7OUi_4oJiXwP633_IvZ61ghdzoVMQ6J060fW620fQnoRz/s400/searchpage.GIF" border="0" /></a></p><br /></span><br /><span style="font-size:85%;">In order to achieve this functionality I used Java script with DOM, which allow me to send the search results to Parent window when user clicks on the grid and to close pop window.</span><br /><br /><span style="font-size:85%;">search results</span><br /><span style="font-size:0;"><br /><br /></span></span><span style="font-size:0;"><p align="center"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSKjzL4TcHmP0gV9jn-OtL6WzTD9uK-4dzHDGH-DD7AE-nwqx54l8VdLoNpjl5wCLM-aGEoT0w7lX_Fcx835umTH74uisDmVMqhKQb7LNLrF7iOe6bLxB5Sz-NBXGggpV6YIHsLARLtVS9/s1600-h/searcresults.GIF"><img id="BLOGGER_PHOTO_ID_5244325998718702610" style="CURSOR: hand" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSKjzL4TcHmP0gV9jn-OtL6WzTD9uK-4dzHDGH-DD7AE-nwqx54l8VdLoNpjl5wCLM-aGEoT0w7lX_Fcx835umTH74uisDmVMqhKQb7LNLrF7iOe6bLxB5Sz-NBXGggpV6YIHsLARLtVS9/s400/searcresults.GIF" border="0" /></a></p><br /></span><br /><span style="font-size:85%;">Grid contains hyper links when user clicks on that one it will call a Java script function. Here is the sample code..!</span><br /><span style="font-size:85%;"><br /><asp:TemplateField HeaderText="User Name"><br /><ItemTemplate><br /><a style="cursor: hand" onmouseover="this.style.textDecoration='underline'" onmouseout="this.style.textDecoration='none'"<br />name="UserName" onclick="javascript:CalltoParent(this)" runat="server"<br />id="uname"><br /><%# DataBinder.Eval(Container.DataItem, "UserName") %><br /></a><br /></ItemTemplate><br /></asp:TemplateField><br /><br /></span><span style="font-size:85%;">When user clicks it will call “CalltoParent” and here we are passing the Current Node value.<br />Java Script function can be written as..!<br /></span><br /><span style="font-size:85%;"><br /><br /></span></span><span style="font-size:85%;"><pre> function CalltoParent(user)<br /> {<br /> if(window.opener!=null){<br /> if(window.opener.document.getElementById('txtuname')!=null){<br /> var uval=user.parentNode.parentNode;<br /> window.opener.document.getElementById('txtuname').value = uval.childNodes[0].childNodes[0].innerText;<br /> window.opener.document.getElementById('txtfname').value = uval.childNodes[1].childNodes[0].innerText;<br /> window.opener.document.getElementById('txtlanme').value = uval.childNodes[2].childNodes[0].innerText;<br /> window.opener.document.getElementById('txtmail').value = uval.childNodes[3].childNodes[0].innerText;<br /> window.opener.document.getElementById('txtmobile').value = uval.childNodes[4].childNodes[0].innerText;<br /> window.opener.document.getElementById('txtcity').value = uval.childNodes[5].childNodes[0].innerText;<br /> window.close();<br /> }<br /> return true; <br /> }<br /> }</span></pre><br /><span style="font-size:0;"><br /><p align="center"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdwfT8SOiaXX30O-L6H4vB2hI6no9u-BmqK6g9D_Jh7SwjMhxLr5oxvdhzjhy__Pk3mdxsL0nTd95reKp-vz9YJ0Mm03tjbT2N3HdhndzG2MHd-OFxGfRJuxNmsqWZfyaI7iuDfJntH0y-/s1600-h/final.GIF"><img id="BLOGGER_PHOTO_ID_5244326391001819618" style="CURSOR: hand" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdwfT8SOiaXX30O-L6H4vB2hI6no9u-BmqK6g9D_Jh7SwjMhxLr5oxvdhzjhy__Pk3mdxsL0nTd95reKp-vz9YJ0Mm03tjbT2N3HdhndzG2MHd-OFxGfRJuxNmsqWZfyaI7iuDfJntH0y-/s400/final.GIF" border="0" /></a></p><br /></span><br /><a href="http://www.4shared.com/file/62449771/2e1a8153/Popup.html" target="_blank">Source Code</a>Ramkyhttp://www.blogger.com/profile/05722860132583858043noreply@blogger.com2tag:blogger.com,1999:blog-4955511806150724268.post-71347967494094947752008-09-07T21:42:00.000-07:002008-09-07T21:47:41.152-07:00Microsoft Virtual TechDays on Sept 17,18, 19Microsoft Virtual TechDays goingon from September 17 to 19. In this TechDays you can learn the following Technologies..<br /><ul><li><span style="font-size:85%;">.Net 3.5 Service Pack 1</span></li><li><span style="font-size:85%;">Microsoft Visual Studio 2008</span></li><li><span style="font-size:85%;">Microsoft Visual Studio Team Suite</span></li><li><span style="font-size:85%;">ASP.Net</span></li><li><span style="font-size:85%;">Silverlight</span></li><li><span style="font-size:85%;">Internet Explorer 8</span></li><li><span style="font-size:85%;">Windows Vista</span></li><li><span style="font-size:85%;">Virtualization</span></li><li><span style="font-size:85%;">Windows Presentation Foundation(WPF)</span></li><li><span style="font-size:85%;">Windows Mobile Development</span></li><li><span style="font-size:85%;">Microsoft SharePoint Server</span></li><li><span style="font-size:85%;">Microsoft SQL Server 2008</span></li><li><span style="font-size:85%;">LINQ</span></li><li><span style="font-size:85%;">Patterns and Practices</span></li><li><span style="font-size:85%;">Security</span></li></ul><p>For Registration <a href="http://www.connectwithlife.co.in/vtd/default.aspx">Click Here..!</a></p>Ramkyhttp://www.blogger.com/profile/05722860132583858043noreply@blogger.com0tag:blogger.com,1999:blog-4955511806150724268.post-64901445654537758092008-09-01T21:59:00.000-07:002008-09-05T02:36:55.789-07:00Dotnet Coding Standards<span style="font-size:85%;">We Fallow the Coding Standards to enforce consistent style and formatting in developing the applications. Here I am explaining the following things. </span><br /><ul><li><span style="font-size:85%;">Naming Conversions and Style</span></li><li><span style="font-size:85%;">Coding Practices</span></li><li><span style="font-size:85%;">Error Handling</span></li><li><span style="font-size:85%;">Data Access</span></li></ul><ol><span style="font-size:85%;color:#3366ff;"><li>Naming Conversions and Style</li></span><ol><span style="font-size:85%;color:#000000;"><li>Use Pascal casing for type and method and constants</li></span><span style="font-size:85%;color:#000000;">Ex: public class SomeClass<br /> {<br />const int DefaultSize= 100;<br />public SomeMethod ()<br />{ }<br /> }</span><br /><span style="font-size:85%;color:#000000;"><li>Use camel casing for local variable names and method arguments</li></span><span style="font-size:85%;color:#000000;">Ex:<br />int number;<br /> void MyMethod (int someNumber)<br /> { }</span><br /><span style="font-size:85%;color:#000000;"><li>Prefix member variables with m_. Use Pascal casing for the rest of a member variable name following the m_.<br /></span><span style="font-size:85%;color:#000000;">Ex:public class SomeClass<br />{<br /> private int m_Number;<br />}</span><br /></li><span style="font-size:85%;color:#000000;"><li>Name methods using verb-object pair, such as ShowDialog ().</li></span><span style="font-size:85%;color:#000000;"><li>Method with return values should have a name describing the value returned, such as GetObjectState ().</li></span><span style="font-size:85%;color:#000000;"><li>Use descriptive variable names</li></span><span style="font-size:85%;color:#000000;"><li>Always use C# predefined types rather than the aliases in the System Namespace.</li>For Example:<br /> object NOT Object<br /> string NOT String<br /> int NOT Int32.<br /></span><span style="font-size:85%;color:#000000;"><li>Use meaningful namespace such as the product name or the company name.</li></span><span style="font-size:85%;color:#000000;"><li>Avoid fully qualified type names. Use the using statement instead.</li></span><span style="font-size:85%;color:#000000;"><li>Avoid putting a using statement inside a namespace.</li></span><span style="font-size:85%;color:#000000;"><li>Group all framework namespaces together and put custom or third-party namespaces underneath.</li>Example: using System;<br /> using System.Data;<br /> using System.Configuration;<br /> using System.Web;<br /> using System.Web.Security;<br /> using System.Web.UI;<br /> using System.Web.UI.WebControls;<br /> using System.Web.UI.WebControls.WebParts;<br /> using System.Web.UI.HtmlControls;<br /> using MyCompany;<br /> using MyControl;<br /></span><span style="font-size:85%;color:#000000;"><li>Maintain strict indentation. Do not use Tabs or non standard indentation. Such as one space. Recommended values are three or four spaces, and the value should be uniformed across.</li></span><span style="font-size:85%;color:#000000;"><li>Indent comment at the same level of indentation as the code you are documenting.</li></span><span style="font-size:85%;color:#000000;"><li>All comments should pass spell checking. Misspelled comments indicate sloppy development.</li></span><span style="font-size:85%;color:#000000;"><li>All member variables should be declared at the top, with one line separating them from the properties or methods.</li>public class MyClass<br /> {<br /> int m_Number;<br /> string m_Name;<br /> public void SomeMethod1()<br /> { }<br /> public void SomeMethod2()<br /> { }<br /> }<br /></span><span style="font-size:85%;color:#000000;"><li>Declare a local variable as close as possible to its first use.</li></span><span style="font-size:85%;color:#000000;"><li>A file name should reflect the class it contains.</li></span><span style="font-size:85%;color:#000000;"><li>Always place an open curly ({) in a new line.</li></span></ol><br /><span style="font-size:85%;color:#3366ff;"><li>Coding Practices:</li></span><ol><span style="font-size:85%;color:#000000;"><li>Avoid putting multiple classes in a single file.</li></span><span style="font-size:85%;color:#000000;"><li>A single file should contribute types to only a single namespace. Avoid having multiple namespaces in the same file.</li></span><span style="font-size:85%;color:#000000;"><li>Avoid files with more than 500 lines (Excluding machine-Generated code)</li></span><span style="font-size:85%;color:#000000;"><li>Avoid method with more than 25 lines.</li></span><span style="font-size:85%;color:#000000;"><li>Avoid methods with more than 5 arguments. Use structures for passing multiple arguments.</li></span><span style="font-size:85%;color:#000000;"><li>Do not manually edit any machine generated code.</li></span><span style="font-size:85%;color:#000000;"><li>If modifying machine generated code, modify the format and style to match this coding standard.</li></span><span style="font-size:85%;color:#000000;"><li>Use partial classes whenever possible to factor out the maintained portions.</li></span><span style="font-size:85%;color:#000000;"><li>Avoid comments that explain the obvious. Code should be self-explanatory. Good code with readable variables and method names should not require comments.</li></span><span style="font-size:85%;color:#000000;"><li>Document only operational assumptions, algorithms insights and so on.</li></span><span style="font-size:85%;color:#000000;"><li>Avoid method level documentation.</li></span><span style="font-size:85%;color:#000000;"><li>With the exception of zero or one, never hard-code a numeric value; always declare a constant instead.</li></span><span style="font-size:85%;color:#000000;"><li>Use the const directive only on natural constants such as the number of days of the week.</li></span><span style="font-size:85%;color:#000000;"><li>Avoid using const on read-only variables. For that, use the readonly directive.</li></span><span style="font-size:85%;color:#000000;"><li>Every line of code should be walked through in a “white Box” testing manner.</li></span><span style="font-size:85%;color:#000000;"><li>Catch only exceptions for which you have explicit handling.</li></span><span style="font-size:85%;color:#000000;"><li>Avoid error code as method return values.</li></span><span style="font-size:85%;color:#000000;"><li>Avoid defining custom exception classes. </li></span><span style="font-size:85%;color:#000000;"><li>Avoid multiple Main () methods in a single assembly.</li></span><span style="font-size:85%;color:#000000;"><li>Make only the most necessary types public. Mark other as internal.</li></span><span style="font-size:85%;color:#000000;"><li>Avoid friend assemblies. As they increases inter assembly coupling.</li></span><span style="font-size:85%;color:#000000;"><li>Avoid code that relies on an assembly that running form a particular location.</li></span><span style="font-size:85%;color:#000000;"><li>Minimize code in application assemblies (EXE client assemblies). Use class libraries instead to contain business logic.</li></span><span style="font-size:85%;color:#000000;"><li>Always use a curly brace scope in an if statement, even if it contains a single statement.</li></span><span style="font-size:85%;color:#000000;"><li>Always use zero based arrays.</li></span><span style="font-size:85%;color:#000000;"><li>Do not provide public or protected member variables. Use properties instead.</li></span><span style="font-size:85%;color:#000000;"><li>Avoid using “new” inheritance qualifier. Use “override” instead.</li></span><span style="font-size:85%;color:#000000;"><li>Never use unsafe code. Except using interop.</li></span><span style="font-size:85%;color:#000000;"><li>Always check a delegate for null before invoking it.</li></span><span style="font-size:85%;color:#000000;"><li>Classes and Interfaces should have at least 2:1 ratio of methods to properties.</li></span><span style="font-size:85%;color:#000000;"><li>Avoid Interfaces with one member. Strive to have three to five members per interface. Don’t have more than 20 members per interface.12 is probably principle limit.</li></span><span style="font-size:85%;color:#000000;"><li>Prefer using explicit interface implementation.</li></span><span style="font-size:85%;color:#000000;"><li>Never hardcode strings that might change based on deployment such as connection strings.</li></span><span style="font-size:85%;color:#000000;"><li>When building a long string use “StringBuilder”, not “String”.</li></span><span style="font-size:85%;color:#000000;"><li>Don’t use late binding invocation when early-binding is possible.</li></span><span style="font-size:85%;color:#000000;"><li>Use application logging and tracing.</li></span><span style="font-size:85%;color:#000000;"><li>Never use “go to” unless in a switch statement fall-through.</li></span><span style="font-size:85%;color:#000000;"><li>Don’t use the “this” reference unless invoking another constructor from within a constructor.</li></span><span style="font-size:85%;color:#000000;"><li>Avoid casting to and from “System.Object” in code that uses generics. Use constraints or the “as” operator instead.</li></span><span style="font-size:85%;color:#000000;"><li>Do not use the base word to access base class members unless you wish to resolve a conflict with a subclasses member of the same name or when invoking a base class constructor.</li></span></ol><br /><span style="font-size:85%;color:#3366ff;"><li>Error Handling:</li></span><ol><span style="font-size:85%;color:#000000;"><li>Error handler should be present whenever you anticipate possibility of error.</li></span><span style="font-size:85%;color:#000000;"><li>Do not use Try-catch for flow- control.</li></span><span style="font-size:85%;color:#000000;"><li>Never declare an empty catch block.</li></span><span style="font-size:85%;color:#000000;"><li>Error Message should be user friendly, simple and understandable.</li></span><span style="font-size:85%;color:#000000;"><li>Errors should be raised in the routines present in the components and captured in the application’s GUI.</li></span><span style="font-size:85%;color:#000000;"><li>Use Try-Catch statements in each and every function you write. Adhere to it strictly with out fail.</li></span><span style="font-size:85%;color:#000000;"><li>Use dispose on types holding scarce resources, i.e., files, database connections.</li></span></ol><br /><span style="font-size:85%;color:#3366ff;"><li>Data Access:</li></span><ol><span style="font-size:85%;color:#000000;"><li>ANSI SQL 92 standards have to be followed for writing queries.</li></span><span style="font-size:85%;color:#000000;"><li>Do not put order by clause in the query unless required.</li></span><span style="font-size:85%;color:#000000;"><li>Do not encapsulate readonly database operations in transactions.</li></span><span style="font-size:85%;color:#000000;"><li>Use a stored procedure with output parameters instead of single record SELECT statements when retrieving one row of data.</li></span><span style="font-size:85%;color:#000000;"><li>Stored procedure execution is fast when we pass parameters by position (the order in which the parameters are declared in the stored procedure) rather then by name.</li></span><span style="font-size:85%;color:#000000;"><li>After each data modification statement inside a transaction, check for an error by testing the global variable @@ERROR</li></span><span style="font-size:85%;color:#000000;"><li>Verify the row count when performing DELETE operation</li></span><span style="font-size:85%;color:#000000;"><li>Use RETURN statement in stored procedures to help the calling program know whether the procedure worked properly.</li></span><span style="font-size:85%;color:#000000;"><li>Key words should be capital. For example; SELECT, UPDATE, DELETE, INSERT, FROM, AND WHERE, etc.</li></span><span style="font-size:85%;color:#000000;"><li>Do not use “SELECT * FROM” type of query. If all the columns of the table are to be selected, list all columns in the SELECT in same order as they appear in the table definition.</li></span><span style="font-size:85%;color:#000000;"><li>While writing a query as a string, do not put any space after single quote (‘). There should be a single space between every two words. There should not be a space between the last word and the concluding single quote (‘).</li></span><span style="font-size:85%;color:#000000;"><li>Where multiple columns are selected, there should be a single space after every ‘,’ between two columns.</li></span><span style="font-size:85%;color:#000000;"><li>All the major keywords should come on the new lines</li></span><span style="font-size:85%;color:#000000;"><li>The number of columns in a SELECT statement should not be more than 6. The line separator should be placed in this case after the (,) of the last column of this line and a single space.</li></span><span style="font-size:85%;color:#000000;"><li>For any new line separator, the separator should come after a single space after the last word of the line.</li></span><span style="font-size:85%;color:#000000;"><li>Place a tab after each key word on a new line.</li></span><br /></ol><br /></ol><br /><p></p>Ramkyhttp://www.blogger.com/profile/05722860132583858043noreply@blogger.com4tag:blogger.com,1999:blog-4955511806150724268.post-21331756504418179942008-08-28T01:30:00.000-07:002008-08-28T02:19:20.578-07:00Sending Email in ASP.Net from Windows XPNow a days many web application has a requirement of send email. Using ASP.Net we can send emails, but when ever we are developing in WindowsXP environment, It doesnt allows us to send the email. It need some configuration so that we can send Email in WindowsXP with ASP.Net. Here are Steps for configuration..<br /><br />Step 1: Open IIS, Stop the "Default SMTP Virtual Server" <span style="font-size:78%;">here is screen shot</span><span align="center"><br /><br /></span><span align="center"><p align="center"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2jFGnwGV_hsK8-54d1AnNnz2C2heTTEUtSHzWmEWFOgHyycpNr9u3NwqXtmN6YggDQSGjMX5j-OoNnnBhiaiSY5kAsG2wwcXF-5bZh7JEVkFGfjXGv0YqMvj3xJL71a6IxSKX7KyDqpCb/s1600-h/1.GIF"><img id="BLOGGER_PHOTO_ID_5239491593455320994" style="CURSOR: hand" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2jFGnwGV_hsK8-54d1AnNnz2C2heTTEUtSHzWmEWFOgHyycpNr9u3NwqXtmN6YggDQSGjMX5j-OoNnnBhiaiSY5kAsG2wwcXF-5bZh7JEVkFGfjXGv0YqMvj3xJL71a6IxSKX7KyDqpCb/s200/1.GIF" border="0" /></a></span></p><br /><br /><br /><br />Step 2: Open Properties of "Default SMTP Virtual Server" in that one, Select "Access" tab.<br /><br /><br />Step 3: click on "Relay" button. It will open a "Relay Restriction" window. In this window select a radio button with text as "Only the list below".<br /><br /><br />Step 4: Then click on "Add" button. which allow to enter an IP Address. In that enter local IP Address as 127.0.0.1. Then click "ok" button to close Access tab and propertie window. here is the screen shot:<br /><br /><p align="center"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVEL47BQU9DtwgLqXfQBzlzwrcg3j_r7PSdqmMiqaOL36lh1uIAMVnxEuqkWsHYAaAjLkeKAogyMMmaUARmk24olPJlXD0ygUd9OInd9trcSpCunJSQVhFOV-gSpPfQLJ4DfWTPq96Ll_z/s1600-h/2.GIF"><img id="BLOGGER_PHOTO_ID_5239493809854715154" style="CURSOR: hand" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVEL47BQU9DtwgLqXfQBzlzwrcg3j_r7PSdqmMiqaOL36lh1uIAMVnxEuqkWsHYAaAjLkeKAogyMMmaUARmk24olPJlXD0ygUd9OInd9trcSpCunJSQVhFOV-gSpPfQLJ4DfWTPq96Ll_z/s200/2.GIF" border="0" /></a></p><br />Step 5: Restart the "Default SMTP Mail Server".<br /> with this 5 steps we can configure IIS. Now when you send Email, it will be sent.<br /><br /><br /><br /><br /><br /><br /><span style="font-size:78%;"></span>Ramkyhttp://www.blogger.com/profile/05722860132583858043noreply@blogger.com0tag:blogger.com,1999:blog-4955511806150724268.post-2738521145697043172008-08-27T05:13:00.000-07:002008-08-27T05:21:45.363-07:00Gridview Cool Tips & Tricks<span style="font-size:85%;"><strong><span style="color:#3366ff;">Pop-up a Confirmation box before Deleting a row in GridView</span><br /></strong>Add a template field and drop a button in it, using which the user will delete the record. In the OnClientClick event, call the confirm() function as mentioned below:<br /><asp:templatefield><br /> <itemtemplate><br /> <asp:Button ID="btnDel" runat="server" Text="Delete"<br /> CommandName="Delete" OnClientClick="return confirm('Are you sure you want to delete the record?');" /><br /> </itemtemplate><br /></asp:TemplateField><br /> </span><br /><span style="font-size:85%;"> <strong><span style="color:#3366ff;">Display details of the Row selected in the GridView</span></strong><br />Assuming you have a button called ‘Select’ in your GridView with CommandName ‘Select’, to find out the row clicked and display the row’s details, use this code:<br />private void GridView1_RowCommand(Object sender,<br />GridViewCommandEventArgs e)<br /> {<br /> if (e.CommandName == "Select")<br /> {<br /> int idx = Convert.ToInt32(e.CommandArgument);<br /> GridViewRow selrow = GridView1.Rows[idx];<br /> string fstCell = selrow.Cells[0].Text;<br />string scndCell = selrow.Cells[1].Text;<br />// and so on<br />// Thanks to Mark Rae (MVP) for pointing the typo. Earlier it was Cells[1] and Cells [2]<br /> }<br /> }<br /><br /><strong><span style="color:#3366ff;">Retrieve Details of the Row being Modified in GridView</span></strong><br />void GridView1_RowUpdated(Object sender, GridViewUpdatedEventArgs e)<br /> {<br /> // Retrieve the row being edited.<br /> int index = GridView1.EditIndex;<br /> GridViewRow row = GridView1.Rows[index];<br /><br /> // Retrieve the value of the first cell<br /> lblMsg.Text = "Updated record " + row.Cells[1].Text;<br /> }<br /><br /><span style="color:#3366ff;"><strong>Retrieve Details of the Row being Deleted in GridView</strong><br /></span>The ID of the row being deleted must be in the GridView.DataKeyNames collection.<br />protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)<br /> {<br /> int ID = (int)GridView1.DataKeys[e.RowIndex].Value;<br /> // Query the database and get the values based on the ID<br /> }<br /> <strong><span style="color:#3366ff;">Cancelling Update and Delete in a GridView</span><br /></strong>RowUpdating - Occurs when a row's Update button is clicked, but before the GridView control updates the row.<br />RowDeleting – Occurs when a row's Delete button is clicked, but before the GridView control deletes the row.<br />protected void gvDetail_RowUpdating(object sender, GridViewUpdateEventArgs e)<br /> {<br /> e.Cancel = true;<br /> }<br />void GridView1_RowDeleting(Object sender, GridViewDeleteEventArgs e)<br /> {<br /> // Check for a condition and cancel the delete<br /> // There should be atleast one row left in the GridView<br /> if (GridView1.Rows.Count <= 1)<br /> {<br /> e.Cancel = true;<br /> }<br /> }<br /><br /><strong><span style="color:#3366ff;">Enable Disable Controls inside a GridView</span></strong><br />There are at times when you have to disable controls on some rows, when a certain condition is satisfied. In this snippet, we will see how to disable editing for rows that have the CategoryName as ‘Confections’. Use the following code:<br />protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)<br /> {<br /> if (e.Row.RowType == DataControlRowType.DataRow)<br /> {<br /> if (e.Row.DataItem != null)<br /> {<br /> Label lblControl = (Label)e.Row.Cells[2].FindControl("lblCategoryName");<br /><br /> if(lblControl.Text == "Confections")<br /> {<br /> e.Row.Cells[0].Enabled = false;<br /> }<br /> }<br /> }<br /> }<br /><br /><span style="color:#3366ff;"><strong>How to Add a Row Number to the Gridview</strong><br /></span>There are a couple of ways to do this. However I will share a very handy tip that was shared by XIII in the </span><a href="http://forums.asp.net/p/992655/1292440.aspx#1292440"><span style="font-size:85%;">asp.net forums</span></a><span style="font-size:85%;">.<br />Just add the following tags to your <columns> section of your GridView<asp:templatefield> <itemtemplate> <%# Container.DataItemIndex + 1 %> </itemtemplate></asp:TemplateField><br /><strong><span style="color:#3366ff;">How to programmatically hide a column in the GridView<br /></span></strong>There are two conditions to be checked in the Page_Load to hide a columns in the GridView, let us say the 3rd column:<br />If ‘AutoGenerateColumns’ = True on the GridView<br />C#<br /> GridView1.HeaderRow.Cells[2].Visible = false;<br /> foreach (GridViewRow gvr in GridView1.Rows)<br /> {<br /> gvr.Cells[2].Visible = false;<br /> }<br />VB.NET<br /> GridView1.HeaderRow.Cells(2).Visible = False<br /> For Each gvr As GridViewRow In GridView1.Rows<br /> gvr.Cells(2).Visible = False<br /> Next gvr<br />If ‘AutoGenerateColumns’ = False on the GridView<br />C#<br />GridView1.Columns[2].Visible = false;<br />VB.NET<br />GridView1.Columns(2).Visible = False<br /> </span><br /><span style="font-size:85%;"><span style="color:#3366ff;"><strong>Displaying Empty Data in a GridView</strong><br /></span>When there are no results returned from the GridView control’s data source, the short and simple way of displaying a message to the user, is to use the GridView’s EmptyDataText property. <br /> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="CategoryID"<br /> DataSourceID="SqlDataSource1" EmptyDataText="No data available"<br /> ShowFooter="true" AllowPaging="True" AllowSorting="True"<br /> PageSize="5" OnRowDataBound="GridView1_RowDataBound"><br />Note: You can also add style to the EmptyDataText by using the </span><a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.emptydatarowstyle.aspx"><span style="font-size:85%;">EmptyDataRowStyle</span></a><span style="font-size:85%;"> property.</span><br /><span style="font-size:85%;"><strong><span style="color:#3366ff;">Displaying an Image in case of Empty Data in a GridView</span><br /></strong>As an alternative to using the EmptyDataText property, if you need to display an image or any HTML/ASP.NET control, you can use the EmptyDataTemplate. In this snippet below, we are using the image control in the <emptydatatemplate> to display an image.<br /> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="CategoryID"<br /> DataSourceID="SqlDataSource1" ShowFooter="true" AllowPaging="True" AllowSorting="True"<br /> PageSize="5" OnRowDataBound="GridView1_RowDataBound"><br /> <emptydatatemplate><br /> <asp:Image id="imgNoData"<br /> ImageUrl="~/images/NoDataFound.jpg"<br /> AlternateText="No data found"<br /> runat="server"/><br /> </emptydatatemplate><br /> <strong><span style="color:#3366ff;">Change the color of a GridView Row based on some condition</span></strong><br /> protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e)<br /> {<br /> if (e.Row.DataItem != null)<br /> {<br /> DataRowView drv = (DataRowView)e.Row.DataItem;<br /> string catName = Convert.ToString(drv["CategoryName"]);<br /> if (catName.Trim() == "Confections")<br /> e.Row.BackColor = System.Drawing.Color.LightBlue;<br /> }<br /> }<br /> <strong><span style="color:#3366ff;">How to create an Image Command Field Column and add to the GridView at runtime</span></strong><br /> if (!Page.IsPostBack)<br /> {<br /> CommandField cmdField = new CommandField();<br /> cmdField.ButtonType = ButtonType.Image;<br /> cmdField.SelectImageUrl = "~/Images/Home_Np1.GIF";<br /> cmdField.ShowSelectButton = true;<br /> cmdField.HeaderText = "Select";<br /> GridView1.Columns.Add(cmdField);<br /> GridView1.DataBind();<br /> }<br /><br /><strong><span style="color:#3366ff;">How to loop through all the rows in all the pages of a GridView<br /></span></strong>One simple way to loop through all the rows in all the pages of a GridView is to access its DataSource. In this example, we will loop through the SQLDataSource to retrieve all the rows in a GridView and access its cell value. You can modify the logic depending on the type of controls you have added to the GridView<br />C#<br /> protected void Button1_Click(object sender, EventArgs e)<br /> {<br /> DataSourceSelectArguments dsaArgs = new DataSourceSelectArguments();<br /> DataView view = (DataView)SqlDataSource1.Select(dsaArgs);<br /> DataTable dt = view.ToTable();<br /> for (int i = 0; i < dt.Rows.Count; i++)<br /> {<br /> for (int j = 0; j < dt.Columns.Count; j++)<br /> {<br /> string s = dt.Rows[i][j].ToString();<br /> }<br /> } <br /> }<br /> </span>Ramkyhttp://www.blogger.com/profile/05722860132583858043noreply@blogger.com0tag:blogger.com,1999:blog-4955511806150724268.post-50254378305987595332008-08-19T20:53:00.000-07:002008-08-21T00:54:08.323-07:00Implementing Google Suggestions using Ajax in ASP.Net 2.0<ul><li>Using Ajax <span class="blsp-spelling-error" id="SPELLING_ERROR_0">AutoComplete</span> Extender we can Implement google <span class="blsp-spelling-corrected" id="SPELLING_ERROR_1">suggestions</span> like Applications.</li><br /><br /><li>This functionality is very simple, just we have to communicate with <span class="blsp-spelling-error" id="SPELLING_ERROR_2">Webservice</span>. Where we write the logic <span class="blsp-spelling-corrected" id="SPELLING_ERROR_3">retrieve</span> information from the database</li><br /><br /><li>To <span class="blsp-spelling-error" id="SPELLING_ERROR_4">Webservice</span> method we have to pass "<span class="blsp-spelling-error" id="SPELLING_ERROR_5">prefixText</span>" as parameter.</li><br /><br /><li>To <span class="blsp-spelling-error" id="SPELLING_ERROR_6">Satrt</span> this Application First we have to take a <span class="blsp-spelling-error" id="SPELLING_ERROR_7">TextBox</span> and make the <span class="blsp-spelling-error" id="SPELLING_ERROR_8">TextBox</span> "<span class="blsp-spelling-error" id="SPELLING_ERROR_9">AutoComplete</span>: option as "off". Ex:<br /><strong><em>asp:<span class="blsp-spelling-error" id="SPELLING_ERROR_10">TextBox</span> ID="<span class="blsp-spelling-error" id="SPELLING_ERROR_11">txtemp</span>" <span class="blsp-spelling-error" id="SPELLING_ERROR_12">runat</span>="server" <span class="blsp-spelling-error" id="SPELLING_ERROR_13">autocomplete</span>="off".</em></strong></li><br /><br /><li>Then take a "<span class="blsp-spelling-error" id="SPELLING_ERROR_14">AutoCompleteExtender</span>" For this use fallowing Properties. Ex:</li><br /><br /><li><strong><em><span class="blsp-spelling-error" id="SPELLING_ERROR_15">TargetControlID</span>="<span class="blsp-spelling-error" id="SPELLING_ERROR_16">txtemp</span>"</em></strong></li><br /><br /><li><strong><em><span class="blsp-spelling-error" id="SPELLING_ERROR_17">ServicePath</span>="<span class="blsp-spelling-error" id="SPELLING_ERROR_18">AutoCom</span>.<span class="blsp-spelling-error" id="SPELLING_ERROR_19">asmx</span>"</em></strong></li><br /><br /><li><strong><em><span class="blsp-spelling-error" id="SPELLING_ERROR_20">ServiceMethod</span>="<span class="blsp-spelling-error" id="SPELLING_ERROR_21">GetEmpnames</span>"</em></strong></li><br /><br /><li><strong><em><span class="blsp-spelling-error" id="SPELLING_ERROR_22">MinimumPrefixLength</span>="1" </em></strong></li><br /><br /><li><strong><em><span class="blsp-spelling-error" id="SPELLING_ERROR_23">CompletionInterval</span>="1000"</em></strong></li><br /><br /><li><strong><em><span class="blsp-spelling-error" id="SPELLING_ERROR_24">EnableCaching</span>="true"</em></strong></li><br /><br /><li><span class="blsp-spelling-error" id="SPELLING_ERROR_25">Thts</span> it..for Presentation side.</li><br /><br /><li>Now create a <span class="blsp-spelling-error" id="SPELLING_ERROR_26">Webservice</span>, with name "<span class="blsp-spelling-error" id="SPELLING_ERROR_27">AutoCom</span>.<span class="blsp-spelling-error" id="SPELLING_ERROR_28">asmx</span>". In that one create a method as "<span class="blsp-spelling-error" id="SPELLING_ERROR_29">GetEmpnames</span>".</li><br /><br /><li>In this method we have to write the data access logic. here I used <span class="blsp-spelling-error" id="SPELLING_ERROR_30">Sql</span> Server as Database. Here is my code:</li><br /><br /><li><strong><em>public string[] <span class="blsp-spelling-error" id="SPELLING_ERROR_31">GetEmpnames</span>(string <span class="blsp-spelling-error" id="SPELLING_ERROR_32">prefixText</span>) {</em></strong></li><br /><br /><li><strong><em>Open connection</em></strong></li><br /><br /><li><strong><em><span class="blsp-spelling-error" id="SPELLING_ERROR_33">SqlCommand</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_34">cmd</span> = new <span class="blsp-spelling-error" id="SPELLING_ERROR_35">SqlCommand</span>("select <span class="blsp-spelling-error" id="SPELLING_ERROR_36">EmpName</span> from <span class="blsp-spelling-error" id="SPELLING_ERROR_37">Tbl</span>_<span class="blsp-spelling-error" id="SPELLING_ERROR_38">Emp</span> where <span class="blsp-spelling-error" id="SPELLING_ERROR_39">Empname</span> like '" + <span class="blsp-spelling-error" id="SPELLING_ERROR_40">prefixText</span> + "%'", con);</em></strong></li><br /><br /><li><strong><em><span class="blsp-spelling-error" id="SPELLING_ERROR_41">SqlDataReader</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_42">dr</span>; <span class="blsp-spelling-error" id="SPELLING_ERROR_43">dr</span> = <span class="blsp-spelling-error" id="SPELLING_ERROR_44">cmd</span>.<span class="blsp-spelling-error" id="SPELLING_ERROR_45">ExecuteReader</span>();</em></strong></li><br /><br /><li><strong><em>List<string> items = new List<string>();</em></strong></li><br /><br /><li><strong><em>while (<span class="blsp-spelling-error" id="SPELLING_ERROR_46">dr</span>.Read())</em></strong></li><br /><br /><li><strong><em>{</em></strong></li><br /><br /><li><strong><em>items.Add(dr[0].ToString());</em></strong></li><br /><br /><li><strong><em>}</em></strong></li><br /><br /><li><strong><em>return items.<span class="blsp-spelling-error" id="SPELLING_ERROR_47">ToArray</span>();</em></strong></li><br /><br /><li><strong><em>}</em></strong></li><br /><br /><li>Here is the Screenshot:<br /><p align="center"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6qCCXil5yOW_i-op0w-IwPmFusAdTqNKDwoDDJOZPfMrJf5XFxlTORp2VIsHGNDAlAlAV_d7cfqd_Y_0GAScNqnsOf3HjkrDEOQlsK6c3wMH-S_Dyq8wE-I_izveYkHscrxmFrCcCni4u/s1600-h/auto.jpg"><img id="BLOGGER_PHOTO_ID_5236453561846381986" style="CURSOR: hand" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6qCCXil5yOW_i-op0w-IwPmFusAdTqNKDwoDDJOZPfMrJf5XFxlTORp2VIsHGNDAlAlAV_d7cfqd_Y_0GAScNqnsOf3HjkrDEOQlsK6c3wMH-S_Dyq8wE-I_izveYkHscrxmFrCcCni4u/s320/auto.jpg" border="0" /></a></p><a href="http://www.4shared.com/file/59853917/322af45c/AutoComplete.html" target="_blank">Download Code</a><br /><br /></li></ul><br /><br /><br /><p></p><br /><br /><br /><p></p><br /><br /><br /><p></p><br /><br /><br /><p><span style="font-size:85%;"></span></p><br /><br /><br /><p></p>Ramkyhttp://www.blogger.com/profile/05722860132583858043noreply@blogger.com1