<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7897092287238686391</id><updated>2014-10-27T21:16:36.084-07:00</updated><category term="C#"/><category term="asp.net"/><category term="javascript"/><category term="image"/><category term="Database"/><category term="Email"/><category term="SQL"/><category term="VB"/><category term="CreateUserWizard"/><category term="Decryption"/><category term="Download"/><category term="Encryption"/><category term="GridView"/><category term="PageRefresh"/><category term="basic"/><category term="interview help"/><category term="jQuery"/><category term=".net"/><category term="AJAX"/><category term="APIs"/><category term="Ado.net"/><category term="Array"/><category term="Attachment"/><category term="Auto Refreshing"/><category term="AutoCompleteExtender"/><category term="AutocompleteMode"/><category term="ChartLegend"/><category term="Client Details"/><category term="ComboBoxAutoCompleteMode"/><category term="Connection String"/><category term="Conversion Currency into English Words"/><category term="Count"/><category term="CreateData Table"/><category term="CrosspagePosting"/><category term="DBSPace"/><category term="DataAdapter"/><category term="DataTable"/><category term="Dataset"/><category term="Datatransfercookies"/><category term="Datatransfersession"/><category term="DateTime"/><category term="DeCo"/><category term="Dynamic"/><category term="Export"/><category term="ItBookList"/><category term="MailAttachment"/><category term="Meta Tags"/><category term="Mouse"/><category term="NULLEval"/><category term="Navigation"/><category term="Online"/><category term="ReduceDB"/><category term="ReduceSPace"/><category term="Regular Expression Editing Tips"/><category term="Remotion"/><category term="Resize"/><category term="Rounding Up Issues"/><category term="SQL Rounding Up"/><category term="Save images in Database"/><category term="SendEmail"/><category term="ServerTransfer"/><category term="Stored Procedure"/><category term="SubmitFormMethod"/><category term="TextBoxWidth"/><category term="Time"/><category term="TitleSeparatorColor"/><category term="Update"/><category term="Uploade Binary"/><category term="User"/><category term="VS Regular Expresion"/><category term="Validation"/><category term="Video"/><category term="WebRequest"/><category term="WebService"/><category term="YouTube"/><category term="ads"/><category term="alloweditproperty"/><category term="crystal Report"/><category term="culture"/><category term="dataview"/><category term="drag"/><category term="drop"/><category term="editproperty"/><category term="error"/><category term="favorite"/><category term="form authentication"/><category term="framework 2.0"/><category term="google"/><category term="html"/><category term="press"/><category term="voice recorder"/><category term="window form"/><title type='text'>Dot Da Net</title><subtitle type='html'>Dot net Technology blog. Dot net codes and projects.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://addictdotnet.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://addictdotnet.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Kritika Yadav</name><uri>http://www.blogger.com/profile/11146103502599644895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/-8WzNm9y4lqM/VE8YY51J2EI/AAAAAAAAG0Q/OIY-8zxRIqs/s1600/*'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>75</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7897092287238686391.post-6146500074218875967</id><published>2011-07-06T06:20:00.000-07:00</published><updated>2014-10-27T21:13:09.073-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="alloweditproperty"/><category scheme="http://www.blogger.com/atom/ns#" term="dataview"/><category scheme="http://www.blogger.com/atom/ns#" term="editproperty"/><title type='text'>AllowEdit property</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;u&gt;&lt;b&gt;D&lt;/b&gt;&lt;/u&gt;&lt;b&gt;&lt;u&gt;ataViewAllowEditProperty.aspx&amp;nbsp;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-HLa7EGt4z2A/ThRgpIKCbvI/AAAAAAAAAuQ/hYMVyhPDCJk/s1600/DataViewAllowEditProperty.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-HLa7EGt4z2A/ThRgpIKCbvI/AAAAAAAAAuQ/hYMVyhPDCJk/s320/DataViewAllowEditProperty.gif&quot; height=&quot;182&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-6rYzeyzrxZI/ThRgqoC5l9I/AAAAAAAAAuU/j5iT1ZOYVl0/s1600/DataViewAllowEditProperty1.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-6rYzeyzrxZI/ThRgqoC5l9I/AAAAAAAAAuU/j5iT1ZOYVl0/s320/DataViewAllowEditProperty1.gif&quot; height=&quot;306&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;&lt;u&gt; &lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;%@ Page Language=&quot;C#&quot; AutoEventWireup=&quot;true&quot; %&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;%@ Import Namespace=&quot;System.Data&quot; %&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script runat=&quot;server&quot;&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; protected void Button1_Click(object sender, System.EventArgs e)&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DataTable dt = new DataTable();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dt.TableName = &quot;Books&quot;;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DataColumn dc1 = new DataColumn();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dc1.ColumnName = &quot;BookID&quot;;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dc1.DataType = typeof(int);&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dc1.AllowDBNull = false;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dc1.Unique = true;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DataColumn dc2 = new DataColumn();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dc2.ColumnName = &quot;Category&quot;;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dc2.DataType = typeof(string);&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DataColumn dc3 = new DataColumn();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dc3.ColumnName = &quot;BookName&quot;;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dc3.DataType = typeof(string);&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DataColumn dc4 = new DataColumn();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dc4.ColumnName = &quot;Author&quot;;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dc4.DataType = typeof(string);&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dt.Columns.AddRange(new DataColumn[] { dc1, dc2, dc3, dc4 });&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dt.Rows.Add(new object[] { 1, &quot;.NET&quot;, &quot;ASP.NET 3.5 Application Architecture and Design&quot;, &quot;Vivek Thakur&quot; });&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dt.Rows.Add(new object[] { 2, &quot;Games&quot;, &quot;Cocos2d for iPhone 0.99 Beginner&#39;s Guide&quot;, &quot;Pablo Ruiz&quot; });&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dt.AcceptChanges();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GridView1.DataSource = dt.DefaultView;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GridView1.DataBind();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //this line create a new DataView&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DataView dView = new DataView(dt);&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dView.Sort = &quot;BookName DESC&quot; ;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Label1.Text = &quot;Here we create a new DataView&amp;lt;br /&amp;gt;&quot; +&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;and set the sort order (BookName DESC)&quot;;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GridView2.DataSource = dView;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GridView2.DataBind();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dView.AllowEdit = true;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //this line edit a row in DataView which index is 0&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dView[0][&quot;Category&quot;] = &quot;.NET&quot;;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dView[0][&quot;BookName&quot;] = &quot;Microsoft Windows Workflow Foundation 4.0 Cookbook&quot;;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dView[0][&quot;Author&quot;] = &quot;Andrew Zhu &quot;;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Label2.Text = &quot;Here we edit a row in DataView, Now the DataView is...&quot;;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GridView3.DataSource = dView;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GridView3.DataBind();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Label3.Text = &quot;Now the source DataTable is...&quot;;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GridView4.DataSource = dt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GridView4.DataBind();&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/script&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;head id=&quot;Head1&quot; runat=&quot;server&quot;&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;title&amp;gt;Using AllowEdit property - how to edit update row in a DataView in ado.net&amp;lt;/title&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/head&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;body&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;form id=&quot;form1&quot; runat=&quot;server&quot;&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;h2 style=&quot;color:DarkBlue; font-style:italic;&quot;&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Using AllowEdit property - how to&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;br /&amp;gt; edit update row in a DataView in ado.net&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/h2&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;hr width=&quot;450&quot; align=&quot;left&quot; color=&quot;CornFlowerBlue&quot; /&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;asp:GridView&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID=&quot;GridView1&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; runat=&quot;server&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BorderColor=&quot;Snow&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ForeColor=&quot;Snow&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Width=&quot;700&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Font-Names=&quot;Courier&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;HeaderStyle BackColor=&quot;DarkMagenta&quot; Height=&quot;30&quot; /&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;RowStyle BackColor=&quot;DarkKhaki&quot; /&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;AlternatingRowStyle BackColor=&quot;DarkOliveGreen&quot; /&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/asp:GridView&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;asp:Label&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID=&quot;Label1&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; runat=&quot;server&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Font-Size=&quot;Large&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ForeColor=&quot;DodgerBlue&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Font-Italic=&quot;true&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/asp:Label&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;asp:GridView&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID=&quot;GridView2&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; runat=&quot;server&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BorderColor=&quot;Snow&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ForeColor=&quot;Snow&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Width=&quot;700&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Font-Names=&quot;Courier&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;HeaderStyle BackColor=&quot;Maroon&quot; Height=&quot;30&quot; /&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;RowStyle BackColor=&quot;DarkKhaki&quot; /&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;AlternatingRowStyle BackColor=&quot;DarkOliveGreen&quot; /&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/asp:GridView&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;asp:Label&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID=&quot;Label2&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; runat=&quot;server&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Font-Size=&quot;Large&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ForeColor=&quot;DodgerBlue&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Font-Italic=&quot;true&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/asp:Label&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;asp:GridView&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID=&quot;GridView3&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; runat=&quot;server&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BorderColor=&quot;Snow&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ForeColor=&quot;Snow&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Width=&quot;700&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Font-Names=&quot;Courier&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;HeaderStyle BackColor=&quot;Maroon&quot; Height=&quot;30&quot; /&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;RowStyle BackColor=&quot;DarkKhaki&quot; /&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;AlternatingRowStyle BackColor=&quot;DarkOliveGreen&quot; /&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/asp:GridView&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;asp:Label&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID=&quot;Label3&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; runat=&quot;server&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Font-Size=&quot;Large&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ForeColor=&quot;DodgerBlue&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Font-Italic=&quot;true&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/asp:Label&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;asp:GridView&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID=&quot;GridView4&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; runat=&quot;server&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BorderColor=&quot;Snow&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ForeColor=&quot;Snow&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Width=&quot;700&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Font-Names=&quot;Courier&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;HeaderStyle BackColor=&quot;DarkMagenta&quot; Height=&quot;30&quot; /&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;RowStyle BackColor=&quot;DarkKhaki&quot; /&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;AlternatingRowStyle BackColor=&quot;DarkOliveGreen&quot; /&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/asp:GridView&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;asp:Button&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID=&quot;Button1&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; runat=&quot;server&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OnClick=&quot;Button1_Click&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Text=&quot;Populate GridView&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Height=&quot;45&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Font-Bold=&quot;true&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ForeColor=&quot;DodgerBlue&quot;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/div&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/form&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/body&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/html&amp;gt;&amp;nbsp; &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://addictdotnet.blogspot.com/feeds/6146500074218875967/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7897092287238686391&amp;postID=6146500074218875967&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/6146500074218875967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/6146500074218875967'/><link rel='alternate' type='text/html' href='http://addictdotnet.blogspot.com/2011/07/allowedit-property.html' title='AllowEdit property'/><author><name>Kritika Yadav</name><uri>http://www.blogger.com/profile/11146103502599644895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/-8WzNm9y4lqM/VE8YY51J2EI/AAAAAAAAG0Q/OIY-8zxRIqs/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-HLa7EGt4z2A/ThRgpIKCbvI/AAAAAAAAAuQ/hYMVyhPDCJk/s72-c/DataViewAllowEditProperty.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7897092287238686391.post-4465336899843417823</id><published>2011-05-15T22:14:00.000-07:00</published><updated>2014-10-27T21:16:36.089-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ado.net"/><category scheme="http://www.blogger.com/atom/ns#" term="CreateData Table"/><category scheme="http://www.blogger.com/atom/ns#" term="DataTable"/><title type='text'>DataView ToTable method to create a new DataTable in ado.net</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-wb9JNHCc3aI/TdCyemJ_-BI/AAAAAAAAAtw/ehQ_VE1XnZs/s1600/DataViewToTableMethod.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;http://1.bp.blogspot.com/-wb9JNHCc3aI/TdCyemJ_-BI/AAAAAAAAAtw/ehQ_VE1XnZs/s320/DataViewToTableMethod.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-n5QDLhTJhtY/TdCyf4awrqI/AAAAAAAAAt0/itEXty5PZp8/s1600/DataViewToTableMethod1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;http://2.bp.blogspot.com/-n5QDLhTJhtY/TdCyf4awrqI/AAAAAAAAAt0/itEXty5PZp8/s320/DataViewToTableMethod1.png&quot; width=&quot;282&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&lt;b&gt;&lt;u&gt;DataViewToTableMethod.aspx&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;lt;%@ Page Language=&quot;C#&quot; AutoEventWireup=&quot;true&quot; %&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;lt;%@ Import Namespace=&quot;System.Data&quot; %&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;lt;script runat=&quot;server&quot;&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; protected void Button1_Click(object sender, System.EventArgs e) &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; { &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DataTable dt = new DataTable(); &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dt.TableName = &quot;Books&quot;; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DataColumn dc1 = new DataColumn(); &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dc1.ColumnName = &quot;BookID&quot;; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dc1.DataType = typeof(int); &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dc1.AllowDBNull = false; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dc1.Unique = true; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DataColumn dc2 = new DataColumn(); &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dc2.ColumnName = &quot;Category&quot;; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dc2.DataType = typeof(string); &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DataColumn dc3 = new DataColumn(); &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dc3.ColumnName = &quot;BookName&quot;; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dc3.DataType = typeof(string); &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DataColumn dc4 = new DataColumn(); &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dc4.ColumnName = &quot;Author&quot;; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dc4.DataType = typeof(string); &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dt.Columns.AddRange(new DataColumn[] { dc1, dc2, dc3, dc4 }); &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dt.Rows.Add(new object[] { 1, &quot;iPhone&quot;, &quot;iPhone User Interface Cookbook: RAW&quot;, &quot;Cameron Banga&quot; }); &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dt.Rows.Add(new object[] { 2, &quot;MySQL&quot;, &quot;MySQL 5.1 Plugin Development&quot;, &quot;Andrew Hutchings, Sergei Golubchik&quot; }); &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dt.Rows.Add(new object[] { 3, &quot;MySQL&quot;, &quot;MySQL Admin Cookbook&quot;, &quot;Daniel Schneller, Udo Schwedt&quot; }); &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dt.AcceptChanges(); &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Label1.Text = &quot;Source DataTable&quot;; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GridView1.DataSource = dt.DefaultView; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GridView1.DataBind(); &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //this line create a new DataView &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DataView dView = new DataView(dt); &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dView.RowFilter = &quot;Category = &#39;MySQL&#39;&quot;; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Label2.Text = &quot;Here we create a new DataView&amp;lt;br /&amp;gt;&quot; + &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;and set the RowFilter (Category = &#39;MySQL&#39;)&quot;; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GridView2.DataSource = dView; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GridView2.DataBind(); &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //this line create a new DataTable from DataView &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DataTable dt2 = dView.ToTable(); &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Label3.Text = &quot;Here we create a new DataTable from DataView&quot;; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GridView3.DataSource = dt2; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GridView3.DataBind(); &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; } &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;lt;/script&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;lt;head id=&quot;Head1&quot; runat=&quot;server&quot;&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;title&amp;gt;How to use DataView ToTable method to create a new DataTable in ado.net&amp;lt;/title&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;lt;/head&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;lt;body&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;form id=&quot;form1&quot; runat=&quot;server&quot;&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;div&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;h2 style=&quot;color:DarkBlue; font-style:italic;&quot;&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; How to use DataView ToTable method &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;br /&amp;gt; to create a new DataTable in ado.net &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/h2&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;hr width=&quot;450&quot; align=&quot;left&quot; color=&quot;CornFlowerBlue&quot; /&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;asp:Label &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ID=&quot;Label1&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;runat=&quot;server&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Font-Size=&quot;Large&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ForeColor=&quot;DodgerBlue&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Font-Italic=&quot;true&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/asp:Label&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;asp:GridView &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ID=&quot;GridView1&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; runat=&quot;server&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BorderColor=&quot;Snow&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ForeColor=&quot;Snow&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Width=&quot;600&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Font-Names=&quot;Courier&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;HeaderStyle BackColor=&quot;DarkSlateBlue&quot; Height=&quot;30&quot; /&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;RowStyle BackColor=&quot;MediumVioletRed&quot; /&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;AlternatingRowStyle BackColor=&quot;PaleVioletRed&quot; /&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/asp:GridView&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;br /&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;asp:Label &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ID=&quot;Label2&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;runat=&quot;server&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Font-Size=&quot;Large&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ForeColor=&quot;DodgerBlue&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Font-Italic=&quot;true&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/asp:Label&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;asp:GridView &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ID=&quot;GridView2&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; runat=&quot;server&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BorderColor=&quot;Snow&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ForeColor=&quot;Snow&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Width=&quot;600&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Font-Names=&quot;Courier&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;HeaderStyle BackColor=&quot;DarkSlateBlue&quot; Height=&quot;30&quot; /&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;RowStyle BackColor=&quot;MediumVioletRed&quot; /&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;AlternatingRowStyle BackColor=&quot;PaleVioletRed&quot; /&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/asp:GridView&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;br /&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;asp:Label &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ID=&quot;Label3&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;runat=&quot;server&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Font-Size=&quot;Large&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ForeColor=&quot;DodgerBlue&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Font-Italic=&quot;true&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/asp:Label&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;asp:GridView &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ID=&quot;GridView3&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; runat=&quot;server&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BorderColor=&quot;Snow&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ForeColor=&quot;Snow&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Width=&quot;600&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Font-Names=&quot;Courier&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;HeaderStyle BackColor=&quot;DarkSlateBlue&quot; Height=&quot;30&quot; /&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;RowStyle BackColor=&quot;MediumVioletRed&quot; /&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;AlternatingRowStyle BackColor=&quot;PaleVioletRed&quot; /&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/asp:GridView&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;asp:Button &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ID=&quot;Button1&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; runat=&quot;server&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; OnClick=&quot;Button1_Click&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Text=&quot;Populate GridView&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Height=&quot;45&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Font-Bold=&quot;true&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ForeColor=&quot;DodgerBlue&quot; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/form&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;lt;/body&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif;&quot;&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://addictdotnet.blogspot.com/feeds/4465336899843417823/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7897092287238686391&amp;postID=4465336899843417823&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/4465336899843417823'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/4465336899843417823'/><link rel='alternate' type='text/html' href='http://addictdotnet.blogspot.com/2011/05/dataview-totable-method-to-create-new.html' title='DataView ToTable method to create a new DataTable in ado.net'/><author><name>Kritika Yadav</name><uri>http://www.blogger.com/profile/11146103502599644895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/-8WzNm9y4lqM/VE8YY51J2EI/AAAAAAAAG0Q/OIY-8zxRIqs/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-wb9JNHCc3aI/TdCyemJ_-BI/AAAAAAAAAtw/ehQ_VE1XnZs/s72-c/DataViewToTableMethod.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7897092287238686391.post-8357859589074080924</id><published>2011-04-13T01:10:00.000-07:00</published><updated>2011-04-13T01:10:58.938-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DBSPace"/><category scheme="http://www.blogger.com/atom/ns#" term="ReduceDB"/><category scheme="http://www.blogger.com/atom/ns#" term="ReduceSPace"/><title type='text'>Reduce DB Space</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 16px;&quot;&gt;&lt;b&gt;&lt;u&gt;SpreadsheetGear: ASP.NET Excel Reporting&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;  &lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-bidi-font-weight: bold; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Easily create richly formatted Excel reports without Excel using the new generation of spreadsheet technology built from the ground up for scalability and reliability. Recently I have delete 2 million unwanted records from my sql server database table, what i realise is even after deleting records, space used by database is not reducing.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-bidi-font-weight: bold; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1) Whenever we delete records from table, sql server doesn&#39;t reduce size of database immediately.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-bidi-font-weight: bold; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2) Even after deleting table , sql server doesn&#39;t reduce size of database.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-bidi-font-weight: bold; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;3) Instead of Freeing space for deleted records, sql server marks pages containing deleted records as free pages, showing that they belong to the table. When new data are inserted, they are put into those pages first. Once those pages are filled up, SQL Server will allocate new pages.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-bidi-font-weight: bold; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;So In order to claim database space after deleting records in Table, go through following steps:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0.0001pt; text-indent: -0.25in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 13.5pt; mso-bidi-font-weight: bold; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1)&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 7.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 13.5pt; mso-bidi-font-weight: bold; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Check what is Size of your Database using following command?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 13.5pt; mso-bidi-font-weight: bold; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Exec sp_spaceused&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-bidi-font-weight: bold; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;2) Delete Records from table, If you have already did that skip this step.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-bidi-font-weight: bold; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;3) Run below command to claim unused database space.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0.0001pt; text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-bidi-font-weight: bold; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;DBCC SHRINKDATABASE(0)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0.0001pt; text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-bidi-font-weight: bold; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;DBCC SHRINKDATABASE command - Shrinks the size of the data and log files in the specified database.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-bidi-font-weight: bold; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Best Practise to use this command&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-bidi-font-weight: bold; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;A shrink operation is most effective after an operation that creates lots of unused space, such as a truncate table or a drop table operation.Most databases require some free space to be available for regular day-to-day operations. If you shrink a database repeatedly and notice that the database size grows again, this indicates that the space that was shrunk is required for regular operations. In these cases, repeatedly shrinking the database is a wasted operation.A shrink operation does not preserve the fragmentation state of indexes in the database, and generally increases fragmentation to a degree. This is another reason not to repeatedly shrink the database.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-bidi-font-weight: bold; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;If you have Created, Alter or Drop any Database table recently then run below command.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-bidi-font-weight: bold; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;DBCC UPDATEUSAGE(0)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-bidi-font-weight: bold; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;DBCC UPDATEUSAGE(0) - Reports and corrects pages and row count inaccuracies in the catalog views. These inaccuracies may cause incorrect space usage reports returned by the sp_spaceused system stored procedure.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-bidi-font-weight: bold; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Example showing how this command helps me to reduce size of my database after deleting records from table.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-bidi-font-weight: bold; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1) Take Backup of your Production Database.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-bidi-font-weight: bold; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2) Take Backup of Table Scripts of your Production Database.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-bidi-font-weight: bold; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;3) Create Test Database in Local Environment.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-bidi-font-weight: bold; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;4) Run Tables creation script.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-bidi-font-weight: bold; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;5) Restore Production Database to Test Database in local environment&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-bidi-font-weight: bold; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;6) Check Size of your Database&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-bidi-font-weight: bold; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Exec sp_spaceused&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-N-j-l8zU0DQ/TaVZLAsmBdI/AAAAAAAAAtI/Hax8-F6DXKY/s1600/SQL1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;201&quot; src=&quot;http://4.bp.blogspot.com/-N-j-l8zU0DQ/TaVZLAsmBdI/AAAAAAAAAtI/Hax8-F6DXKY/s320/SQL1.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;7) Run Update Usage command&lt;br /&gt;DBCC UPDATEUSAGE(0)&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-qArNjcoId1U/TaVZmaJjlTI/AAAAAAAAAtU/Jx9mofNAxTw/s1600/SQL2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;250&quot; src=&quot;http://4.bp.blogspot.com/-qArNjcoId1U/TaVZmaJjlTI/AAAAAAAAAtU/Jx9mofNAxTw/s320/SQL2.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-bidi-font-weight: bold; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt;&amp;nbsp;8&lt;/o:p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;) Check Size of your Database&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;Exec sp_spaceused&lt;/span&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-zNV_8fYzeGA/TaVZwhVBPkI/AAAAAAAAAtc/pzlvv7mVAnY/s1600/SQL3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;195&quot; src=&quot;http://1.bp.blogspot.com/-zNV_8fYzeGA/TaVZwhVBPkI/AAAAAAAAAtc/pzlvv7mVAnY/s320/SQL3.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;9)&amp;nbsp;Run Shrink Database command&lt;br /&gt;DBCC SHRINKDATABASE(0)&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-wWOvyv16P0I/TaVaPwc1n1I/AAAAAAAAAto/SRSylsw_NbA/s1600/SQL4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;165&quot; src=&quot;http://2.bp.blogspot.com/-wWOvyv16P0I/TaVaPwc1n1I/AAAAAAAAAto/SRSylsw_NbA/s320/SQL4.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;10) Check Size of your Database&lt;br /&gt;Exec sp_spaceused&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-9lBpZO7QN8w/TaVaQgax6PI/AAAAAAAAAts/RNOI8pCYjDo/s1600/SQL5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;188&quot; src=&quot;http://4.bp.blogspot.com/-9lBpZO7QN8w/TaVaQgax6PI/AAAAAAAAAts/RNOI8pCYjDo/s320/SQL5.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;If everything goes smooth then you would see that your database size is reduced.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://addictdotnet.blogspot.com/feeds/8357859589074080924/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7897092287238686391&amp;postID=8357859589074080924&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/8357859589074080924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/8357859589074080924'/><link rel='alternate' type='text/html' href='http://addictdotnet.blogspot.com/2011/04/reduce-db-space.html' title='Reduce DB Space'/><author><name>Kritika Yadav</name><uri>http://www.blogger.com/profile/11146103502599644895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/-8WzNm9y4lqM/VE8YY51J2EI/AAAAAAAAG0Q/OIY-8zxRIqs/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-N-j-l8zU0DQ/TaVZLAsmBdI/AAAAAAAAAtI/Hax8-F6DXKY/s72-c/SQL1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7897092287238686391.post-5696014571113281946</id><published>2011-04-07T11:34:00.000-07:00</published><updated>2014-10-27T21:16:36.093-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ChartLegend"/><category scheme="http://www.blogger.com/atom/ns#" term="TitleSeparatorColor"/><title type='text'>How to set change Chart Legend TitleSeparatorColor programmatically in asp.net</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-_477R2s9oL8/TZ4Dhf7uvEI/AAAAAAAAAs4/1-8yvs7dNjY/s1600/ChartLegendTitleSeparatorColor.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-_477R2s9oL8/TZ4Dhf7uvEI/AAAAAAAAAs4/1-8yvs7dNjY/s1600/ChartLegendTitleSeparatorColor.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-jFRSDmQBOl8/TZ4DiX-nV2I/AAAAAAAAAs8/fvv3xuSCqxE/s1600/ChartLegendTitleSeparatorColor1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-jFRSDmQBOl8/TZ4DiX-nV2I/AAAAAAAAAs8/fvv3xuSCqxE/s1600/ChartLegendTitleSeparatorColor1.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; line-height: 20px;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; line-height: 20px;&quot;&gt;&lt;b&gt;&lt;u&gt;ChartLegendTitleSeparatorColor.aspx&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;lt;%@ Page Language=&quot;C#&quot; AutoEventWireup=&quot;true&quot; %&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;lt;script runat=&quot;server&quot;&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;protected void Button1_Click(object sender, System.EventArgs e) &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;{ &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Chart1.Legends[&quot;Legend1&quot;].TitleSeparatorColor = System.Drawing.Color.BlanchedAlmond; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;} &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;lt;/script&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;lt;head id=&quot;Head1&quot; runat=&quot;server&quot;&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;title&amp;gt;How to set change Chart Legend TitleSeparatorColor programmatically in asp.net&amp;lt;/title&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;style type=&quot;text/css&quot;&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;h2 &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{ &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;color:Crimson; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;font-style:italic; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/style&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;lt;/head&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;lt;body&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;form id=&quot;form1&quot; runat=&quot;server&quot;&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;div&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;h2&amp;gt;Chart example and tutorial: How to set change Chart Legend&amp;lt;br /&amp;gt; TitleSeparatorColor programmatically in asp.net&amp;lt;/h2&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;hr width=&quot;625&quot; align=&quot;left&quot; color=&quot;IndianRed&quot; /&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;br /&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;asp:Chart &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ID=&quot;Chart1&quot; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;runat=&quot;server&quot; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Width=&quot;625&quot; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;BackColor=&quot;DarkCyan&quot; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;BorderlineColor=&quot;AliceBlue&quot; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;BorderlineDashStyle=&quot;Solid&quot; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;BorderlineWidth=&quot;2&quot; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Legends&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;asp:Legend &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Name=&quot;Legend1&quot; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;BackColor=&quot;DodgerBlue&quot; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ForeColor=&quot;Snow&quot; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;BorderColor=&quot;MidnightBlue&quot; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Docking=&quot;Right&quot; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TableStyle=&quot;Wide&quot; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Title=&quot;Nokia Phone Legend&quot; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TitleForeColor=&quot;Snow&quot; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TitleSeparator=&quot;DoubleLine&quot; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/asp:Legend&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/Legends&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Series&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;asp:Series &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Name=&quot;NokiaPhone&quot; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;YValueType=&quot;Double&quot; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ChartArea=&quot;DefaultChartArea&quot; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ChartType=&quot;Pyramid&quot; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Palette=&quot;Excel&quot; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Points&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;asp:DataPoint AxisLabel=&quot;Nokia N8&quot; YValues=&quot;549&quot; /&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;asp:DataPoint AxisLabel=&quot;Nokia N97 Mini Driver Ed.&quot; YValues=&quot;399.99&quot; /&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;asp:DataPoint AxisLabel=&quot;Nokia E72 Driver Edition&quot; YValues=&quot;349&quot; /&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;asp:DataPoint AxisLabel=&quot;X6 16GB Driver Edition&quot; YValues=&quot;329&quot; /&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;asp:DataPoint AxisLabel=&quot;Nokia C6&quot; YValues=&quot;309&quot; /&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;asp:DataPoint AxisLabel=&quot;Nokia 5800 Driver Edition&quot; YValues=&quot;289&quot; /&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/Points&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/asp:Series&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/Series&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;ChartAreas&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;asp:ChartArea &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Name=&quot;DefaultChartArea&quot; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;BorderDashStyle=&quot;Solid&quot; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;BorderWidth=&quot;2&quot; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;BorderColor=&quot;OliveDrab&quot; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;BackColor=&quot;DarkOliveGreen&quot; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Area3DStyle Enable3D=&quot;true&quot; LightStyle=&quot;Realistic&quot; /&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/asp:ChartArea&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/ChartAreas&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/asp:Chart&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;br /&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;asp:Button &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ID=&quot;Button1&quot; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;runat=&quot;server&quot; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Text=&quot;Set Chart Legend TitleSeparatorColor BlanchedAlmond&quot; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Font-Bold=&quot;true&quot; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;OnClick=&quot;Button1_Click&quot; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ForeColor=&quot;DarkBlue&quot; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Height=&quot;45&quot; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/div&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/form&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;lt;/body&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: x-small;&quot;&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://addictdotnet.blogspot.com/feeds/5696014571113281946/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7897092287238686391&amp;postID=5696014571113281946&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/5696014571113281946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/5696014571113281946'/><link rel='alternate' type='text/html' href='http://addictdotnet.blogspot.com/2011/04/how-to-set-change-chart-legend.html' title='How to set change Chart Legend TitleSeparatorColor programmatically in asp.net'/><author><name>Kritika Yadav</name><uri>http://www.blogger.com/profile/11146103502599644895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/-8WzNm9y4lqM/VE8YY51J2EI/AAAAAAAAG0Q/OIY-8zxRIqs/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-_477R2s9oL8/TZ4Dhf7uvEI/AAAAAAAAAs4/1-8yvs7dNjY/s72-c/ChartLegendTitleSeparatorColor.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7897092287238686391.post-3930323470155322529</id><published>2011-02-25T09:26:00.000-08:00</published><updated>2011-02-25T09:26:42.656-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AutocompleteMode"/><category scheme="http://www.blogger.com/atom/ns#" term="ComboBoxAutoCompleteMode"/><title type='text'>Using ComboBox AutoCompleteMode SuggestAppend in asp.net</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-BpjkTjTQql4/TWfmFgRXM1I/AAAAAAAAAmA/EjSx3RdjG8g/s1600/ComboBoxAutoCompleteModeSuggestAppend.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;175&quot; src=&quot;http://4.bp.blogspot.com/-BpjkTjTQql4/TWfmFgRXM1I/AAAAAAAAAmA/EjSx3RdjG8g/s320/ComboBoxAutoCompleteModeSuggestAppend.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-7Ae460ZNKWI/TWfmGSYhIgI/AAAAAAAAAmE/eF4Tv3d9pJ4/s1600/ComboBoxAutoCompleteModeSuggestAppend1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;227&quot; src=&quot;http://1.bp.blogspot.com/-7Ae460ZNKWI/TWfmGSYhIgI/AAAAAAAAAmE/eF4Tv3d9pJ4/s320/ComboBoxAutoCompleteModeSuggestAppend1.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-WVpfysU2K7A/TWfmG4TcF-I/AAAAAAAAAmI/v5EPa2y0hG4/s1600/ComboBoxAutoCompleteModeSuggestAppend2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;222&quot; src=&quot;http://2.bp.blogspot.com/-WVpfysU2K7A/TWfmG4TcF-I/AAAAAAAAAmI/v5EPa2y0hG4/s320/ComboBoxAutoCompleteModeSuggestAppend2.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-wVoHvV1gkSw/TWfmHg06OrI/AAAAAAAAAmM/oDyrV-G5Po8/s1600/ComboBoxAutoCompleteModeSuggestAppend3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;181&quot; src=&quot;http://2.bp.blogspot.com/-wVoHvV1gkSw/TWfmHg06OrI/AAAAAAAAAmM/oDyrV-G5Po8/s320/ComboBoxAutoCompleteModeSuggestAppend3.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif; font-size: 13px; font-weight: bold;&quot;&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Palatino Linotype&#39;, &#39;Book Antiqua&#39;, Palatino, serif; font-size: 13px; font-weight: bold;&quot;&gt;&lt;u&gt;ComboBoxAutoCompleteModeSuggestAppend.aspx&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;&amp;lt;%@ Page Language=&quot;C#&quot; AutoEventWireup=&quot;true&quot; %&amp;gt; &lt;br /&gt;&amp;lt;%@ Register Assembly=&quot;AjaxControlToolkit&quot; Namespace=&quot;AjaxControlToolkit&quot; TagPrefix=&quot;asp&quot; %&amp;gt; &lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;lt;script runat=&quot;server&quot;&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;protected void ComboBox1_SelectedIndexChanged(object sender, EventArgs e) &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;{ &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Label1.Text = &quot;You choose: &quot; + ComboBox1.SelectedItem.Text; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;} &lt;br /&gt;&amp;lt;/script&amp;gt; &lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&amp;gt; &lt;br /&gt;&amp;lt;head id=&quot;Head1&quot; runat=&quot;server&quot;&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;title&amp;gt;Ajax ComboBox - Using ComboBox AutoCompleteMode SuggestAppend in asp.net&amp;lt;/title&amp;gt; &lt;br /&gt;&amp;lt;/head&amp;gt; &lt;br /&gt;&amp;lt;body&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;form id=&quot;form1&quot; runat=&quot;server&quot;&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;div&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;h2 style=&quot;color:DarkBlue; font-style:italic;&quot;&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ASP.NET Ajax ComboBox - Using ComboBox &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;br /&amp;gt; AutoCompleteMode SuggestAppend in asp.net &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/h2&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;hr width=&quot;500&quot; align=&quot;left&quot; color=&quot;LightBlue&quot; /&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;asp:ToolkitScriptManager ID=&quot;ToolkitScriptManager1&quot; runat=&quot;server&quot;&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/asp:ToolkitScriptManager&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;asp:Label &amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ID=&quot;Label1&quot; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;runat=&quot;server&quot; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Font-Size=&quot;X-Large&quot; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ForeColor=&quot;Green&quot; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Font-Italic=&quot;true&quot; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Font-Underline=&quot;true&quot; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/asp:Label&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;asp:ComboBox &amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ID=&quot;ComboBox1&quot; &amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;runat=&quot;server&quot; &amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DropDownStyle=&quot;DropDown&quot; &amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AutoCompleteMode=&quot;SuggestAppend&quot; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CaseSensitive=&quot;false&quot; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;RenderMode=&quot;Block&quot; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AutoPostBack=&quot;true&quot; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Font-Names=&quot;Comic Sans MS&quot; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Font-Size=&quot;X-Large&quot; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;OnSelectedIndexChanged=&quot;ComboBox1_SelectedIndexChanged&quot; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ForeColor=&quot;Red&quot; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;asp:ListItem Text=&quot;SaddleBrown&quot;&amp;gt;&amp;lt;/asp:ListItem&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;asp:ListItem Text=&quot;Black&quot;&amp;gt;&amp;lt;/asp:ListItem&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;asp:ListItem Text=&quot;Magenta&quot;&amp;gt;&amp;lt;/asp:ListItem&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;asp:ListItem Text=&quot;Blue&quot;&amp;gt;&amp;lt;/asp:ListItem&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;asp:ListItem Text=&quot;Violet&quot;&amp;gt;&amp;lt;/asp:ListItem&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;asp:ListItem Text=&quot;BlueViolet&quot;&amp;gt;&amp;lt;/asp:ListItem&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/asp:ComboBox&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/div&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/form&amp;gt; &lt;br /&gt;&amp;lt;/body&amp;gt; &lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://addictdotnet.blogspot.com/feeds/3930323470155322529/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7897092287238686391&amp;postID=3930323470155322529&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/3930323470155322529'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/3930323470155322529'/><link rel='alternate' type='text/html' href='http://addictdotnet.blogspot.com/2011/02/using-combobox-autocompletemode_25.html' title='Using ComboBox AutoCompleteMode SuggestAppend in asp.net'/><author><name>Kritika Yadav</name><uri>http://www.blogger.com/profile/11146103502599644895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/-8WzNm9y4lqM/VE8YY51J2EI/AAAAAAAAG0Q/OIY-8zxRIqs/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-BpjkTjTQql4/TWfmFgRXM1I/AAAAAAAAAmA/EjSx3RdjG8g/s72-c/ComboBoxAutoCompleteModeSuggestAppend.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7897092287238686391.post-2956956803478216528</id><published>2011-02-24T00:20:00.001-08:00</published><updated>2011-02-24T00:21:21.080-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Conversion Currency into English Words"/><title type='text'>Conversion from Currency into English Words</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #110000; font-family: Helvetica, Arial, Verdana, Monaco, Times; font-size: 10px; line-height: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-6Xgd8_D6qzo/TWYU-FtFa3I/AAAAAAAAAkQ/v5_5nl1DHjI/s1600/Currency+into+Words.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-6Xgd8_D6qzo/TWYU-FtFa3I/AAAAAAAAAkQ/v5_5nl1DHjI/s1600/Currency+into+Words.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;pre class=&quot;vb&quot; style=&quot;clear: none; font-family: monospace; font-size: 12px; line-height: 1.333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: visible; overflow-y: visible; white-space: pre; width: auto;&quot;&gt;&lt;span style=&quot;color: navy;&quot;&gt;Function&lt;/span&gt; Dollars(&lt;span style=&quot;color: navy;&quot;&gt;ByVal&lt;/span&gt; amount &lt;span style=&quot;color: navy;&quot;&gt;As&lt;/span&gt; Decimal, _&lt;span style=&quot;color: navy;&quot;&gt;Optional&lt;/span&gt; &lt;span style=&quot;color: navy;&quot;&gt;ByVal&lt;/span&gt; EmptyStringIfZero &lt;span style=&quot;color: navy;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: navy;&quot;&gt;Boolean&lt;/span&gt; = &lt;span style=&quot;color: navy;&quot;&gt;True&lt;/span&gt;) &lt;span style=&quot;color: navy;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: navy;&quot;&gt;String&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: navy;&quot;&gt;Dim&lt;/span&gt; result &lt;span style=&quot;color: navy;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: navy;&quot;&gt;String&lt;/span&gt; = &lt;span style=&quot;color: navy;&quot;&gt;String&lt;/span&gt;.Empty&lt;br /&gt;&lt;span style=&quot;color: navy;&quot;&gt;Select&lt;/span&gt; &lt;span style=&quot;color: navy;&quot;&gt;Case&lt;/span&gt; amount&lt;br /&gt;&lt;span style=&quot;color: navy;&quot;&gt;Case&lt;/span&gt; 0&lt;br /&gt;       result = &lt;span style=&quot;color: navy;&quot;&gt;If&lt;/span&gt;(EmptyStringIfZero, &lt;span style=&quot;color: navy;&quot;&gt;String&lt;/span&gt;.Empty, &lt;span style=&quot;color: maroon;&quot;&gt;&quot;Zero &quot;&lt;/span&gt;)&lt;br /&gt;&lt;span style=&quot;color: navy;&quot;&gt;Case&lt;/span&gt; 1 &lt;span style=&quot;color: navy;&quot;&gt;To&lt;/span&gt; 19&lt;br /&gt;       result = Choose(amount, &lt;span style=&quot;color: maroon;&quot;&gt;&quot;One &quot;&lt;/span&gt;, &lt;span style=&quot;color: maroon;&quot;&gt;&quot;Two &quot;&lt;/span&gt;, &lt;span style=&quot;color: maroon;&quot;&gt;&quot;Three &quot;&lt;/span&gt;, &lt;span style=&quot;color: maroon;&quot;&gt;&quot;Four &quot;&lt;/span&gt;, _&lt;br /&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;Five &quot;&lt;/span&gt;, &lt;span style=&quot;color: maroon;&quot;&gt;&quot;Six &quot;&lt;/span&gt;, &lt;span style=&quot;color: maroon;&quot;&gt;&quot;Seven &quot;&lt;/span&gt;, &lt;span style=&quot;color: maroon;&quot;&gt;&quot;Eight &quot;&lt;/span&gt;, &lt;span style=&quot;color: maroon;&quot;&gt;&quot;Nine &quot;&lt;/span&gt;, &lt;span style=&quot;color: maroon;&quot;&gt;&quot;Ten &quot;&lt;/span&gt;, &lt;span style=&quot;color: maroon;&quot;&gt;&quot;Eleven &quot;&lt;/span&gt;, _&lt;br /&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;Twelve &quot;&lt;/span&gt;, &lt;span style=&quot;color: maroon;&quot;&gt;&quot;Thirteen &quot;&lt;/span&gt;, &lt;span style=&quot;color: maroon;&quot;&gt;&quot;Fourteen &quot;&lt;/span&gt;, &lt;span style=&quot;color: maroon;&quot;&gt;&quot;Fifteen &quot;&lt;/span&gt;, &lt;span style=&quot;color: maroon;&quot;&gt;&quot;Sixteen &quot;&lt;/span&gt;, _&lt;br /&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;Seventeen &quot;&lt;/span&gt;, &lt;span style=&quot;color: maroon;&quot;&gt;&quot;Eighteen &quot;&lt;/span&gt;, &lt;span style=&quot;color: maroon;&quot;&gt;&quot;Nineteen &quot;&lt;/span&gt;)&lt;br /&gt;&lt;span style=&quot;color: navy;&quot;&gt;Case&lt;/span&gt; 20 &lt;span style=&quot;color: navy;&quot;&gt;To&lt;/span&gt; 99&lt;br /&gt;       result = Choose(amount \ 10 - 1, &lt;span style=&quot;color: maroon;&quot;&gt;&quot;Twenty &quot;&lt;/span&gt;, &lt;span style=&quot;color: maroon;&quot;&gt;&quot;Thirty &quot;&lt;/span&gt;, _&lt;br /&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;Fourty &quot;&lt;/span&gt;, &lt;span style=&quot;color: maroon;&quot;&gt;&quot;Fifty &quot;&lt;/span&gt;, &lt;span style=&quot;color: maroon;&quot;&gt;&quot;Sixty &quot;&lt;/span&gt;, &lt;span style=&quot;color: maroon;&quot;&gt;&quot;Seventy &quot;&lt;/span&gt;, &lt;span style=&quot;color: maroon;&quot;&gt;&quot;Eighty &quot;&lt;/span&gt;, _&lt;br /&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;Ninety &quot;&lt;/span&gt;) &amp;amp; Dollars(amount &lt;span style=&quot;color: navy;&quot;&gt;Mod&lt;/span&gt; 10)&lt;br /&gt;&lt;span style=&quot;color: navy;&quot;&gt;Case&lt;/span&gt; 100 &lt;span style=&quot;color: navy;&quot;&gt;To&lt;/span&gt; 999&lt;br /&gt;         result = Dollars(amount \ 100) &amp;amp; &lt;span style=&quot;color: maroon;&quot;&gt;&quot;Hundred&quot;&lt;/span&gt; &amp;amp; IIf _&lt;br /&gt;(amount &amp;gt;= 200, &lt;span style=&quot;color: maroon;&quot;&gt;&quot;s &quot;&lt;/span&gt;, &lt;span style=&quot;color: maroon;&quot;&gt;&quot; &quot;&lt;/span&gt;) &amp;amp; Dollars(amount &lt;span style=&quot;color: navy;&quot;&gt;Mod&lt;/span&gt; 100)&lt;br /&gt;&lt;span style=&quot;color: navy;&quot;&gt;Case&lt;/span&gt; 1000 &lt;span style=&quot;color: navy;&quot;&gt;To&lt;/span&gt; 999999&lt;br /&gt;         result = Dollars(amount \ 1000) &amp;amp; &lt;span style=&quot;color: maroon;&quot;&gt;&quot;Thousand&quot;&lt;/span&gt; &amp;amp; IIf _&lt;br /&gt;(amount &amp;gt;= 2000, &lt;span style=&quot;color: maroon;&quot;&gt;&quot;s &quot;&lt;/span&gt;, &lt;span style=&quot;color: maroon;&quot;&gt;&quot; &quot;&lt;/span&gt;) &amp;amp; Dollars(amount &lt;span style=&quot;color: navy;&quot;&gt;Mod&lt;/span&gt; 1000)&lt;br /&gt;&lt;span style=&quot;color: navy;&quot;&gt;Case&lt;/span&gt; 1000000 &lt;span style=&quot;color: navy;&quot;&gt;To&lt;/span&gt; 999999999&lt;br /&gt;         result = Dollars(amount \ 1000000) &amp;amp; &lt;span style=&quot;color: maroon;&quot;&gt;&quot;Million&quot;&lt;/span&gt; &amp;amp; IIf _&lt;br /&gt;(amount &amp;gt;= 2000000, &lt;span style=&quot;color: maroon;&quot;&gt;&quot;s &quot;&lt;/span&gt;, &lt;span style=&quot;color: maroon;&quot;&gt;&quot; &quot;&lt;/span&gt;) &amp;amp; Dollars(amount &lt;span style=&quot;color: navy;&quot;&gt;Mod&lt;/span&gt; 1000000)&lt;br /&gt;&lt;span style=&quot;color: navy;&quot;&gt;Case&lt;/span&gt; &lt;span style=&quot;color: navy;&quot;&gt;Is&lt;/span&gt; &amp;gt;= 1000000000&lt;br /&gt;         result = Dollars(amount \ 1000000000) &amp;amp; &lt;span style=&quot;color: maroon;&quot;&gt;&quot;Billion&quot;&lt;/span&gt; &amp;amp; _&lt;br /&gt;IIf(amount &amp;gt;= 2000000000, &lt;span style=&quot;color: maroon;&quot;&gt;&quot;s&quot;&lt;/span&gt;, &lt;span style=&quot;color: maroon;&quot;&gt;&quot; &quot;&lt;/span&gt;) &amp;amp; Dollars(amount &lt;span style=&quot;color: navy;&quot;&gt;Mod&lt;/span&gt; 1000000000)&lt;br /&gt;&lt;span style=&quot;color: navy;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: navy;&quot;&gt;Select&lt;/span&gt;&lt;br /&gt;Return result&lt;br /&gt;&lt;span style=&quot;color: navy;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: navy;&quot;&gt;Function&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span style=&quot;color: navy;&quot;&gt;Public&lt;/span&gt; &lt;span style=&quot;color: navy;&quot;&gt;Function&lt;/span&gt; Cents(&lt;span style=&quot;color: navy;&quot;&gt;ByVal&lt;/span&gt; amount &lt;span style=&quot;color: navy;&quot;&gt;As&lt;/span&gt; Decimal) &lt;span style=&quot;color: navy;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: navy;&quot;&gt;String&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: navy;&quot;&gt;Dim&lt;/span&gt; result &lt;span style=&quot;color: navy;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: navy;&quot;&gt;String&lt;/span&gt; = amount.ToString&lt;br /&gt;&lt;span style=&quot;color: navy;&quot;&gt;If&lt;/span&gt; result.Contains(&lt;span style=&quot;color: maroon;&quot;&gt;&quot;.&quot;&lt;/span&gt;c) &lt;span style=&quot;color: navy;&quot;&gt;Then&lt;/span&gt;&lt;br /&gt;      result = result.Substring(result.IndexOf(&lt;span style=&quot;color: maroon;&quot;&gt;&quot;.&quot;&lt;/span&gt;c) + 1)&lt;br /&gt;&lt;span style=&quot;color: navy;&quot;&gt;Else&lt;/span&gt;&lt;br /&gt;      result = &lt;span style=&quot;color: maroon;&quot;&gt;&quot;00&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: navy;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: navy;&quot;&gt;If&lt;/span&gt;&lt;br /&gt;Return &lt;span style=&quot;color: maroon;&quot;&gt;&quot; and &quot;&lt;/span&gt; &amp;amp; result &amp;amp; &lt;span style=&quot;color: maroon;&quot;&gt;&quot;/100&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: navy;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: navy;&quot;&gt;Function&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://addictdotnet.blogspot.com/feeds/2956956803478216528/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7897092287238686391&amp;postID=2956956803478216528&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/2956956803478216528'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/2956956803478216528'/><link rel='alternate' type='text/html' href='http://addictdotnet.blogspot.com/2011/02/conversion-from-currency-into-english.html' title='Conversion from Currency into English Words'/><author><name>Kritika Yadav</name><uri>http://www.blogger.com/profile/11146103502599644895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/-8WzNm9y4lqM/VE8YY51J2EI/AAAAAAAAG0Q/OIY-8zxRIqs/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-6Xgd8_D6qzo/TWYU-FtFa3I/AAAAAAAAAkQ/v5_5nl1DHjI/s72-c/Currency+into+Words.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7897092287238686391.post-6678946987452864706</id><published>2011-02-24T00:18:00.000-08:00</published><updated>2011-02-24T00:18:11.571-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Regular Expression Editing Tips"/><category scheme="http://www.blogger.com/atom/ns#" term="VS Regular Expresion"/><title type='text'>Visual Studio Regular Expression Editing tips</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 13px;&quot;&gt;VS provides regular expressions in replacing string which can be a lifesaver. Here&#39;s a few examples of operations to be performed on many files:&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #330033;&quot;&gt;&lt;b&gt;Removing an xml attribute:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #330033;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;What the RE means: Find the string &quot;&lt;survey &quot;=&quot;&quot; &quot;cluster&quot;.&lt;=&quot;&quot; &quot;cluster=&quot; followed by a bunch of non-space characters. Replace with just the &quot; &lt;survey=&quot;&quot; a=&quot;&quot; and=&quot;&quot; before=&quot;&quot; bunch=&quot;&quot; by=&quot;&quot; characters,=&quot;&quot; characters=&quot;&quot; followed=&quot;&quot; of=&quot;&quot; span=&quot;&quot; string=&quot;&quot; the=&quot;&quot;&gt;&lt;/survey&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #330033;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #330033;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Courier, monospace; line-height: 15px; white-space: pre;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre class=&quot;sh_csharp sh_sourceCode&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black; font-family: monospace; font-size: 10pt; font-style: normal; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #330033;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Courier, monospace; line-height: 15px; white-space: pre;&quot;&gt;regex&lt;span class=&quot;sh_symbol&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; color: darkred; font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 10pt; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;:&lt;/span&gt;  to delete the attribute &lt;span class=&quot;sh_string&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; color: red; font-family: monospace; font-size: 10pt; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;cluster&quot;&lt;/span&gt; from the &lt;span class=&quot;sh_string&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; color: red; font-family: monospace; font-size: 10pt; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;Survey&quot;&lt;/span&gt; element&lt;span class=&quot;sh_symbol&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; color: darkred; font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 10pt; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;:&lt;/span&gt;&lt;br /&gt;Find What&lt;span class=&quot;sh_symbol&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; color: darkred; font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 10pt; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh_symbol&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; color: darkred; font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 10pt; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;\&amp;lt;&lt;/span&gt;Survey &lt;span class=&quot;sh_cbracket&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; color: red; font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 10pt; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;sh_symbol&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; color: darkred; font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 10pt; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;.*&lt;/span&gt;&lt;span class=&quot;sh_cbracket&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; color: red; font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 10pt; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt; cluster&lt;span class=&quot;sh_symbol&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; color: darkred; font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 10pt; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;=[^&lt;/span&gt; &lt;span class=&quot;sh_symbol&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; color: darkred; font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 10pt; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;]*&lt;/span&gt;&lt;br /&gt;Replace With&lt;span class=&quot;sh_symbol&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; color: darkred; font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 10pt; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh_symbol&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; color: darkred; font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 10pt; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;\&amp;lt;&lt;/span&gt;Survey &lt;span class=&quot;sh_symbol&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; color: darkred; font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 10pt; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;\&lt;/span&gt;&lt;span class=&quot;sh_number&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; color: purple; font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 10pt; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;sh_csharp sh_sourceCode&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black; font-family: monospace; font-size: 10pt; font-style: normal; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #330033;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Courier, monospace; line-height: 15px; white-space: pre;&quot;&gt;&lt;span class=&quot;sh_number&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; color: purple; font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 10pt; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;sh_csharp sh_sourceCode&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: black; font-family: monospace; font-size: 10pt; font-style: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #330033;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Courier, monospace; line-height: 15px; white-space: pre;&quot;&gt;&lt;span class=&quot;sh_number&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; color: purple; font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 10pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #330033; line-height: normal; white-space: normal;&quot;&gt;&lt;b&gt;Rename an attribute&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;sh_csharp sh_sourceCode&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: black; font-family: monospace; font-size: 10pt; font-style: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #330033;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Courier, monospace; line-height: 15px; white-space: pre;&quot;&gt;&lt;span class=&quot;sh_number&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; color: purple; font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 10pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #330033; line-height: normal; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;In this case I want to rename the &quot;Survey&quot; element&#39;s &#39;id&#39; attribute to &#39;registrarId&#39;, but not the other elements&#39; &#39;id&#39; attribute. The element name and the attribute to change must be on the same line for this to work. A tiny sliver of regular expression in the &quot;Find and Replace&quot; dialog did the trick: The &quot;Find What&quot; says find &quot;&lt;survey &quot;=&quot;&quot; \1&quot;=&quot;&quot; all=&quot;&quot; any=&quot;&quot; by=&quot;&quot; characters=&quot;&quot; followed=&quot;&quot; id=&quot;. The &quot; of=&quot;&quot; skipped=&quot;&quot; span=&quot;&quot; takes=&quot;&quot; the=&quot;&quot; value=&quot;&quot; with=&quot;&quot; {.*}.&lt;=&quot;&quot;&gt;&lt;/survey&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;sh_csharp sh_sourceCode&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: black; font-family: monospace; font-size: 10pt; font-style: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #330033;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Courier, monospace; line-height: 15px; white-space: pre;&quot;&gt;&lt;span class=&quot;sh_number&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; color: purple; font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 10pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #330033; line-height: normal; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;sh_csharp sh_sourceCode&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: black; font-family: monospace; font-size: 10pt; font-style: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #330033;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Courier, monospace; line-height: 15px; white-space: pre;&quot;&gt;&lt;span class=&quot;sh_number&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; color: purple; font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 10pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #330033; line-height: normal; white-space: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-family: Courier, monospace; line-height: 15px; white-space: pre;&quot;&gt;&lt;pre class=&quot;sh_csharp sh_sourceCode&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black; font-family: monospace; font-size: 10pt; font-style: normal; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Find What&lt;span class=&quot;sh_symbol&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; color: darkred; font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 10pt; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;:&lt;/span&gt;  &lt;span class=&quot;sh_symbol&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; color: darkred; font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 10pt; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;\&amp;lt;&lt;/span&gt;Survey &lt;span class=&quot;sh_cbracket&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; color: red; font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 10pt; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;sh_symbol&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; color: darkred; font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 10pt; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;.*&lt;/span&gt;&lt;span class=&quot;sh_cbracket&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; color: red; font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 10pt; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt; id&lt;span class=&quot;sh_symbol&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; color: darkred; font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 10pt; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;=&lt;/span&gt;&lt;br /&gt;Replace with&lt;span class=&quot;sh_symbol&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; color: darkred; font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 10pt; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sh_symbol&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; color: darkred; font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 10pt; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;\&amp;lt;&lt;/span&gt;Survey &lt;span class=&quot;sh_symbol&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; color: darkred; font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 10pt; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;\&lt;/span&gt;&lt;span class=&quot;sh_number&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; color: purple; font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 10pt; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;1&lt;/span&gt; registrarId&lt;span class=&quot;sh_symbol&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; color: darkred; font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 10pt; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;=&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;sh_csharp sh_sourceCode&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black; font-family: monospace; font-size: 10pt; font-style: normal; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;sh_symbol&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; color: darkred; font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 10pt; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-iyEoOyPyH74/TWYTxdiFMdI/AAAAAAAAAkE/5Xc4p2Pq3kI/s1600/2007-12-20-RegExp.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;http://3.bp.blogspot.com/-iyEoOyPyH74/TWYTxdiFMdI/AAAAAAAAAkE/5Xc4p2Pq3kI/s320/2007-12-20-RegExp.jpg&quot; width=&quot;190&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;pre class=&quot;sh_csharp sh_sourceCode&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: black; font-family: monospace; font-size: 10pt; font-style: normal; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;sh_symbol&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; color: darkred; font-family: arial, helvetica, &#39;sans serif&#39;; font-size: 10pt; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://addictdotnet.blogspot.com/feeds/6678946987452864706/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7897092287238686391&amp;postID=6678946987452864706&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/6678946987452864706'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/6678946987452864706'/><link rel='alternate' type='text/html' href='http://addictdotnet.blogspot.com/2011/02/visual-studio-regular-expression.html' title='Visual Studio Regular Expression Editing tips'/><author><name>Kritika Yadav</name><uri>http://www.blogger.com/profile/11146103502599644895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/-8WzNm9y4lqM/VE8YY51J2EI/AAAAAAAAG0Q/OIY-8zxRIqs/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-iyEoOyPyH74/TWYTxdiFMdI/AAAAAAAAAkE/5Xc4p2Pq3kI/s72-c/2007-12-20-RegExp.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7897092287238686391.post-3802823946963976191</id><published>2011-02-24T00:10:00.000-08:00</published><updated>2011-02-24T00:10:45.238-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Rounding Up Issues"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Rounding Up"/><title type='text'>SQL Rounding Up Issues</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Helvetica, Arial, Verdana, Monaco, Times; font-size: 10px; line-height: 15px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style=&quot;font-size: 1.35em; line-height: 1.37em; margin-top: 0.5em;&quot;&gt;The first question they ask is why SQL Server truncates the decimals which is silly because it happens in the code-behind.For instance, say that you have a field of decimal datatype with precision 5 and scale 2 – decimal(5, 2).Now if you don’t define precision of the output parameter the value will be rounded up. e.g. 0.99 becomes 1.&lt;/div&gt;&lt;div style=&quot;font-size: 1.35em; line-height: 1.37em; margin-top: 0.5em;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 10px; line-height: 15px;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;sql&quot; style=&quot;clear: none; font-family: monospace; font-size: 12px; line-height: 1.333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: visible; overflow-y: visible; white-space: pre; width: auto;&quot;&gt;&lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;CREATE&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #110000;&quot;&gt; PROCEDURE mySP&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #110000;&quot;&gt;&lt;br /&gt;     @MyDecValue decimal&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;(5, 2)&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #110000;&quot;&gt; output&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #110000;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;AS&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #110000;&quot;&gt;&lt;br /&gt;     &lt;/span&gt;&lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;SELECT&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #110000;&quot;&gt; @MyDecValue&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt; = &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #110000;&quot;&gt;MyDecField &lt;/span&gt;&lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;FROM&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #110000;&quot;&gt; MyTable &lt;/span&gt;&lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;WHERE&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #110000;&quot;&gt; Foo&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;=1&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;sql&quot; style=&quot;clear: none; font-family: monospace; font-size: 12px; line-height: 1.333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: visible; overflow-y: visible; white-space: pre; width: auto;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;sql&quot; style=&quot;clear: none; font-family: monospace; font-size: 12px; line-height: 1.333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: visible; overflow-y: visible; white-space: pre; width: auto;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #110000; font-family: Helvetica, Arial, Verdana, Monaco, Times; font-size: 10px; white-space: normal;&quot;&gt;&lt;pre class=&quot;vb&quot; style=&quot;clear: none; font-family: monospace; font-size: 12px; line-height: 1.333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: visible; overflow-y: visible; white-space: pre; width: auto;&quot;&gt;&lt;span style=&quot;color: navy;&quot;&gt;Dim&lt;/span&gt; command &lt;span style=&quot;color: navy;&quot;&gt;As&lt;/span&gt; SqlCommand = connection.CreateCommand&lt;br /&gt;command.CommandText = &lt;span style=&quot;color: maroon;&quot;&gt;&quot;mySp&quot;&lt;/span&gt;&lt;br /&gt;command.Parameters.Add(&lt;span style=&quot;color: maroon;&quot;&gt;&quot;@MyDecValue&quot;&lt;/span&gt;, SqlDbType.Decimal, 5).Direction = &lt;span style=&quot;color: navy;&quot;&gt;Output&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;vb&quot; style=&quot;clear: none; font-family: monospace; font-size: 12px; line-height: 1.333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: visible; overflow-y: visible; white-space: pre; width: auto;&quot;&gt;&lt;span style=&quot;color: navy;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;vb&quot; style=&quot;clear: none; font-family: monospace; font-size: 12px; line-height: 1.333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: visible; overflow-y: visible; white-space: pre; width: auto;&quot;&gt;&lt;span style=&quot;color: navy;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-family: Helvetica, Arial, Verdana, Monaco, Times; font-size: 10px; white-space: normal;&quot;&gt;&lt;div style=&quot;color: #40454b; font-size: 1.35em; line-height: 1.37em; margin-top: 0.5em;&quot;&gt;Now if you execute the command the value will be as mentioned rounded up .. meaning, 0.99 becomes 1.&lt;/div&gt;&lt;div style=&quot;color: #40454b; font-size: 1.35em; line-height: 1.37em; margin-top: 0.5em;&quot;&gt;You can solve it if you Define the precision and scale of the parameter e.g.&lt;/div&gt;&lt;div style=&quot;color: #40454b; font-size: 1.35em; line-height: 1.37em; margin-top: 0.5em;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #110000; font-size: 10px; line-height: 15px;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;vb&quot; style=&quot;clear: none; font-family: monospace; font-size: 12px; line-height: 1.333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: visible; overflow-y: visible; white-space: pre; width: auto;&quot;&gt;&lt;span style=&quot;color: navy;&quot;&gt;Dim&lt;/span&gt; command &lt;span style=&quot;color: navy;&quot;&gt;As&lt;/span&gt; SqlCommand = connection.CreateCommand&lt;br /&gt;command.CommandText = &lt;span style=&quot;color: maroon;&quot;&gt;&quot;mySp&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: navy;&quot;&gt;Dim&lt;/span&gt; decimalsparam &lt;span style=&quot;color: navy;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: navy;&quot;&gt;New&lt;/span&gt; SqlParameter&lt;br /&gt;decimalsparam.Direction = ParameterDirection.&lt;span style=&quot;color: navy;&quot;&gt;Output&lt;/span&gt;&lt;br /&gt;decimalsparam.ParameterName = &lt;span style=&quot;color: maroon;&quot;&gt;&quot;@MyDecValue&quot;&lt;/span&gt;&lt;br /&gt;decimalsparam.Precision = 5&lt;br /&gt;decimalsparam.Scale = 2&lt;br /&gt;decimalsparam.Size = 5&lt;br /&gt;&amp;nbsp;&lt;br /&gt;command.Parameters.Add(decimalsparam)&lt;br /&gt;command.ExecuteNonQuery()&lt;/pre&gt;&lt;/span&gt;&lt;div style=&quot;color: #40454b; font-size: 1.35em; line-height: 1.37em; margin-top: 0.5em;&quot;&gt;&lt;/div&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://addictdotnet.blogspot.com/feeds/3802823946963976191/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7897092287238686391&amp;postID=3802823946963976191&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/3802823946963976191'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/3802823946963976191'/><link rel='alternate' type='text/html' href='http://addictdotnet.blogspot.com/2011/02/sql-rounding-up-issues.html' title='SQL Rounding Up Issues'/><author><name>Kritika Yadav</name><uri>http://www.blogger.com/profile/11146103502599644895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/-8WzNm9y4lqM/VE8YY51J2EI/AAAAAAAAG0Q/OIY-8zxRIqs/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7897092287238686391.post-82128615168015060</id><published>2011-02-09T09:29:00.000-08:00</published><updated>2011-02-09T09:29:10.154-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Save images in Database"/><title type='text'>FileUpload Save Images in Database in ASP.NET C# VB.NET</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/_MYgWdLX86tc/TVLO0p7YDHI/AAAAAAAAAi4/PSw_fT8OJhs/s1600/1.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/_MYgWdLX86tc/TVLO0p7YDHI/AAAAAAAAAi4/PSw_fT8OJhs/s1600/1.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;Html markup of the page look like&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&amp;lt;form id=&quot;form1&quot; runat=&quot;server&quot;&amp;gt;&lt;br /&gt;&amp;lt;div&amp;gt;&lt;br /&gt;&amp;lt;asp:TextBox ID=&quot;txtName&quot; runat=&quot;server&quot; Width=&quot;95px&quot;&amp;gt;&lt;br /&gt;&amp;lt;/asp:TextBox&amp;gt;&lt;br /&gt;&amp;lt;asp:FileUpload ID=&quot;FileUpload1&quot; runat=&quot;server&quot;/&amp;gt;&lt;br /&gt;&amp;lt;asp:Label ID=&quot;lblMessage&quot; runat=&quot;server&quot;&amp;gt;&lt;br /&gt;&amp;lt;/asp:Label&amp;gt;&lt;br /&gt;&amp;lt;asp:Button ID=&quot;btnUpload&quot; runat=&quot;server&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;OnClick=&quot;btnUpload_Click&quot; Text=&quot;Upload&quot;/&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;C# Code behind&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;protected void btnUpload_Click(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;string strImageName = txtName.Text.ToString();&lt;br /&gt;if (FileUpload1.PostedFile != null &amp;amp;&amp;amp;FileUpload1.PostedFile.FileName != &quot;&quot;)&lt;br /&gt;{&lt;br /&gt;byte[] imageSize = new byte[FileUpload1.PostedFile.ContentLength];&lt;br /&gt;HttpPostedFile uploadedImage = FileUpload1.PostedFile;&lt;br /&gt;uploadedImage.InputStream.Read(imageSize, 0, (int)FileUpload1.PostedFile.ContentLength);&lt;br /&gt;&amp;nbsp;// Create SQL Connection&lt;br /&gt;SqlConnection con = new SqlConnection();&lt;br /&gt;con.ConnectionString = ConfigurationManager.ConnectionStrings[&quot;ConnectionString&quot;].ConnectionString;&lt;br /&gt;// Create SQL Command&lt;br /&gt;SqlCommand cmd = new SqlCommand();&lt;br /&gt;cmd.CommandText = &quot;INSERT INTO Images(ImageName,Image)&quot; +&quot; VALUES (@ImageName,@Image)&quot;;&lt;br /&gt;cmd.CommandType = CommandType.Text;&lt;br /&gt;cmd.Connection = con;&lt;br /&gt;SqlParameter ImageName = new SqlParameter(&quot;@ImageName&quot;, SqlDbType.VarChar, 50);&lt;br /&gt;ImageName.Value = strImageName.ToString();&lt;br /&gt;cmd.Parameters.Add(ImageName);&lt;br /&gt;SqlParameter UploadedImage = new SqlParameter(&quot;@Image&quot;, SqlDbType.Image, imageSize.Length);&lt;br /&gt;UploadedImage.Value = imageSize;&lt;br /&gt;cmd.Parameters.Add(UploadedImage);&lt;br /&gt;con.Open();&lt;br /&gt;int result = cmd.ExecuteNonQuery();&lt;br /&gt;con.Close();&lt;br /&gt;if (result &amp;gt; 0)&lt;br /&gt;lblMessage.Text = &quot;File Uploaded&quot;;&lt;br /&gt;GridView1.DataBind();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;b&gt;&lt;u&gt;VB.NET Code&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;Protected Sub btnUpload_Click(ByVal sender As Object, ByVal e As EventArgs)&lt;br /&gt;Dim strImageName As String = txtName.Text.ToString()&lt;br /&gt;If FileUpload1.PostedFile IsNot Nothing AndAlso&lt;br /&gt;FileUpload1.PostedFile.FileName &amp;lt;&amp;gt; &quot;&quot; Then&lt;br /&gt;Dim imageSize As Byte() = New Byte(FileUpload1.PostedFile.ContentLength - 1) {}&lt;br /&gt;Dim uploadedImage__1 As HttpPostedFile =FileUpload1.PostedFileuploadedImage__1.InputStream.Read(imageSize, 0,CInt(FileUpload1.PostedFile.ContentLength))&lt;br /&gt;&#39; &lt;b&gt;Create SQL Connection&lt;/b&gt;&lt;br /&gt;Dim con As New SqlConnection()con.ConnectionString =ConfigurationManager.ConnectionStrings&lt;br /&gt;(&quot;ConnectionString&quot;).ConnectionString&lt;br /&gt;&#39; &lt;b&gt;Create SQL Command&lt;/b&gt;&lt;br /&gt;Dim cmd As New SqlCommand()&lt;br /&gt;cmd.CommandText = &quot;INSERT INTO Images(ImageName,Image) VALUES (@ImageName,@Image)&quot;&lt;br /&gt;cmd.CommandType = CommandType.Text&lt;br /&gt;cmd.Connection = con&lt;br /&gt;Dim ImageName As New SqlParameter(&quot;@ImageName&quot;, SqlDbType.VarChar, 50)&lt;br /&gt;ImageName.Value = strImageName.ToString()&lt;br /&gt;cmd.Parameters.Add(ImageName)&lt;br /&gt;Dim UploadedImage__2 As New SqlParameter(&quot;@Image&quot;, SqlDbType.Image, imageSize.Length)&lt;br /&gt;UploadedImage__2.Value = imageSizecmd.Parameters.Add(UploadedImage__2)&lt;br /&gt;con.Open()&lt;br /&gt;Dim result As Integer = cmd.ExecuteNonQuery()&lt;br /&gt;con.Close()&lt;br /&gt;If result &amp;gt; 0 Then&lt;br /&gt;lblMessage.Text = &quot;File Uploaded&quot;&lt;br /&gt;End If&lt;br /&gt;GridView1.DataBind()&lt;br /&gt;End If&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://addictdotnet.blogspot.com/feeds/82128615168015060/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7897092287238686391&amp;postID=82128615168015060&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/82128615168015060'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/82128615168015060'/><link rel='alternate' type='text/html' href='http://addictdotnet.blogspot.com/2011/02/fileupload-save-images-in-database-in.html' title='FileUpload Save Images in Database in ASP.NET C# VB.NET'/><author><name>Kritika Yadav</name><uri>http://www.blogger.com/profile/11146103502599644895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/-8WzNm9y4lqM/VE8YY51J2EI/AAAAAAAAG0Q/OIY-8zxRIqs/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_MYgWdLX86tc/TVLO0p7YDHI/AAAAAAAAAi4/PSw_fT8OJhs/s72-c/1.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7897092287238686391.post-5515634234291934211</id><published>2011-01-13T00:29:00.000-08:00</published><updated>2011-01-13T00:29:08.051-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AJAX"/><category scheme="http://www.blogger.com/atom/ns#" term="AutoCompleteExtender"/><title type='text'>In AJAX AutoCompleteExtender TextBox CompletionList Width</title><content type='html'>&lt;pre class=&quot;csharpcode&quot; style=&quot;-webkit-text-decorations-in-effect: none; color: black; font-family: &#39;Courier New&#39;, Consolas, Courier, monospace; font-size: small; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline;&quot;&gt;&lt;b&gt;Progress Image in AutoComplete TextBox&lt;/b&gt;&lt;/pre&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/_MYgWdLX86tc/TS63yVJVuEI/AAAAAAAAAhI/erpPhp-D8fc/s1600/autocompletetextbox.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/_MYgWdLX86tc/TS63yVJVuEI/AAAAAAAAAhI/erpPhp-D8fc/s1600/autocompletetextbox.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;pre class=&quot;csharpcode&quot; style=&quot;-webkit-text-decorations-in-effect: none; color: black; font-family: &#39;Courier New&#39;, Consolas, Courier, monospace; font-size: small; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/pre&gt;&lt;br /&gt;&amp;lt;head runat=&quot;server&quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;title&amp;gt;Progress Image in AutoComplete TextBox&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;style&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.AutoExtender&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;font-family: Verdana, Helvetica, sans-serif;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;font-size: .8em;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;font-weight: normal;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;border: solid 1px #006699;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;line-height: 20px;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;padding: 10px;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;background-color: White;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;margin-left:10px;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.AutoExtenderList&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;border-bottom: dotted 1px #006699;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cursor: pointer;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;color: Maroon;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.AutoExtenderHighlight&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;color: White;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;background-color: #006699;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cursor: pointer;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;#divwidth&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;width: 150px !important; &amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;#divwidth div&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;width: 150px !important; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;lt;/style&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;nbsp;Put a div with id &quot;divwidth&quot; above the html source of autocomplete extender.&lt;br /&gt;&amp;lt;div ID=&quot;divwidth&quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;and add this line in autocomplete extender HTML source&lt;br /&gt;CompletionListElementID=&quot;divwidth&quot;&lt;br /&gt;&lt;b&gt;&lt;u&gt;The complete html source of AutoComplete Extender&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/_MYgWdLX86tc/TS63SuKn5qI/AAAAAAAAAhE/rcPhmMCdFWU/s1600/autocompleteWidth.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/_MYgWdLX86tc/TS63SuKn5qI/AAAAAAAAAhE/rcPhmMCdFWU/s1600/autocompleteWidth.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;asp:TextBox ID=&quot;txtAutoComplete&quot; runat=&quot;server&quot; Width=&quot;252px&quot;&amp;gt;&lt;br /&gt;&amp;lt;/asp:TextBox&amp;gt; &lt;br /&gt;&amp;lt;div ID=&quot;divwidth&quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;ajaxToolkit:AutoCompleteExtender runat=&quot;server&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ID=&quot;AutoComplete1&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BehaviorID=&quot;autoComplete&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TargetControlID=&quot;txtAutoComplete&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ServicePath=&quot;AutoComplete.asmx&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ServiceMethod=&quot;GetCompletionList&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MinimumPrefixLength=&quot;1&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CompletionInterval=&quot;10&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; EnableCaching=&quot;true&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CompletionSetCount=&quot;12&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CompletionListCssClass=&quot;AutoExtender&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CompletionListItemCssClass=&quot;AutoExtenderList&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CompletionListHighlightedItemCssClass&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&quot;AutoExtenderHighlight&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CompletionListElementID=&quot;divwidth&quot;&amp;gt;&lt;br /&gt;&amp;lt;ajaxToolkit:AutoCompleteExtender&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://addictdotnet.blogspot.com/feeds/5515634234291934211/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7897092287238686391&amp;postID=5515634234291934211&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/5515634234291934211'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/5515634234291934211'/><link rel='alternate' type='text/html' href='http://addictdotnet.blogspot.com/2011/01/in-ajax-autocompleteextender-textbox_13.html' title='In AJAX AutoCompleteExtender TextBox CompletionList Width'/><author><name>Kritika Yadav</name><uri>http://www.blogger.com/profile/11146103502599644895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/-8WzNm9y4lqM/VE8YY51J2EI/AAAAAAAAG0Q/OIY-8zxRIqs/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_MYgWdLX86tc/TS63yVJVuEI/AAAAAAAAAhI/erpPhp-D8fc/s72-c/autocompletetextbox.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7897092287238686391.post-4264648659497594566</id><published>2011-01-11T10:46:00.000-08:00</published><updated>2011-01-11T10:46:34.604-08:00</updated><title type='text'>Dot Net Examples: Driving directions from Google Maps in XML format</title><content type='html'>&lt;a href=&quot;http://examplesdotnet.blogspot.com/2011/01/driving-directions-from-google-maps-in.html?spref=bl&quot;&gt;Dot Net Examples: Driving directions from Google Maps in XML format&lt;/a&gt;: &quot;The Google maps return this document in result of Http request sent by the user which contains the data for direction and distance. You will...&quot;</content><link rel="related" href="http://examplesdotnet.blogspot.com/2011/01/driving-directions-from-google-maps-in.html?spref=bl" title="Dot Net Examples: Driving directions from Google Maps in XML format"/><link rel='replies' type='application/atom+xml' href='http://addictdotnet.blogspot.com/feeds/4264648659497594566/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7897092287238686391&amp;postID=4264648659497594566&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/4264648659497594566'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/4264648659497594566'/><link rel='alternate' type='text/html' href='http://addictdotnet.blogspot.com/2011/01/dot-net-examples-driving-directions.html' title='Dot Net Examples: Driving directions from Google Maps in XML format'/><author><name>Kritika Yadav</name><uri>http://www.blogger.com/profile/11146103502599644895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/-8WzNm9y4lqM/VE8YY51J2EI/AAAAAAAAG0Q/OIY-8zxRIqs/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7897092287238686391.post-7098512531894227119</id><published>2010-12-15T09:11:00.000-08:00</published><updated>2010-12-15T10:21:35.125-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MailAttachment"/><title type='text'>Send Email with attachment in ASP.net</title><content type='html'>&lt;div class=&quot;codeview&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f4f3e8; background-image: initial; background-origin: initial; background-position: 100% 100%; background-repeat: no-repeat no-repeat; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 2px; border-left-color: rgb(238, 238, 238); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 2px; border-top-color: rgb(238, 238, 238); border-top-style: solid; border-top-width: 1px; clear: both; color: #555555; font-family: Arial, Helvetica, sans-serif; list-style-type: none; margin-bottom: 5px; margin-left: 5px; margin-right: 5px; margin-top: 5px; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;&quot;&gt;&lt;b style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;C# Code Behind&lt;/b&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #555555; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre class=&quot;brush:csharp&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #555555; font-family: Arial, Helvetica, sans-serif;&quot;&gt;using System;&lt;br /&gt;using System.Data;&lt;br /&gt;using System.Configuration;&lt;br /&gt;using System.Web;&lt;br /&gt;using System.Web.Security;&lt;br /&gt;using System.Web.UI;&lt;br /&gt;using System.Web.UI.WebControls;&lt;br /&gt;using System.Web.UI.WebControls.WebParts;&lt;br /&gt;using System.Web.UI.HtmlControls;&lt;br /&gt;using System.Net.Mail;&lt;br /&gt;&lt;br /&gt;public partial class _Default : System.Web.UI.Page &lt;br /&gt;{&lt;br /&gt;    protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;    {&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;    protected void btnSend_Click(object sender, EventArgs e)&lt;br /&gt;    {&lt;br /&gt;        MailMessage mail = new MailMessage();&lt;br /&gt;        mail.To.Add(txtTo.Text);&lt;br /&gt;        //mail.To.Add(&quot;amit_jain_online@yahoo.com&quot;);&lt;br /&gt;        mail.From = new MailAddress(txtFrom.Text);&lt;br /&gt;        mail.Subject = txtSubject.Text;&lt;br /&gt;        mail.Body = txtMessage.Text;&lt;br /&gt;        mail.IsBodyHtml = true;&lt;br /&gt;&lt;br /&gt;        //Attach file using FileUpload Control and put the file in memory stream&lt;br /&gt;        if (FileUpload1.HasFile)&lt;br /&gt;        {&lt;br /&gt;            mail.Attachments.Add(new Attachment(FileUpload1.PostedFile.InputStream, FileUpload1.FileName));&lt;br /&gt;        }&lt;br /&gt;        SmtpClient smtp = new SmtpClient();&lt;br /&gt;        smtp.Host = &quot;smtp.gmail.com&quot;; //Or Your SMTP Server Address&lt;br /&gt;        smtp.Credentials = new System.Net.NetworkCredential&lt;br /&gt;             (&quot;YourGmailID@gmail.com&quot;, &quot;YourGmailPassword&quot;);&lt;br /&gt;        //Or your Smtp Email ID and Password&lt;br /&gt;        smtp.EnableSsl = true;&lt;br /&gt;        smtp.Send(mail);&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #555555; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class=&quot;codeview&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f4f3e8; background-image: initial; background-origin: initial; background-position: 100% 100%; background-repeat: no-repeat no-repeat; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 2px; border-left-color: rgb(238, 238, 238); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 2px; border-top-color: rgb(238, 238, 238); border-top-style: solid; border-top-width: 1px; clear: both; color: #555555; font-family: Arial, Helvetica, sans-serif; list-style-type: none; margin-bottom: 5px; margin-left: 5px; margin-right: 5px; margin-top: 5px; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;&quot;&gt;&lt;b style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;VB.NET Code Behind&lt;/b&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #555555; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre class=&quot;brush:vb&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #555555; font-family: Arial, Helvetica, sans-serif;&quot;&gt;Imports System&lt;br /&gt;Imports System.Data&lt;br /&gt;Imports System.Configuration&lt;br /&gt;Imports System.Web&lt;br /&gt;Imports System.Web.Security&lt;br /&gt;Imports System.Web.UI&lt;br /&gt;Imports System.Web.UI.WebControls&lt;br /&gt;Imports System.Web.UI.WebControls.WebParts&lt;br /&gt;Imports System.Web.UI.HtmlControls&lt;br /&gt;Imports System.Net.Mail&lt;br /&gt;&lt;br /&gt;Public Partial Class _Default&lt;br /&gt;    Inherits System.Web.UI.Page&lt;br /&gt;    Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)&lt;br /&gt;        &lt;br /&gt;    End Sub&lt;br /&gt;    Protected Sub btnSend_Click(ByVal sender As Object, ByVal e As EventArgs)&lt;br /&gt;        Dim mail As New MailMessage()&lt;br /&gt;        mail.[To].Add(txtTo.Text)&lt;br /&gt;        &#39;mail.To.Add(&quot;amit_jain_online@yahoo.com&quot;);&lt;br /&gt;        mail.From = New MailAddress(txtFrom.Text)&lt;br /&gt;        mail.Subject = txtSubject.Text&lt;br /&gt;        mail.Body = txtMessage.Text&lt;br /&gt;        mail.IsBodyHtml = True&lt;br /&gt;        &lt;br /&gt;        &#39;Attach file using FileUpload Control and put the file in memory stream&lt;br /&gt;        If FileUpload1.HasFile Then&lt;br /&gt;            mail.Attachments.Add(New Attachment(FileUpload1.PostedFile.InputStream, FileUpload1.FileName))&lt;br /&gt;        End If&lt;br /&gt;        Dim smtp As New SmtpClient()&lt;br /&gt;        smtp.Host = &quot;smtp.gmail.com&quot;&lt;br /&gt;        &#39;Or Your SMTP Server Address&lt;br /&gt;        smtp.Credentials = New System.Net.NetworkCredential(&quot;YourGmailID@gmail.com&quot;, &quot;YourGmailPassword&quot;)&lt;br /&gt;        &#39;Or your Smtp Email ID and Password&lt;br /&gt;        smtp.EnableSsl = True&lt;br /&gt;            &lt;br /&gt;        smtp.Send(mail)&lt;br /&gt;    End Sub&lt;br /&gt;End Class&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #555555; font-family: Arial, Helvetica, sans-serif;&quot;&gt;Build and run the application to test the code.&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #555555; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/_MYgWdLX86tc/TQj2qC-qvsI/AAAAAAAAAfs/_qdNSz_V-60/s1600/SendEmailWithAttachment.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;213&quot; src=&quot;http://1.bp.blogspot.com/_MYgWdLX86tc/TQj2qC-qvsI/AAAAAAAAAfs/_qdNSz_V-60/s320/SendEmailWithAttachment.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://addictdotnet.blogspot.com/feeds/7098512531894227119/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7897092287238686391&amp;postID=7098512531894227119&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/7098512531894227119'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/7098512531894227119'/><link rel='alternate' type='text/html' href='http://addictdotnet.blogspot.com/2010/12/send-email-with-attachment-in-aspnet.html' title='Send Email with attachment in ASP.net'/><author><name>Kritika Yadav</name><uri>http://www.blogger.com/profile/11146103502599644895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/-8WzNm9y4lqM/VE8YY51J2EI/AAAAAAAAG0Q/OIY-8zxRIqs/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_MYgWdLX86tc/TQj2qC-qvsI/AAAAAAAAAfs/_qdNSz_V-60/s72-c/SendEmailWithAttachment.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7897092287238686391.post-8259019479300174199</id><published>2010-12-14T10:04:00.000-08:00</published><updated>2010-12-15T10:25:58.548-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PageRefresh"/><title type='text'>Detect Page Refresh In ASP.NET</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;If you have created a aspx page using C# and ASP.NET and have put a button on it. And in the Click event of this button if you are inserting some data in database , after click if user refresh the page than click event gets fired again resulting data insertion to database again, to stop events on the page getting fired on browser refresh we need to write bit of code to avoid it.&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&amp;lt;%@ Page Language=&quot;C#&quot; AutoEventWireup=&quot;true&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;CodeFile=&quot;Default.aspx.cs&quot; Inherits=&quot;_Default&quot; %&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&amp;lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; &amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&amp;lt;head runat=&quot;server&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&amp;lt;title&amp;gt;Untitled Page&amp;lt;/title&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&amp;lt;body&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&amp;lt;form id=&quot;form1&quot; runat=&quot;server&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&amp;lt;div&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&amp;lt;asp:Label ID=&quot;Label1&quot; runat=&quot;server&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;Text=&quot;Label&quot;&amp;gt;&amp;lt;/asp:Label&amp;gt;&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&amp;lt;asp:Button ID=&quot;Button1&quot; runat=&quot;server&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;OnClick=&quot;Button1_Click&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;Text=&quot;Button&quot; /&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;Now in the Page_Load event i m creating a Session Variable and assigning System date and time to it , and in Page_Prerender event i am creating a Viewstate variable and assigning Session variable&#39;s value to it&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;Than in button&#39;s click event i am checking the values of Session variable and Viewstate variable if they both are equal than page is not refreshed otherwise it has been refreshed&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre class=&quot;brush:csharp&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;public partial class _Default : System.Web.UI.Page&lt;br /&gt;{&lt;br /&gt;protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;if (!IsPostBack)&lt;br /&gt;{&lt;br /&gt;Session[&quot;CheckRefresh&quot;] =&lt;br /&gt;Server.UrlDecode(System.DateTime.Now.ToString());&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;protected void Button1_Click(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;if (Session[&quot;CheckRefresh&quot;].ToString() ==&lt;br /&gt;ViewState[&quot;CheckRefresh&quot;].ToString())&lt;br /&gt;{&lt;br /&gt;Label1.Text = &quot;Hello&quot;;&lt;br /&gt;Session[&quot;CheckRefresh&quot;] =&lt;br /&gt;Server.UrlDecode(System.DateTime.Now.ToString());&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;Label1.Text = &quot;Page Refreshed&quot;;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;protected void Page_PreRender(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;ViewState[&quot;CheckRefresh&quot;] = Session[&quot;CheckRefresh&quot;];&lt;br /&gt;}&lt;br /&gt;}&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #555555;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div style=&quot;color: #555555;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://addictdotnet.blogspot.com/feeds/8259019479300174199/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7897092287238686391&amp;postID=8259019479300174199&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/8259019479300174199'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/8259019479300174199'/><link rel='alternate' type='text/html' href='http://addictdotnet.blogspot.com/2010/12/detect-page-refresh-in-aspnet.html' title='Detect Page Refresh In ASP.NET'/><author><name>Kritika Yadav</name><uri>http://www.blogger.com/profile/11146103502599644895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/-8WzNm9y4lqM/VE8YY51J2EI/AAAAAAAAG0Q/OIY-8zxRIqs/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7897092287238686391.post-1519090802228407194</id><published>2010-09-20T11:27:00.000-07:00</published><updated>2010-09-20T11:27:18.253-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="TextBoxWidth"/><title type='text'>AutoCompleteExtender TextBox CompletionList Width Ajax ASP.NET</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;In this example i am going to describe how to set Width of Completion List in Ajax AutoComplete Extender TextBox.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;The default behavior of completion list takes width equal to the width of textbox. we can change this behavior by applying some CSS style to set the width we want. default width is as shown below in the Image.&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: normal;&quot;&gt;As obvious from the image above , width of completion list is equals to the width of textbox, to fix this issue write the CSS script mentioned below in Head section of html source of page.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: normal;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;head runat=&quot;server&quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;title&amp;gt;Progress Image in AutoComplete TextBox&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;style&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.AutoExtender&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;font-family: Verdana, Helvetica, sans-serif;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;font-size: .8em;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;font-weight: normal;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;border: solid 1px #006699;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;line-height: 20px;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;padding: 10px;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;background-color: White;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;margin-left:10px;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.AutoExtenderList&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;border-bottom: dotted 1px #006699;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cursor: pointer;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;color: Maroon;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.AutoExtenderHighlight&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;color: White;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;background-color: #006699;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cursor: pointer;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;#divwidth&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;width: 150px !important; &amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;#divwidth div&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;width: 150px !important; &amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;lt;/style&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now Put a div with id &quot;divwidth&quot; above the html source of autocomplete extender&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class=&quot;csharpcode&quot; style=&quot;color: black; font-family: &#39;Courier New&#39;, Consolas, Courier, monospace; font-size: small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;kwrd&quot; style=&quot;color: blue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot; style=&quot;color: maroon; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;div&lt;/span&gt; &lt;span class=&quot;attr&quot; style=&quot;color: red; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;kwrd&quot; style=&quot;color: blue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;=&quot;divwidth&quot;&lt;/span&gt;&lt;span class=&quot;kwrd&quot; style=&quot;color: blue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;html&quot; style=&quot;color: maroon; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;div&lt;/span&gt;&lt;span class=&quot;kwrd&quot; style=&quot;color: blue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;b style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;and add this line in autocomplete extender HTML source&amp;nbsp;&lt;/b&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;pre class=&quot;csharpcode&quot; style=&quot;color: black; font-family: &#39;Courier New&#39;, Consolas, Courier, monospace; font-size: small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;CompletionListElementID=&quot;divwidth&quot;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; style=&quot;color: black; font-family: &#39;Courier New&#39;, Consolas, Courier, monospace; font-size: small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; style=&quot;color: black; font-family: &#39;Courier New&#39;, Consolas, Courier, monospace; font-size: small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; white-space: normal;&quot;&gt;The complete html source of AutoComplete Extender will look like&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; style=&quot;color: black; font-family: &#39;Courier New&#39;, Consolas, Courier, monospace; font-size: small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; white-space: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; style=&quot;color: black; font-family: &#39;Courier New&#39;, Consolas, Courier, monospace; font-size: small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; white-space: normal;&quot;&gt;&lt;pre class=&quot;csharpcode&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;lt;asp:TextBox ID=&quot;txtAutoComplete&quot; runat=&quot;server&quot; Width=&quot;252px&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;lt;/asp:TextBox&amp;gt; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;lt;div ID=&quot;divwidth&quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;lt;ajaxToolkit:AutoCompleteExtender runat=&quot;server&quot;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ID=&quot;AutoComplete1&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BehaviorID=&quot;autoComplete&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TargetControlID=&quot;txtAutoComplete&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ServicePath=&quot;AutoComplete.asmx&quot;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ServiceMethod=&quot;GetCompletionList&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MinimumPrefixLength=&quot;1&quot;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CompletionInterval=&quot;10&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; EnableCaching=&quot;true&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CompletionSetCount=&quot;12&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CompletionListCssClass=&quot;AutoExtender&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CompletionListItemCssClass=&quot;AutoExtenderList&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CompletionListHighlightedItemCssClass&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&quot;AutoExtenderHighlight&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CompletionListElementID=&quot;divwidth&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&amp;lt;ajaxToolkit:AutoCompleteExtender&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/_MYgWdLX86tc/TJenaMMuqTI/AAAAAAAAAcs/YY4eghOt9rc/s1600/autocompletetextbox.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/_MYgWdLX86tc/TJenaMMuqTI/AAAAAAAAAcs/YY4eghOt9rc/s320/autocompletetextbox.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;pre class=&quot;csharpcode&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; style=&quot;color: black; font-family: &#39;Courier New&#39;, Consolas, Courier, monospace; font-size: small; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px; white-space: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://addictdotnet.blogspot.com/feeds/1519090802228407194/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7897092287238686391&amp;postID=1519090802228407194&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/1519090802228407194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/1519090802228407194'/><link rel='alternate' type='text/html' href='http://addictdotnet.blogspot.com/2010/09/autocompleteextender-textbox.html' title='AutoCompleteExtender TextBox CompletionList Width Ajax ASP.NET'/><author><name>Kritika Yadav</name><uri>http://www.blogger.com/profile/11146103502599644895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/-8WzNm9y4lqM/VE8YY51J2EI/AAAAAAAAG0Q/OIY-8zxRIqs/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_MYgWdLX86tc/TJenaMMuqTI/AAAAAAAAAcs/YY4eghOt9rc/s72-c/autocompletetextbox.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7897092287238686391.post-141726063720697502</id><published>2010-09-01T09:49:00.000-07:00</published><updated>2010-09-01T09:49:14.848-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ItBookList"/><title type='text'>Using System.Xml, System.Xml.Xsl, System.Xml.XPath Namespace in asp.net</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/_MYgWdLX86tc/TH6D1qSNvgI/AAAAAAAAAbg/kW-Oeucym3o/s1600/XSLTNamespace.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/_MYgWdLX86tc/TH6D1qSNvgI/AAAAAAAAAbg/kW-Oeucym3o/s320/XSLTNamespace.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: 13px; line-height: 20px;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: 13px; line-height: 20px;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: 13px; line-height: 20px;&quot;&gt;&lt;b&gt;&lt;u&gt;XSLTNamespace.aspx&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: 13px; line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #68877d; font-family: Georgia, serif; font-size: 13px; font-weight: bold; line-height: 20px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;%@ Page Language=&quot;C#&quot; AutoEventWireup=&quot;true&quot; %&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;%@ Import Namespace=&quot;System.Xml&quot; %&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;%@ Import Namespace=&quot;System.Xml.Xsl&quot; %&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;%@ Import Namespace=&quot;System.Xml.XPath&quot; %&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;script runat=&quot;server&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;void Page_Load(object sender, System.EventArgs e)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;string xmlFilePath = Request.PhysicalApplicationPath + @&quot;App_Data\ITBookList.xml&quot;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;string xsltFilePath = Request.PhysicalApplicationPath + @&quot;App_Data\ITBookList.xslt&quot;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;XPathDocument xPathDoc = new XPathDocument(xmlFilePath);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;XslCompiledTransform transform = new XslCompiledTransform();&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;transform.Load(xsltFilePath);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;transform.Transform(xPathDoc, null, Response.Output);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; &amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;head id=&quot;Head1&quot; runat=&quot;server&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;title&amp;gt;Using System.Xml, System.Xml.Xsl, System.Xml.XPath Namespace in asp.net&amp;lt;/title&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;body&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;form id=&quot;form1&quot; runat=&quot;server&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;div&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/form&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;u&gt;ITBookList.xslt&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;xsl:stylesheet version=&quot;1.0&quot; xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;lt;xsl:output method=&quot;html&quot;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;lt;xsl:template match=&quot;/&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;html&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;head&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;title&amp;gt;XSLT document for display book list&amp;lt;/title&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/head&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;body&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;h2 style=&quot;color:DeepPink; font-style:italic;&quot;&amp;gt;How to use System.Xml, System.Xml.Xsl, System.Xml.XPath Namespace in asp.net&amp;lt;/h2&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;hr width=&quot;775&quot; align=&quot;left&quot; color=&quot;Pink&quot; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;table border=&quot;1&quot; cellpadding=&quot;5&quot; cellspacing=&quot;0&quot; bordercolor=&quot;Orange&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;tr bgcolor=&quot;OrangeRed&quot; style=&quot;color:White; font-weight:bold&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;td&amp;gt;Book ID&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;td align=&quot;center&quot;&amp;gt;Name of Book&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;td&amp;gt;Name of Author&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;td&amp;gt;Book Price&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;xsl:for-each select=&quot;books/book&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;tr bgcolor=&quot;Snow&quot; style=&quot;color:Crimson; font-weight:normal; font-style:italic;&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;td height=&quot;10&quot; style=&quot;font-weight:bold;&quot; align=&quot;center&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;xsl:value-of select=&quot;id&quot;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;td height=&quot;10&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;xsl:value-of select=&quot;name&quot;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;td height=&quot;10&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;xsl:value-of select=&quot;author&quot;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;td height=&quot;10&quot; style=&quot;font-weight:bold;&quot; align=&quot;right&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;xsl:value-of select=&quot;price&quot;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/xsl:for-each&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/table&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/xsl:template&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;/xsl:stylesheet&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;u&gt;ITBookList.xml&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; ?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;!-- Sample XML file for various XML, XSLT, XPath example--&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;books&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;lt;book Category=&quot;XML and XSLT&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;id&amp;gt;1&amp;lt;/id&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;name&amp;gt;Beginning XML Databases&amp;lt;/name&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;author&amp;gt;Gavin Powell&amp;lt;/author&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;price&amp;gt;39.99&amp;lt;/price&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/book&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;lt;book Category=&quot;asp.net&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;id&amp;gt;2&amp;lt;/id&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;name&amp;gt;ASP.NET 3.5 Website Programming: Problem - Design - Solution&amp;lt;/name&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;author&amp;gt;Chris Love&amp;lt;/author&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;price&amp;gt;44.99&amp;lt;/price&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/book&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;lt;book Category=&quot;asp.net&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;id&amp;gt;3&amp;lt;/id&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;name&amp;gt;jQuery for ASP.NET Developers&amp;lt;/name&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;author&amp;gt;Joe Brinkman&amp;lt;/author&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;price&amp;gt;6.99&amp;lt;/price&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/book&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;lt;book Category=&quot;asp.net&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;id&amp;gt;4&amp;lt;/id&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;name&amp;gt;ASP.NET MVC 1.0 Test Driven Development: Problem - Design - Solution&amp;lt;/name&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;author&amp;gt;Emad Ibrahim&amp;lt;/author&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;price&amp;gt;49.99&amp;lt;/price&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/book&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;lt;book Category=&quot;XML and XSLT&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;id&amp;gt;5&amp;lt;/id&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;name&amp;gt;Beginning XSLT and XPath: Transforming XML Documents and Data&amp;lt;/name&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;author&amp;gt;Ian Williams&amp;lt;/author&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;price&amp;gt;49.99&amp;lt;/price&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/book&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;lt;book Category=&quot;XML and XSLT&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;id&amp;gt;6&amp;lt;/id&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;name&amp;gt;XSLT 2.0 and XPath 2.0 Programmer&#39;s Reference, 4th Edition&amp;lt;/name&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;author&amp;gt;Michael Kay&amp;lt;/author&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;price&amp;gt;59.99&amp;lt;/price&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/book&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;lt;book Category=&quot;Database&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;id&amp;gt;7&amp;lt;/id&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;name&amp;gt;Professional Microsoft SQL Server 2008 Programming&amp;lt;/name&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;author&amp;gt;Robert Vieira &amp;lt;/author&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;price&amp;gt;49.99&amp;lt;/price&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/book&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;/books&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/_MYgWdLX86tc/TH6D0vir_RI/AAAAAAAAAbY/5DVeFq3Nf6c/s1600/ITBookListXmlFile.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/_MYgWdLX86tc/TH6D0vir_RI/AAAAAAAAAbY/5DVeFq3Nf6c/s320/ITBookListXmlFile.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://addictdotnet.blogspot.com/feeds/141726063720697502/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7897092287238686391&amp;postID=141726063720697502&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/141726063720697502'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/141726063720697502'/><link rel='alternate' type='text/html' href='http://addictdotnet.blogspot.com/2010/09/using-systemxml-systemxmlxsl.html' title='Using System.Xml, System.Xml.Xsl, System.Xml.XPath Namespace in asp.net'/><author><name>Kritika Yadav</name><uri>http://www.blogger.com/profile/11146103502599644895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/-8WzNm9y4lqM/VE8YY51J2EI/AAAAAAAAG0Q/OIY-8zxRIqs/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_MYgWdLX86tc/TH6D1qSNvgI/AAAAAAAAAbg/kW-Oeucym3o/s72-c/XSLTNamespace.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7897092287238686391.post-4718427842343132622</id><published>2010-08-26T22:53:00.000-07:00</published><updated>2010-08-26T22:53:07.916-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="NULLEval"/><title type='text'>NULL In GridView EVAL Calling Serverside Method In ItemTemplate</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px;&quot;&gt;My Table in database look like as shown in image below, some columns contains NULL values and i&#39;ll be showing &quot;No Records Found&quot; instead of NULL values in GridView.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px;&quot;&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px;&quot;&gt;&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px;&quot;&gt;To achieve this i&#39;ve written a Method in code behind and will be calling this method in ItemTemplate of GridView.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px;&quot;&gt;&lt;b style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;u&gt;Html source of GridView&amp;nbsp;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px;&quot;&gt;&lt;b style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #555555; font-family: Arial, Helvetica, sans-serif; font-size: 12px;&quot;&gt;&lt;b style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;b style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;asp:GridView ID=&quot;GridView1&quot; runat=&quot;server&quot;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DataSourceID=&quot;SqlDataSource1&quot;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AutoGenerateColumns=&quot;false&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;Columns&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;asp:BoundField ShowHeader=&quot;true&quot; DataField=&quot;ID&quot;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;HeaderText=&quot;ID&quot; /&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;asp:TemplateField HeaderText=&quot;Name&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;ItemTemplate&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;asp:Label ID=&quot;Label1&quot; runat=&quot;server&quot;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Text=&#39;&amp;lt;%# CheckNull(Eval(&quot;Name&quot;)) %&amp;gt;&#39;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;/asp:Label&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;/ItemTemplate&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;/asp:TemplateField&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;asp:TemplateField HeaderText=&quot;Location&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;ItemTemplate&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;asp:Label ID=&quot;Label1&quot; runat=&quot;server&quot;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Text=&#39;&amp;lt;%# CheckNull(Eval(&quot;Location&quot;)) %&amp;gt;&#39;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;/asp:Label&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;/ItemTemplate&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;/asp:TemplateField&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;/Columns&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;/asp:GridView&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;asp:SqlDataSource ID=&quot;SqlDataSource1&quot; runat=&quot;server&quot;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;ConnectionString=&quot;&amp;lt;%$ ConnectionStrings:ConnectionString %&amp;gt;&quot;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;SelectCommand=&quot;SELECT ID, Name, Location FROM Details&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;/asp:SqlDataSource&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;b style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;u&gt;C# code for the CheckNull method&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;b style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;b style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;b style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;pre class=&quot;brush:csharp&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;protected string CheckNull(object objGrid)&lt;br /&gt;    {&lt;br /&gt;        if (object.ReferenceEquals(objGrid, DBNull.Value))&lt;br /&gt;        {&lt;br /&gt;            return &quot;No Record Found&quot;;&lt;br /&gt;        }&lt;br /&gt;        else&lt;br /&gt;        {&lt;br /&gt;            return objGrid.ToString();&lt;br /&gt;        }&lt;br /&gt;     }&lt;/pre&gt;&lt;pre class=&quot;brush:csharp&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/pre&gt;&lt;pre class=&quot;brush:csharp&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; white-space: normal;&quot;&gt;&lt;b style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;u&gt;VB.NET code behind&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;brush:csharp&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; white-space: normal;&quot;&gt;&lt;b style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;brush:csharp&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; white-space: normal;&quot;&gt;&lt;b style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;pre class=&quot;brush:vb&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Protected Function CheckNull(ByVal objGrid As Object) As String&lt;br /&gt;    If Object.ReferenceEquals(objGrid, DBNull.Value) Then&lt;br /&gt;        Return &quot;No Record Found&quot;&lt;br /&gt;    Else&lt;br /&gt;        Return objGrid.ToString()&lt;br /&gt;    End If&lt;br /&gt;End Function&lt;br /&gt;&lt;/pre&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/_MYgWdLX86tc/THdShiM53VI/AAAAAAAAAaY/a3rYp4OKkDg/s1600/1.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/_MYgWdLX86tc/THdShiM53VI/AAAAAAAAAaY/a3rYp4OKkDg/s320/1.JPG&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;http://1.bp.blogspot.com/_MYgWdLX86tc/THdSi7hsuCI/AAAAAAAAAag/ZfdaENuRyAo/s1600/2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/_MYgWdLX86tc/THdSi7hsuCI/AAAAAAAAAag/ZfdaENuRyAo/s320/2.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/b&gt;&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://addictdotnet.blogspot.com/feeds/4718427842343132622/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7897092287238686391&amp;postID=4718427842343132622&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/4718427842343132622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/4718427842343132622'/><link rel='alternate' type='text/html' href='http://addictdotnet.blogspot.com/2010/08/null-in-gridview-eval-calling.html' title='NULL In GridView EVAL Calling Serverside Method In ItemTemplate'/><author><name>Kritika Yadav</name><uri>http://www.blogger.com/profile/11146103502599644895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/-8WzNm9y4lqM/VE8YY51J2EI/AAAAAAAAG0Q/OIY-8zxRIqs/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_MYgWdLX86tc/THdShiM53VI/AAAAAAAAAaY/a3rYp4OKkDg/s72-c/1.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7897092287238686391.post-7915913190152989449</id><published>2010-08-23T23:02:00.000-07:00</published><updated>2010-08-23T23:30:06.581-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SendEmail"/><title type='text'>Send Email Using Gmail in ASP.NET</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot;   style=&quot;  color: rgb(85, 85, 85); font-family:Arial, Helvetica, sans-serif;font-size:12px;&quot;&gt;If you want to send email using your Gmail account or using Gmail&#39;s smtp server in ASP.NET application or if you don&#39;t have a working smtp server to send mails using your ASP.NET application or aspx page than sending e-mail using Gmail is best option.&lt;br /&gt;&lt;br /&gt;you need to write code like this&lt;br /&gt;&lt;span class=&quot;fullpost&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; display: inline; &quot;&gt;&lt;br /&gt;First of all add below mentioned namespace in code behind of aspx page from which you want to send the mail.&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;  color: rgb(85, 85, 85); font-family:Arial, Helvetica, sans-serif;font-size:12px;&quot;&gt;&lt;span class=&quot;fullpost&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; display: inline; &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;  color: rgb(85, 85, 85); font-family:Arial, Helvetica, sans-serif;font-size:12px;&quot;&gt;&lt;span class=&quot;fullpost&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; display: inline; &quot;&gt;&lt;pre class=&quot;csharpcode&quot;    style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;&lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;&lt;b style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;using&lt;/b&gt;&lt;/span&gt; &lt;b style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;System.Net.Mail;&lt;/b&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;    style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;&lt;b style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;    style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;&lt;b style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot; font-weight: normal; white-space: normal;  color: rgb(85, 85, 85); font-family:Arial, Helvetica, sans-serif;font-size:12px;&quot;&gt;Now write this code in click event of button.&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;    style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;&lt;b style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot; font-weight: normal; white-space: normal;  color: rgb(85, 85, 85); font-family:Arial, Helvetica, sans-serif;font-size:12px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;   style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;   font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;&quot;&gt;&lt;b style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot; font-weight: normal; white-space: normal;  font-family:Arial, Helvetica, sans-serif;font-size:12px;&quot;&gt;&lt;b style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000000;&quot;&gt;C# code&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;   style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;   font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;&quot;&gt;&lt;b style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot; font-weight: normal; white-space: normal;  font-family:Arial, Helvetica, sans-serif;font-size:12px;&quot;&gt;&lt;b style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000000;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;   style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;   font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;&quot;&gt;&lt;b style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot; font-weight: normal; white-space: normal;  font-family:Arial, Helvetica, sans-serif;font-size:12px;&quot;&gt;&lt;b style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal; color: rgb(85, 85, 85); &quot;&gt;&lt;pre class=&quot;csharpcode&quot;    style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;&lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;void&lt;/span&gt; Button1_Click(&lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;object&lt;/span&gt; sender, EventArgs e) &lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;    style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;{   &lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;    style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;MailMessage mail = &lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;new&lt;/span&gt; MailMessage();   &lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;    style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;mail.To.Add(&lt;span class=&quot;str&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 96, 128); &quot;&gt;&quot;kritika.yadav.ecb@gmail.com&quot;&lt;/span&gt;);   &lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;    style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;mail.To.Add(&lt;span class=&quot;str&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 96, 128); &quot;&gt;&quot;kriyadav@yahoo.com&quot;&lt;/span&gt;);   &lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;    style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;mail.From = &lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;new&lt;/span&gt; MailAddress(&lt;span class=&quot;str&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 96, 128); &quot;&gt;&quot;kritika.yadav.ecb@gmail.com&quot;&lt;/span&gt;);   &lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;    style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;mail.Subject = &lt;span class=&quot;str&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 96, 128); &quot;&gt;&quot;Email using Gmail&quot;&lt;/span&gt;;    &lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;    style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;&lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;string&lt;/span&gt; Body = &lt;span class=&quot;str&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 96, 128); &quot;&gt;&quot;Hi, this mail is to test sending mail&quot;&lt;/span&gt;+&lt;span class=&quot;str&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 96, 128); &quot;&gt;&quot;using Gmail in ASP.NET&quot;&lt;/span&gt;;   &lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;    style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;mail.Body = Body;    &lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;    style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;mail.IsBodyHtml = &lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;true&lt;/span&gt;;   &lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;    style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;SmtpClient smtp = &lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;new&lt;/span&gt; SmtpClient();   &lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;    style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;smtp.Host = &lt;span class=&quot;str&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 96, 128); &quot;&gt;&quot;smtp.gmail.com&quot;&lt;/span&gt;;  &lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;    style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;smtp.Credentials = &lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;new&lt;/span&gt; System.Net.NetworkCredential(&lt;span class=&quot;str&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 96, 128); &quot;&gt;&quot;YourUserName@gmail.com&quot;&lt;/span&gt;,&lt;span class=&quot;str&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 96, 128); &quot;&gt;&quot;YourGmailPassword&quot;&lt;/span&gt;);   &lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;    style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;smtp.EnableSsl = &lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;true&lt;/span&gt;;   &lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;    style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;smtp.Send(mail); &lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;    style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;}&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;    style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;    style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot; white-space: normal;  color: rgb(85, 85, 85); font-family:Arial, Helvetica, sans-serif;font-size:12px;&quot;&gt;&lt;b style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;VB.NET code &lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;    style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot; white-space: normal;  color: rgb(85, 85, 85); font-family:Arial, Helvetica, sans-serif;font-size:12px;&quot;&gt;&lt;b style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;    style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot; white-space: normal;  color: rgb(85, 85, 85); font-family:Arial, Helvetica, sans-serif;font-size:12px;&quot;&gt;&lt;b style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal; &quot;&gt;&lt;pre class=&quot;csharpcode&quot;    style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;&lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;Imports&lt;/span&gt; System.Net.Mail  &lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;    style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;&lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;Protected&lt;/span&gt;  &lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;Sub&lt;/span&gt; Button1_Click (&lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;ByVal&lt;/span&gt; sender &lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;Object&lt;/span&gt;, &lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;ByVal&lt;/span&gt; e &lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;As&lt;/span&gt; EventArgs)  &lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;    style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;&lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;Dim&lt;/span&gt; mail &lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;As&lt;/span&gt; &lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;    style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;MailMessage=&lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;New&lt;/span&gt; MailMessage()mail.&lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;To&lt;/span&gt;.Add(&lt;span class=&quot;str&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 96, 128); &quot;&gt;&quot;kritika.yadav.ecb@gmail.com&quot;)&lt;/span&gt;mail.&lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;To&lt;/span&gt;.Add(&lt;span class=&quot;str&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 96, 128); &quot;&gt;&quot;kriyadav@yahoo.com&quot;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;    style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 96, 128); &quot;&gt;&lt;/span&gt;mail.From=&lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;New&lt;/span&gt; MailAddress(&lt;span class=&quot;str&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 96, 128); &quot;&gt;&quot;kritika.yadav.ecb@gmail.com&quot;&lt;/span&gt;)mail.Subject =&lt;span class=&quot;str&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 96, 128); &quot;&gt;&quot;Email using Gmail&quot;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;    style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 96, 128); &quot;&gt;&lt;/span&gt;&lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;String&lt;/span&gt; Body=&lt;span class=&quot;str&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 96, 128); &quot;&gt;&quot;Hi,this mail is to test sending mail&quot;&lt;/span&gt;+&lt;span class=&quot;str&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 96, 128); &quot;&gt;&quot;using Gmail in ASP.NET&quot;&lt;/span&gt;   mail.Body = Body mail.IsBodyHtml = &lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;True&lt;/span&gt;   &lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;    style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;&lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;Dim&lt;/span&gt; smtp &lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;As&lt;/span&gt; SmtpClient=&lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;New&lt;/span&gt; SmtpClient()    &lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;    style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;smtp.Host=&lt;span class=&quot;str&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 96, 128); &quot;&gt;&quot;smtp.gmail.com&quot;&lt;/span&gt;  &lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;    style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;smtp.Credentials=&lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;New&lt;/span&gt; System.Net.NetworkCredential(&lt;span class=&quot;str&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 96, 128); &quot;&gt;&quot;YourUserName@gmail.com&quot;&lt;/span&gt;,&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;    style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 96, 128); &quot;&gt;&quot;YourGmailPassword&quot;)&lt;/span&gt;smtp.EnableSsl=&lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;True&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot;    style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;smtp.Send(mail) &lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;&lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;Sub&lt;/span&gt; &lt;/pre&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot; white-space: pre; font-family:monospace;&quot;&gt;&lt;b style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot; font-weight: normal; white-space: normal;  font-family:Arial, Helvetica, sans-serif;font-size:12px;&quot;&gt;&lt;b style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal; color: rgb(85, 85, 85); &quot;&gt;&lt;pre class=&quot;csharpcode&quot;    style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; display: inline !important; font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot; white-space: normal;  color: rgb(85, 85, 85); font-family:Arial, Helvetica, sans-serif;font-size:12px;&quot;&gt;&lt;b style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal; &quot;&gt;&lt;div style=&quot;display: inline !important; &quot;&gt;&lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(85, 85, 85); &quot;&gt;&lt;b style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;You also need to enable POP by going to settings Forwarding and POP in your gmail account&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(85, 85, 85); &quot;&gt;&lt;br /&gt;Change YourUserName@gmail.com to your gmail ID and YourGmailPassword to Your password for Gmail account and test the code.&lt;br /&gt;&lt;br /&gt;&lt;b style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;If your are getting error mentioned below &lt;/b&gt;&lt;br /&gt;&lt;i style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&quot;The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required.&quot;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;than you need to check your Gmail username and password.&lt;br /&gt;&lt;br /&gt;&lt;i style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;If you are behind proxy Server then you need to write below mentioned code in your web.config file .&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(85, 85, 85); &quot;&gt;&lt;i style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: normal; &quot;&gt;&lt;pre class=&quot;csharpcode&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#0000FF;&quot;&gt;&amp;lt;system.net&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#0000FF;&quot;&gt;&amp;lt;defaultProxy&amp;gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#0000FF;&quot;&gt;&amp;lt;proxy proxyaddress=&quot;YourProxyIpAddress&quot;/&amp;gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#0000FF;&quot;&gt;defaultProxy&amp;gt; system.net&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;&lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;&lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;color: rgb(85, 85, 85);  white-space: normal;  font-family:Arial, Helvetica, sans-serif;font-size:12px;&quot;&gt;&lt;b style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;If you are still having problems them try changing port number to 587 .&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; face=&quot;&#39;Courier New&#39;, Consolas, Courier, monospace&quot; size=&quot;small&quot; color=&quot;black&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    &quot;&gt;&lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;color: rgb(85, 85, 85);  white-space: normal;  font-family:Arial, Helvetica, sans-serif;font-size:12px;&quot;&gt;&lt;b style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; face=&quot;&#39;Courier New&#39;, Consolas, Courier, monospace&quot; size=&quot;small&quot; color=&quot;black&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    &quot;&gt;&lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;color: rgb(85, 85, 85);  white-space: normal;  font-family:Arial, Helvetica, sans-serif;font-size:12px;&quot;&gt;&lt;b style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal; &quot;&gt;smtp.Host = &quot;smtp.gmail.com,587&quot;;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; face=&quot;&#39;Courier New&#39;, Consolas, Courier, monospace&quot; size=&quot;small&quot; color=&quot;black&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    &quot;&gt;&lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;color: rgb(85, 85, 85);  white-space: normal;  font-family:Arial, Helvetica, sans-serif;font-size:12px;&quot;&gt;&lt;b style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal; &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; face=&quot;&#39;Courier New&#39;, Consolas, Courier, monospace&quot; size=&quot;small&quot; color=&quot;black&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    &quot;&gt;&lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;color: rgb(85, 85, 85);  white-space: normal;  font-family:Arial, Helvetica, sans-serif;font-size:12px;&quot;&gt;&lt;b style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal; &quot;&gt;If you still having problems then try changing code as mentioned below&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;&lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;color: rgb(85, 85, 85);  white-space: normal;  font-family:Arial, Helvetica, sans-serif;font-size:12px;&quot;&gt;&lt;b style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal; &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;&lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;color: rgb(85, 85, 85);  white-space: normal;  font-family:Arial, Helvetica, sans-serif;font-size:12px;&quot;&gt;&lt;b style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal; &quot;&gt;&lt;pre class=&quot;csharpcode&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    font-family:&#39;Courier New&#39;, Consolas, Courier, monospace;font-size:small;color:black;&quot;&gt;SmtpClient smtp = &lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;new&lt;/span&gt; SmtpClient(); &lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; face=&quot;&#39;Courier New&#39;, Consolas, Courier, monospace&quot; size=&quot;small&quot; color=&quot;black&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    &quot;&gt;smtp.Host=&lt;span class=&quot;str&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 96, 128); &quot;&gt;&quot;smtp.gmail.com&quot;&lt;/span&gt;; &lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; face=&quot;&#39;Courier New&#39;, Consolas, Courier, monospace&quot; size=&quot;small&quot; color=&quot;black&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    &quot;&gt;smtp.Port = 587; &lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; face=&quot;&#39;Courier New&#39;, Consolas, Courier, monospace&quot; size=&quot;small&quot; color=&quot;black&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    &quot;&gt;smtp.UseDefaultCredentials=False;&lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; face=&quot;&#39;Courier New&#39;, Consolas, Courier, monospace&quot; size=&quot;small&quot; color=&quot;black&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    &quot;&gt;smtp.Credentials=&lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;new&lt;/span&gt; System.Net.NetworkCredential(&lt;span class=&quot;str&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 96, 128); &quot;&gt;&quot;YourUserName@gmail.com&quot;&lt;/span&gt;,&lt;span class=&quot;str&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 96, 128); &quot;&gt;&quot;YourGmailPassword&quot;&lt;/span&gt;); &lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; face=&quot;&#39;Courier New&#39;, Consolas, Courier, monospace&quot; size=&quot;small&quot; color=&quot;black&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    &quot;&gt;smtp.EnableSsl=&lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;true&lt;/span&gt;; &lt;/pre&gt;&lt;pre class=&quot;csharpcode&quot; face=&quot;&#39;Courier New&#39;, Consolas, Courier, monospace&quot; size=&quot;small&quot; color=&quot;black&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;    &quot;&gt;smtp.Send(mail);&lt;/pre&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;kwrd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(85, 85, 85); &quot;&gt;&lt;i style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://addictdotnet.blogspot.com/feeds/7915913190152989449/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7897092287238686391&amp;postID=7915913190152989449&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/7915913190152989449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/7915913190152989449'/><link rel='alternate' type='text/html' href='http://addictdotnet.blogspot.com/2010/08/send-email-using-gmail-in-aspnet.html' title='Send Email Using Gmail in ASP.NET'/><author><name>Kritika Yadav</name><uri>http://www.blogger.com/profile/11146103502599644895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/-8WzNm9y4lqM/VE8YY51J2EI/AAAAAAAAG0Q/OIY-8zxRIqs/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7897092287238686391.post-8999882612446622444</id><published>2010-08-23T22:59:00.000-07:00</published><updated>2010-08-23T23:01:45.675-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PageRefresh"/><title type='text'>Detect Page Refresh In ASP.NET</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot;   style=&quot;  color: rgb(85, 85, 85); line-height: 18px; font-family:Arial, Helvetica, sans-serif;font-size:12px;&quot;&gt;If you have created a aspx page using C# and ASP.NET and have put a button on it. And in the Click event of this button if you are inserting some data in database , after click if user refresh the page than click event gets fired again resulting data insertion to database again, to stop events on the page getting fired on browser refresh we need to write bit of code to avoid it.&lt;/span&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;  color: rgb(85, 85, 85); line-height: 18px; font-family:Arial, Helvetica, sans-serif;font-size:12px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;  color: rgb(85, 85, 85); line-height: 18px; font-family:Arial, Helvetica, sans-serif;font-size:12px;&quot;&gt;&lt;div&gt;&amp;lt;%@ Page Language=&quot;C#&quot; AutoEventWireup=&quot;true&quot;&lt;/div&gt;&lt;div&gt;CodeFile=&quot;Default.aspx.cs&quot; Inherits=&quot;_Default&quot; %&amp;gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;&lt;/div&gt;&lt;div&gt;&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&amp;gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; &amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;head runat=&quot;server&quot;&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;title&amp;gt;Untitled Page&amp;lt;/title&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;/head&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;body&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;form id=&quot;form1&quot; runat=&quot;server&quot;&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;div&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;asp:Label ID=&quot;Label1&quot; runat=&quot;server&quot;&lt;/div&gt;&lt;div&gt;Text=&quot;Label&quot;&amp;gt;&amp;lt;/asp:Label&amp;gt;&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;asp:Button ID=&quot;Button1&quot; runat=&quot;server&quot;&lt;/div&gt;&lt;div&gt;OnClick=&quot;Button1_Click&quot;&lt;/div&gt;&lt;div&gt;Text=&quot;Button&quot; /&amp;gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;/form&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;/body&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;/html&amp;gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: normal; &quot;&gt;Now in the Page_Load event i m creating a Session Variable and assigning System date and time to it , and in Page_Prerender event i am creating a Viewstate variable and assigning Session variable&#39;s value to it&lt;br /&gt;Than in button&#39;s click event i am checking the values of Session variable and Viewstate variable if they both are equal than page is not refreshed otherwise it has been refreshed.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: normal; &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: normal; &quot;&gt;&lt;pre class=&quot;brush:csharp&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Session[&quot;CheckRefresh&quot;] = Server.UrlDecode(System.DateTime.Now.ToString()); }  } protected void Button1_Click(object sender, EventArgs e) { if (Session[&quot;CheckRefresh&quot;].ToString() == ViewState[&quot;CheckRefresh&quot;].ToString()) { Label1.Text = &quot;Hello&quot;; Session[&quot;CheckRefresh&quot;] = Server.UrlDecode(System.DateTime.Now.ToString()); } else { Label1.Text = &quot;Page Refreshed&quot;; } }  protected void Page_PreRender(object sender, EventArgs e) { ViewState[&quot;CheckRefresh&quot;] = Session[&quot;CheckRefresh&quot;]; } } &lt;/pre&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://addictdotnet.blogspot.com/feeds/8999882612446622444/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7897092287238686391&amp;postID=8999882612446622444&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/8999882612446622444'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/8999882612446622444'/><link rel='alternate' type='text/html' href='http://addictdotnet.blogspot.com/2010/08/detect-page-refresh-in-aspnet.html' title='Detect Page Refresh In ASP.NET'/><author><name>Kritika Yadav</name><uri>http://www.blogger.com/profile/11146103502599644895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/-8WzNm9y4lqM/VE8YY51J2EI/AAAAAAAAG0Q/OIY-8zxRIqs/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7897092287238686391.post-6481898333712880539</id><published>2010-08-23T12:37:00.000-07:00</published><updated>2010-08-23T12:40:13.521-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Datatransfercookies"/><category scheme="http://www.blogger.com/atom/ns#" term="Datatransfersession"/><title type='text'>Data Transfer Using Cookies Session Variables Data Transfer Using Cookies Session Variables in ASP.NET C# VB.NET</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px; &quot;&gt;&lt;span style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: underline; &quot;&gt;&lt;b&gt; Data Transfer Using Cookies &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px; &quot;&gt;&lt;span style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: underline; &quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px; &quot;&gt;&lt;span style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal; color: rgb(85, 85, 85); &quot;&gt;Cookies are stored in client machine and can have max size of 4kb&lt;br /&gt;To store value from textbox.&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px; &quot;&gt;&lt;span style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal; color: rgb(85, 85, 85); &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px; &quot;&gt;&lt;span style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal; color: rgb(85, 85, 85); &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: normal; &quot;&gt;protected void btnGo_Click(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;HttpCookie MyCookie = new HttpCookie(&quot;Data&quot;);&lt;br /&gt;MyCookie.Value = txtData.Text;&lt;br /&gt;MyCookie.Expires = DateTime.Now.AddDays(1);&lt;br /&gt;Response.Cookies.Add(MyCookie);&lt;br /&gt;Response.Redirect(&quot;Deault2.aspx&quot;);&lt;br /&gt;}&lt;br /&gt;&lt;span style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-weight: bold; &quot;&gt;And to retrieve data from cookie in Deault2.aspx page&lt;/span&gt;&lt;br /&gt;In the Page_Load event write&lt;br /&gt;String strData = Request.Cookies[&quot;Data&quot;].Value);&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px; &quot;&gt;&lt;span style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal; color: rgb(85, 85, 85); &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: normal; &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px; &quot;&gt;&lt;span style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal; color: rgb(85, 85, 85); &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: normal; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold; &quot;&gt;&lt;span style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: underline; &quot;&gt;Data Transfer using Session Variables&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px; &quot;&gt;&lt;span style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal; color: rgb(85, 85, 85); &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: normal; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold; &quot;&gt;&lt;span style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: underline; &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px; &quot;&gt;&lt;span style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal; color: rgb(85, 85, 85); &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: normal; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold; &quot;&gt;&lt;span style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal; &quot;&gt;Storing and retrieving Data to and from&lt;br /&gt;session variables on the page we want.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px; &quot;&gt;&lt;span style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal; color: rgb(85, 85, 85); &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: normal; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold; &quot;&gt;&lt;span style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal; &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px; &quot;&gt;&lt;span style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal; color: rgb(85, 85, 85); &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: normal; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold; &quot;&gt;&lt;span style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal; &quot;&gt;To store a value in session we need to write&lt;br /&gt;protected void btnGo_Click(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;Session[&quot;VariableName&quot;] = txtData.Text;&lt;br /&gt;Response.Redirect(&quot;Deault2.aspx&quot;);&lt;br /&gt;}&lt;br /&gt;To retrieve value from Session on other page&lt;br /&gt;string strData = Session[&quot;VariableName&quot;].ToString();&lt;br /&gt;Don&#39;t forget to use proper typecasting as session stores data as Object and we need&lt;br /&gt;to change it to desired type&lt;br /&gt;To remove Session Variables use&lt;br /&gt;Session.Contents.Remove(&quot;VariableName&quot;); or&lt;br /&gt;Session.Contents.RemoveAll(); or&lt;br /&gt;Session.Abandon();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px; &quot;&gt;&lt;span style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal; color: rgb(85, 85, 85); &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: normal; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold; &quot;&gt;&lt;span style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: underline; &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://addictdotnet.blogspot.com/feeds/6481898333712880539/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7897092287238686391&amp;postID=6481898333712880539&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/6481898333712880539'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/6481898333712880539'/><link rel='alternate' type='text/html' href='http://addictdotnet.blogspot.com/2010/08/data-transfer-using-cookies-session.html' title='Data Transfer Using Cookies Session Variables Data Transfer Using Cookies Session Variables in ASP.NET C# VB.NET'/><author><name>Kritika Yadav</name><uri>http://www.blogger.com/profile/11146103502599644895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/-8WzNm9y4lqM/VE8YY51J2EI/AAAAAAAAG0Q/OIY-8zxRIqs/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7897092287238686391.post-6950789550200751424</id><published>2010-08-23T12:29:00.000-07:00</published><updated>2010-08-23T12:35:23.018-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CrosspagePosting"/><category scheme="http://www.blogger.com/atom/ns#" term="ServerTransfer"/><category scheme="http://www.blogger.com/atom/ns#" term="SubmitFormMethod"/><title type='text'>Cross page posting, Submit Form and Server.Transfer methods for data transfer</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px; &quot;&gt;&lt;span style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;span style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;b&gt;&lt;u&gt;Cross page posting&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;u&gt; in ASP.NET&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px; &quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px; &quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal; line-height: normal; &quot;&gt;First of all we need to set the &lt;span style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-weight: bold; &quot;&gt;PostBackUrl property&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-weight: bold; &quot;&gt;of the Button&lt;/span&gt; we are gonna use for postback, to the page where we need to redirect, in our case it&#39;s &lt;span style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-weight: bold; &quot;&gt;Default2.aspx&lt;/span&gt;&lt;br /&gt;to retrieve the value of a textbox from previous page in Default2.aspx page&lt;br /&gt;we need to use &lt;span style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-weight: bold; &quot;&gt;FindControl method&lt;/span&gt; to find the textbox control of previous page&lt;br /&gt;&lt;br /&gt;TextBox txtName = (TextBox)PreviousPage.FindControl(&quot;txtUserName&quot;));&lt;br /&gt;&lt;br /&gt;lblName.text = txtName.Text.ToString()&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal; line-height: normal; color: rgb(85, 85, 85); &quot;&gt;;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px; &quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal; line-height: normal; color: rgb(85, 85, 85); &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px; &quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: normal; &quot;&gt;&lt;span style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;span style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;u&gt;Submit Form Method&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;u&gt; to post data and retrieve on another page in ASP.NET&lt;/u&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px; &quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: normal; &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px; &quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: normal; &quot;&gt;&lt;div&gt;To start with simplest method we can write code like this&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;form id=&quot;form1&quot; method=&quot;post&quot; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;action=&quot;Default2.aspx&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;Data &amp;lt;input type=&quot;text&quot; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;name=&quot;Data&quot; size=&quot;20&quot;&amp;gt;&amp;lt;br&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;input id=&quot;Submit1&quot; type=&quot;submit&quot; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;value=&quot;submit&quot; /&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;And to retrieve it on the posted page&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;lblValue.Text = Request.Form[&quot;Data&quot;];&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(85, 85, 85); &quot;&gt;asp.net does not support post method with runat=&quot;Server&quot; attribute,&lt;br /&gt;for this we will have to use javascript&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(85, 85, 85); &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(85, 85, 85); &quot;&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;form id=&quot;Form1&quot; method=&quot;post&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;runat=&quot;server&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;asp:TextBox ID=&quot;txtData&quot; runat=&quot;server&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;/asp:TextBox&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;form name=&quot;FormSubmit&quot; action=&quot;Default2.aspx&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;method=&quot;post&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;input id=&quot;Submit1&quot; type=&quot;submit&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;value=&quot;submit&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;onclick=&quot;CopyTextToHiddenField()&quot; /&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;input name=&quot;Hidden1&quot; type=&quot;hidden&quot; /&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;Ass this JavaScript in the Head section&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;of page to be posted&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;script language=&quot;javascript&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;function CopyTextToHiddenField()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;var textbox1Value = document.getElementById&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;(&quot;&amp;lt;%=TextBox1.ClientID%&amp;gt;&quot;).value;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;document.forms[1].document.getElementById&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;(&quot;Hidden1&quot;).value = textbox1Value;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;To retrieve the value of hidden field&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;in Default2.aspx page&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;lblData.Text = Request.Form[&quot;Hidden1&quot;];&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;span style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;&lt;u&gt;Server.Transfer Method&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;u&gt; in ASP.NET&lt;/u&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal; &quot;&gt;Server.Transfer method sends (transfers) all the state information&lt;br /&gt;all application/session variables and all items in the request collections)&lt;br /&gt;created in one ASPX page to a second ASPX page.&lt;br /&gt;&lt;br /&gt;you can&#39;t use Server.Transfer to send the user to an external site&lt;br /&gt;The Server.Transfer method also has a second parameter—&quot;preserveForm&quot;. If you set this to True, using a statement such as Server.Transfer(&quot;WebForm2.aspx&quot;, True), the existing query string and any form variables will still be available to the page you are transferring to.&lt;br /&gt;&lt;br /&gt;For example, if your Default.aspx has a TextBox control called TextBox1 and you transferred to Default2.aspx with the preserveForm parameter set to True, you&#39;d be able to retrieve the value of the original page TextBox control by referencing Request.Form(&quot;TextBox1&quot;).&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal; &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal; &quot;&gt;protected void Button1_Click1&lt;br /&gt;(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;Server.Transfer(&quot;Default2.aspx&quot;, true);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Now in Default2.aspx page_load event&lt;br /&gt;use the below code to get the value of TextBox1&lt;br /&gt;&lt;br /&gt;Response.Write(Request.Form[&quot;TextBox1&quot;]);&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://addictdotnet.blogspot.com/feeds/6950789550200751424/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7897092287238686391&amp;postID=6950789550200751424&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/6950789550200751424'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/6950789550200751424'/><link rel='alternate' type='text/html' href='http://addictdotnet.blogspot.com/2010/08/cross-page-posting-submit-form-and.html' title='Cross page posting, Submit Form and Server.Transfer methods for data transfer'/><author><name>Kritika Yadav</name><uri>http://www.blogger.com/profile/11146103502599644895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/-8WzNm9y4lqM/VE8YY51J2EI/AAAAAAAAG0Q/OIY-8zxRIqs/s1600/*'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7897092287238686391.post-3198983324305512714</id><published>2010-08-13T12:10:00.000-07:00</published><updated>2010-08-13T12:14:00.131-07:00</updated><title type='text'></title><content type='html'>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://3.bp.blogspot.com/_MYgWdLX86tc/TGWZaeG2CEI/AAAAAAAAAYU/W3fzxjQWcjs/s1600/XmlDataSource.gif&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 174px;&quot; src=&quot;http://3.bp.blogspot.com/_MYgWdLX86tc/TGWZaeG2CEI/AAAAAAAAAYU/W3fzxjQWcjs/s320/XmlDataSource.gif&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5504974799567718466&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot; line-height: 20px; font-size:13px;&quot;&gt;&lt;b&gt;&lt;u&gt;XmlDataSource.aspx&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;lt;%@ Page Language=&quot;C#&quot; AutoEventWireup=&quot;true&quot; CodeFile=&quot;XmlDataSource.aspx.cs&quot; Inherits=&quot;XmlDataSource&quot; %&amp;gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&amp;gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;head runat=&quot;server&quot;&amp;gt;&lt;/div&gt;&lt;div&gt;    &amp;lt;title&amp;gt;asp.net XmlDataSource: how to use&amp;lt;/title&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;/head&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;body&amp;gt;&lt;/div&gt;&lt;div&gt;    &amp;lt;form id=&quot;form1&quot; runat=&quot;server&quot;&amp;gt;&lt;/div&gt;&lt;div&gt;    &amp;lt;div&amp;gt;&lt;/div&gt;&lt;div&gt;        &amp;lt;h2 style=&quot;color:Teal&quot;&amp;gt;XmlDataSource&amp;lt;/h2&amp;gt;&lt;/div&gt;&lt;div&gt;        &amp;lt;asp:CheckBoxList &lt;/div&gt;&lt;div&gt;            ID=&quot;CheckBoxList1&quot;&lt;/div&gt;&lt;div&gt;            runat=&quot;server&quot;&lt;/div&gt;&lt;div&gt;            &amp;gt;&lt;/div&gt;&lt;div&gt;        &amp;lt;/asp:CheckBoxList&amp;gt;&lt;/div&gt;&lt;div&gt;        &amp;lt;asp:XmlDataSource &lt;/div&gt;&lt;div&gt;            ID=&quot;XmlDataSource1&quot;&lt;/div&gt;&lt;div&gt;            runat=&quot;server&quot;&lt;/div&gt;&lt;div&gt;            &amp;gt;&lt;/div&gt;&lt;div&gt;            &amp;lt;Data&amp;gt;&lt;/div&gt;&lt;div&gt;                &amp;lt;Employees&amp;gt;&lt;/div&gt;&lt;div&gt;                    &amp;lt;Employee ID=&quot;1&quot; Name=&quot;John&quot; /&amp;gt;&lt;/div&gt;&lt;div&gt;                    &amp;lt;Employee ID=&quot;1&quot; Name=&quot;Jim&quot; /&amp;gt;&lt;/div&gt;&lt;div&gt;                    &amp;lt;Employee ID=&quot;1&quot; Name=&quot;Jones&quot; /&amp;gt;&lt;/div&gt;&lt;div&gt;                    &amp;lt;Employee ID=&quot;1&quot; Name=&quot;Jenny&quot; /&amp;gt;&lt;/div&gt;&lt;div&gt;                    &amp;lt;Employee ID=&quot;1&quot; Name=&quot;Ben&quot; /&amp;gt;&lt;/div&gt;&lt;div&gt;                &amp;lt;/Employees&amp;gt;&lt;/div&gt;&lt;div&gt;            &amp;lt;/Data&amp;gt;&lt;/div&gt;&lt;div&gt;        &amp;lt;/asp:XmlDataSource&amp;gt;&lt;/div&gt;&lt;div&gt;    &amp;lt;/div&amp;gt;&lt;/div&gt;&lt;div&gt;    &amp;lt;/form&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;/body&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;/html&amp;gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot; line-height: 20px; font-size:13px;&quot;&gt;&lt;b&gt;&lt;u&gt;XmlDataSource.aspx.cs&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot; line-height: 20px; font-size:13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot; color: rgb(104, 135, 125); font-weight: bold; line-height: 20px; font-size:13px;&quot;&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;using System;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;using System.Collections;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;using System.Configuration;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;using System.Data;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;using System.Linq;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;using System.Web;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;using System.Web.Security;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;using System.Web.UI;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;using System.Web.UI.HtmlControls;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;using System.Web.UI.WebControls;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;using System.Web.UI.WebControls.WebParts;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;using System.Xml.Linq;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;public partial class XmlDataSource : System.Web.UI.Page&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;    protected void Page_Load(object sender, EventArgs e)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;    {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;        if(!this.IsPostBack)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;        {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;            CheckBoxList1.DataSourceID = &quot;XmlDataSource1&quot;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;            CheckBoxList1.DataTextField = &quot;Name&quot;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;            CheckBoxList1.DataValueField = &quot;ID&quot;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;            CheckBoxList1.RepeatColumns = 3;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;            CheckBoxList1.BorderWidth = 2;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;            CheckBoxList1.BorderColor = System.Drawing.Color.DarkGreen;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;            CheckBoxList1.BackColor = System.Drawing.Color.Green;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;            CheckBoxList1.ForeColor = System.Drawing.Color.White;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;        }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;    }&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000000;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;   &lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://addictdotnet.blogspot.com/feeds/3198983324305512714/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7897092287238686391&amp;postID=3198983324305512714&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/3198983324305512714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/3198983324305512714'/><link rel='alternate' type='text/html' href='http://addictdotnet.blogspot.com/2010/08/xmldatasource.html' title=''/><author><name>Kritika Yadav</name><uri>http://www.blogger.com/profile/11146103502599644895</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/-8WzNm9y4lqM/VE8YY51J2EI/AAAAAAAAG0Q/OIY-8zxRIqs/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_MYgWdLX86tc/TGWZaeG2CEI/AAAAAAAAAYU/W3fzxjQWcjs/s72-c/XmlDataSource.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7897092287238686391.post-3434017124204399297</id><published>2010-04-30T03:10:00.001-07:00</published><updated>2010-04-30T03:10:54.205-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="asp.net"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamic"/><category scheme="http://www.blogger.com/atom/ns#" term="Meta Tags"/><title type='text'>Dynamically Generate Meta Tags for ASP.NET Pages</title><content type='html'>&lt;div&gt;create an XML file that contains the data for the meta tags. Right click the website and choose Add &amp;gt; New Item &amp;gt; XML File. Name the file TagData.xml and add the following XML:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;lt;tags pageName=&quot;/WebForm1.aspx&quot;&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;tag name=&quot;keyword&quot; value=&quot;This is a keyword&quot;&amp;gt;&amp;lt;/tag&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;tag name=&quot;description&quot; value=&quot;This is a description&quot;&amp;gt;&amp;lt;/tag&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;tag name=&quot;author&quot; value=&quot;malcolm sheridan&quot;&amp;gt;&amp;lt;/tag&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;/tags&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;tags pageName=&quot;/ChildFolder/WebForm1.aspx&quot;&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;tag name=&quot;keyword&quot; value=&quot;This is a keyword for the child pages&quot;&amp;gt;&amp;lt;/tag&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;tag name=&quot;description&quot; value=&quot;This is a description for the child pages&quot;&amp;gt;&amp;lt;/tag&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;tag name=&quot;author&quot; value=&quot;malcolm sheridan for this page too&quot;&amp;gt;&amp;lt;/tag&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;/tags&amp;gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In the XML above I have created a parent node called metaTags. Inside I have created a tags node which contains a pageName attribute. That value is how we will match the current requested page to the XML data. Each tags node contains a tag node that corresponds to the meta data we want sent to the browser. In this example I want to set meta tags for the all the pages to have keyword, description and author meta tags, but the values rendered to the browser will differ depending on what page the user is on. In a real world scenario this information would be stored inside a database, but I decided to keep this data inside an XML file to keep it simple and focus on how to do this.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Having outlined what meta tags we want sent to the browser, we now have to write the code that will read the XML file and dynamically add the meta tags at runtime. Seeing as though we’re using Master Pages this is the ideal spot to add it. Add the following code to read the XML file:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;C#&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;XDocument doc = XDocument.Load(Server.MapPath(&quot;~/TagData.xml&quot;));&lt;/div&gt;&lt;div&gt;var metaTags = doc.Descendants(&quot;tag&quot;)&lt;/div&gt;&lt;div&gt;              .Where(o =&amp;gt; o.Parent.Attribute(&quot;pageName&quot;).Value == Request.Url.AbsolutePath)&lt;/div&gt;&lt;div&gt;               .Select(o =&amp;gt; new&lt;/div&gt;&lt;div&gt;               {&lt;/div&gt;&lt;div&gt;                    Value = o.Attribute(&quot;value&quot;).Value,&lt;/div&gt;&lt;div&gt;                    Name = o.Attribute(&quot;name&quot;).Value&lt;/div&gt;&lt;div&gt;               });&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;VB.NET&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Dim doc As XDocument = XDocument.Load(Server.MapPath(&quot;~/TagData.xml&quot;))&lt;/div&gt;&lt;div&gt;Dim metaTags = doc.Descendants(&quot;tag&quot;).Where(Function(o) o.Parent.Attribute(&quot;pageName&quot;).Value = Request.Url.AbsolutePath).Select(Function(o) New With {Key .Value = o.Attribute(&quot;value&quot;).Value, Key .Name = o.Attribute(&quot;name&quot;).Value})&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For flexibility and ease of use I have decided to use the power of LINQ to XML to read the XML data. To start with the XML document is load into an XDocument object. From there I have created a LINQ query to return all the tag nodes where the parent node has an attribute called pageName and the value is equal to the current page.   Then the object returned is an anonymous type that has a Value and Name property. The values of those properties are the value and name attribute values. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now that we have the data in memory, the next step is to create the meta tag and add it to the page dynamically. To do this you use the HtmlMeta class. This allows you programmatic access to the HTML meta tags. Add the following code below to your project:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;C#&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;foreach (var item in metaTags)&lt;/div&gt;&lt;div&gt;{               &lt;/div&gt;&lt;div&gt;     HtmlMeta meta = new HtmlMeta();&lt;/div&gt;&lt;div&gt;     meta.Name = item.Name;&lt;/div&gt;&lt;div&gt;     meta.Content = item.Value;&lt;/div&gt;&lt;div&gt;     Page.Header.Controls.Add(meta);&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;VB.NET&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For Each item In metaTags&lt;/div&gt;&lt;div&gt;       Dim meta As New HtmlMeta()&lt;/div&gt;&lt;div&gt;       meta.Name = item.Name&lt;/div&gt;&lt;div&gt;       meta.Content = item.Value&lt;/div&gt;&lt;div&gt;       Page.Header.Controls.Add(meta)&lt;/div&gt;&lt;div&gt;Next item&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The foreach loop enumerates through each item returned from the LINQ query. It assigns the Name and Content value to the HtmlMeta object. Finally the object is added to the page by calling Page.Header.Controls.Add(meta). Run the project and once the default page has loaded&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://addictdotnet.blogspot.com/feeds/3434017124204399297/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7897092287238686391&amp;postID=3434017124204399297&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/3434017124204399297'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/3434017124204399297'/><link rel='alternate' type='text/html' href='http://addictdotnet.blogspot.com/2010/04/dynamically-generate-meta-tags-for.html' title='Dynamically Generate Meta Tags for ASP.NET Pages'/><author><name>Dotnetaddict</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7897092287238686391.post-8113037879649803214</id><published>2010-04-30T03:08:00.000-07:00</published><updated>2010-04-30T03:09:27.407-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="asp.net"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="image"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="Mouse"/><title type='text'>Change Image Opacity on MouseOver using jQuery</title><content type='html'>&lt;div&gt;This short article demonstrates how to change the opacity of an image when the user hovers the mouse over an image. This article is a sample chapter from my EBook called 51 Tips, Tricks and Recipes with jQuery and ASP.NET Controls. The chapter has been modified a little to publish it as an article.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Note that for demonstration purposes, I have included jQuery and CSS code in the same page. Ideally, these resources should be created in separate folders for maintainability.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Let us quickly jump to the solution and see how we can change the opacity of an image.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;head id=&quot;Head1&quot; runat=&quot;server&quot;&amp;gt;&lt;/div&gt;&lt;div&gt;    &amp;lt;title&amp;gt;Change Image Opacity on Hovertitle&amp;gt;&lt;/div&gt;&lt;div&gt;    &amp;lt;style type=&quot;text/css&quot;&amp;gt;&lt;/div&gt;&lt;div&gt;    .imgOpa&lt;/div&gt;&lt;div&gt;    {&lt;/div&gt;&lt;div&gt;        height:250px;&lt;/div&gt;&lt;div&gt;        width:250px;&lt;/div&gt;&lt;div&gt;        opacity:0.3;&lt;/div&gt;&lt;div&gt;        filter:alpha(opacity=30);&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;div&gt;    &amp;lt;style&amp;gt;&lt;/div&gt;&lt;div&gt;    &amp;lt;script type=&quot;text/javascript&quot;&lt;/div&gt;&lt;div&gt;     src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;&amp;gt;&lt;/div&gt;&lt;div&gt;    &amp;lt;script&amp;gt; &lt;/div&gt;&lt;div&gt;    &lt;/div&gt;&lt;div&gt;    &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;/div&gt;&lt;div&gt;        $(function() {&lt;/div&gt;&lt;div&gt;            $(&#39;.imgOpa&#39;).each(function() {&lt;/div&gt;&lt;div&gt;                $(this).hover(&lt;/div&gt;&lt;div&gt;                    function() {&lt;/div&gt;&lt;div&gt;                        $(this).stop().animate({ opacity: 1.0 }, 800);&lt;/div&gt;&lt;div&gt;                    },&lt;/div&gt;&lt;div&gt;                   function() {&lt;/div&gt;&lt;div&gt;                       $(this).stop().animate({ opacity: 0.3 }, 800);&lt;/div&gt;&lt;div&gt;                   })&lt;/div&gt;&lt;div&gt;                });&lt;/div&gt;&lt;div&gt;        });&lt;/div&gt;&lt;div&gt;    &amp;lt;script&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;head&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;body&amp;gt;&lt;/div&gt;&lt;div&gt;    &amp;lt;form id=&quot;form1&quot; runat=&quot;server&quot;&amp;gt;&lt;/div&gt;&lt;div&gt;    &amp;lt;div&amp;gt;&lt;/div&gt;&lt;div&gt;        &amp;lt;h2&amp;gt;Hover over an Image to change its Transparency level&amp;lt;h2&amp;gt;&lt;/div&gt;&lt;div&gt;        &amp;lt;br /&amp;gt;&lt;/div&gt;&lt;div&gt;        &amp;lt;asp:Image ID=&quot;Image1&quot; runat=&quot;server&quot; &lt;/div&gt;&lt;div&gt;            ImageUrl=&quot;../images/1.jpg&quot; class=&quot;imgOpa&quot; /&amp;gt;&lt;/div&gt;&lt;div&gt;        &amp;lt;asp:Image ID=&quot;Image2&quot; runat=&quot;server&quot; &lt;/div&gt;&lt;div&gt;            ImageUrl=&quot;../images/2.jpg&quot; class=&quot;imgOpa&quot; /&amp;gt;&lt;/div&gt;&lt;div&gt;        &amp;lt;asp:Image ID=&quot;Image3&quot; runat=&quot;server&quot; &lt;/div&gt;&lt;div&gt;            ImageUrl=&quot;../images/3.jpg&quot; class=&quot;imgOpa&quot; /&amp;gt;&lt;/div&gt;&lt;div&gt;        &amp;lt;asp:Image ID=&quot;Image4&quot; runat=&quot;server&quot; &lt;/div&gt;&lt;div&gt;            ImageUrl=&quot;../images/4.jpg&quot; class=&quot;imgOpa&quot; /&amp;gt;&lt;/div&gt;&lt;div&gt;    &amp;lt;div&amp;gt;&lt;/div&gt;&lt;div&gt;    &amp;lt;form&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;body&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;html&amp;gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In this example, observe that the images have a class attribute ‘imgOpa’. The definition of the CSS class is as shown here:&lt;/div&gt;&lt;div&gt;    .imgOpa&lt;/div&gt;&lt;div&gt;    {&lt;/div&gt;&lt;div&gt;        height:250px;&lt;/div&gt;&lt;div&gt;        width:250px;&lt;/div&gt;&lt;div&gt;        opacity:0.3;&lt;/div&gt;&lt;div&gt;        filter:alpha(opacity=30);&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;div&gt;When the images are loaded, they are in a semitransparent state. In Firefox, Chrome and Safari, we use the opacity:n property for transparency. The opacity value can be from 0.0 - 1.0, where a lower value makes the element more transparent.&lt;/div&gt;&lt;div&gt;In IE 7 and later, we use filter:alpha(opacity=n) property for transparency, where the opacity value can be from 0-100.&lt;/div&gt;&lt;div&gt;When the user hovers the mouse over a semitransparent image, we use the jQuery hover() method to animate the opacity property from 0.3 to 1.0, thereby creating a cool effect on the images. The code to achieve this effect is shown below:&lt;/div&gt;&lt;div&gt;$(this).hover(&lt;/div&gt;&lt;div&gt;    function() {&lt;/div&gt;&lt;div&gt;        $(this).stop().animate({ opacity: 1.0 }, 800);&lt;/div&gt;&lt;div&gt;    },&lt;/div&gt;&lt;div&gt;   function() {&lt;/div&gt;&lt;div&gt;       $(this).stop().animate({ opacity: 0.3 }, 800);&lt;/div&gt;&lt;div&gt;   })&lt;/div&gt;&lt;div&gt;});&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://addictdotnet.blogspot.com/feeds/8113037879649803214/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7897092287238686391&amp;postID=8113037879649803214&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/8113037879649803214'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/8113037879649803214'/><link rel='alternate' type='text/html' href='http://addictdotnet.blogspot.com/2010/04/change-image-opacity-on-mouseover-using.html' title='Change Image Opacity on MouseOver using jQuery'/><author><name>Dotnetaddict</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7897092287238686391.post-2151417138452731122</id><published>2010-04-30T03:05:00.000-07:00</published><updated>2010-04-30T03:07:38.539-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="asp.net"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Time"/><category scheme="http://www.blogger.com/atom/ns#" term="Update"/><title type='text'>Displaying Time Spent on Page</title><content type='html'>&lt;div&gt;In order to display the time spent on the page, we will have to create an UpdatePanel that updates every second. In order for this to not affect the rest of the page, we will put other functionality in another Update Panel. To programmatically update the time, we will use an AJAX Timer control. But first, let us begin by adding a ScriptManager control to our ASPX page:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;lt;asp:scriptmanager id=&quot;SM1&quot; runat=&quot;server&quot;&amp;gt;&amp;lt;/asp:scriptmanager&amp;gt;&lt;/div&gt;&lt;div&gt;The next thing to do is add our UpdatePanel that will display the time spent on the page:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;lt;asp:UpdatePanel ID=&quot;UP_Timer&quot; runat=&quot;server&quot; RenderMode=&quot;Inline&quot; UpdateMode=&quot;Always&quot;&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;Triggers&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;/Triggers&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;ContentTemplate&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;/ContentTemplate&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;/asp:UpdatePanel&amp;gt;&lt;/div&gt;&lt;div&gt;Notice that we have included the triggers tag, as well as the content template. The trigger we are going to use will be an AJAX Timer control. Let&#39;s add that in now, as well as set the Trigger attributes:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;lt;asp:UpdatePanel ID=&quot;UP_Timer&quot; runat=&quot;server&quot; RenderMode=&quot;Inline&quot; UpdateMode=&quot;Always&quot;&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;Triggers&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;asp:AsyncPostBackTrigger ControlID=&quot;Timer1&quot; EventName=&quot;Tick&quot; /&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;/Triggers&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;ContentTemplate&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;asp:Timer ID=&quot;Timer1&quot; runat=&quot;server&quot; Interval=&quot;1000&quot; ontick=&quot;Timer1_Tick&quot; /&amp;gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;lt;asp:Literal ID=&quot;lit_Timer&quot; runat=&quot;server&quot; /&amp;gt;&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;asp:HiddenField ID=&quot;hid_Ticker&quot; runat=&quot;server&quot; Value=&quot;0&quot; /&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;/ContentTemplate&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;/asp:UpdatePanel&amp;gt;&lt;/div&gt;&lt;div&gt;We add an AsyncPostBackTrigger and set the control ID and Event Name to match our Timer control. We also set the Interval of the Timer&#39;s tick event to 1000 milliseconds. We have added a Literal control to display the time spent on the page, and then a HiddenField to store that value. We add code to the code-behind that will run every second, on the Tick event of the Timer control (we can do this by simply adding the code manually, or double-clicking the timer control in Design view):&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;protected void Page_Load(object sender, EventArgs e)&lt;/div&gt;&lt;div&gt;{ &lt;/div&gt;&lt;div&gt;if (! IsPostBack)&lt;/div&gt;&lt;div&gt;{ &lt;/div&gt;&lt;div&gt;hid_Ticker.Value = new TimeSpan(0, 0, 0).ToString();&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;protected void Timer1_Tick(object sender, EventArgs e)&lt;/div&gt;&lt;div&gt;{ &lt;/div&gt;&lt;div&gt;hid_Ticker.Value = TimeSpan.Parse(hid_Ticker.Value).Add(new TimeSpan(0, 0, 1)).ToString();&lt;/div&gt;&lt;div&gt;lit_Timer.Text = &quot;Time spent on this page: &quot; + hid_Ticker.Value.ToString();&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;First, on page load we are assigning a new value to the hidden field, of type TimeSpan. This TimeSpan is 0 hours, 0 minutes, and 0 seconds. Then on each Tick event, we add one second to that value, then display it in the Literal control. If we now run this page, we will see the page programmatically and seamlessly count up the time spent on the page.&lt;/div&gt;&lt;div&gt;To demonstrate that this will not interfere with other functions on the page, let&#39;s go ahead and add another Update Panel:&lt;/div&gt;&lt;div&gt;&amp;lt;form id=&quot;form1&quot; runat=&quot;server&quot;&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;asp:ScriptManager ID=&quot;SM1&quot; runat=&quot;server&quot; /&amp;gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;lt;asp:UpdatePanel ID=&quot;UP_Timer&quot; runat=&quot;server&quot; RenderMode=&quot;Inline&quot; UpdateMode=&quot;Always&quot;&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;Triggers&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;asp:AsyncPostBackTrigger ControlID=&quot;Timer1&quot; EventName=&quot;Tick&quot; /&amp;gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;lt;/Triggers&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;ContentTemplate&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;asp:Timer ID=&quot;Timer1&quot; runat=&quot;server&quot; Interval=&quot;1000&quot; ontick=&quot;Timer1_Tick&quot; /&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;asp:Literal ID=&quot;lit_Timer&quot; runat=&quot;server&quot; /&amp;gt;&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;asp:HiddenField ID=&quot;hid_Ticker&quot; runat=&quot;server&quot; Value=&quot;0&quot; /&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;/ContentTemplate&amp;gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;lt;/asp:UpdatePanel&amp;gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;lt;asp:UpdatePanel ID=&quot;UP_Name&quot; runat=&quot;server&quot; RenderMode=&quot;Inline&quot; UpdateMode=&quot;Conditional&quot;&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;ContentTemplate&amp;gt;&lt;/div&gt;&lt;div&gt;Add your name: &amp;lt;asp:TextBox ID=&quot;fld_Name&quot; runat=&quot;server&quot; /&amp;gt;&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;asp:Button ID=&quot;btn_Submit&quot; runat=&quot;server&quot; Text=&quot;Submit&quot; onclick=&quot;btn_Submit_Click&quot; /&amp;gt;&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;asp:Literal ID=&quot;lit_Name&quot; runat=&quot;server&quot; /&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;/ContentTemplate&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;/asp:UpdatePanel&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;/form&amp;gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;using System;&lt;/div&gt;&lt;div&gt;using System.Collections.Generic;&lt;/div&gt;&lt;div&gt;using System.Web;&lt;/div&gt;&lt;div&gt;using System.Web.UI;&lt;/div&gt;&lt;div&gt;using System.Web.UI.WebControls;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;public partial class _Default : System.Web.UI.Page&lt;/div&gt;&lt;div&gt;{ &lt;/div&gt;&lt;div&gt;protected void Page_Load(object sender, EventArgs e)&lt;/div&gt;&lt;div&gt;{ &lt;/div&gt;&lt;div&gt;if (! IsPostBack)&lt;/div&gt;&lt;div&gt;{ &lt;/div&gt;&lt;div&gt;hid_Ticker.Value = new TimeSpan(0, 0, 0).ToString();&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;protected void Timer1_Tick(object sender, EventArgs e)&lt;/div&gt;&lt;div&gt;{ &lt;/div&gt;&lt;div&gt;hid_Ticker.Value = TimeSpan.Parse(hid_Ticker.Value).Add(new TimeSpan(0, 0, 1)).ToString();&lt;/div&gt;&lt;div&gt;lit_Timer.Text = &quot;Time spent on this page: &quot; + hid_Ticker.Value.ToString();&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;protected void btn_Submit_Click(object sender, EventArgs e)&lt;/div&gt;&lt;div&gt;{ &lt;/div&gt;&lt;div&gt;lit_Name.Text = &quot;Thanks. Your name is: &quot; + fld_Name.Text;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://addictdotnet.blogspot.com/feeds/2151417138452731122/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7897092287238686391&amp;postID=2151417138452731122&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/2151417138452731122'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/2151417138452731122'/><link rel='alternate' type='text/html' href='http://addictdotnet.blogspot.com/2010/04/displaying-time-spent-on-page.html' title='Displaying Time Spent on Page'/><author><name>Dotnetaddict</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7897092287238686391.post-4481954075130727813</id><published>2010-01-11T07:42:00.000-08:00</published><updated>2010-01-11T07:44:40.267-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Client Details"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><title type='text'>JavaScript for getting user details</title><content type='html'>If you want to get user detail through java script, use this script&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!-- ONE STEP TO INSTALL IP ADDRESS:&lt;br /&gt;&lt;br /&gt;  1.  Copy the coding into the HEAD of your HTML document  --&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!-- STEP ONE: Paste this code into the HEAD of your HTML document  --&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;HEAD&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;SCRIPT LANGUAGE=&quot;JavaScript&quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!-- This script and many more are available free online at --&amp;gt;&lt;br /&gt;&amp;lt;!-- The JavaScript Source!! http://javascript.internet.com --&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!-- Begin&lt;br /&gt;// http://www.kdcgrohl.com&lt;br /&gt;&lt;br /&gt;// Depending on your server set-up,&lt;br /&gt;// you may need to use the &quot;.shtml&quot;&lt;br /&gt;// extension [instead of the &quot;html&quot;&lt;br /&gt;// or &quot;htm&quot;] as the script uses Server&lt;br /&gt;// Side Includes. To display in the&lt;br /&gt;// title bar, exclude the&lt;br /&gt;//&quot;&amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;&quot; code from the page.&lt;br /&gt;&lt;br /&gt;// This part gets the IP&lt;br /&gt;var ip = &#39;&amp;lt;!--#echo var=&quot;REMOTE_ADDR&quot;--&amp;gt;&#39;;&lt;br /&gt;&lt;br /&gt;// This part is for an alert box&lt;br /&gt;alert(&quot;Your IP address is &quot;+ip);&lt;br /&gt;&lt;br /&gt;// This part is for the status bar&lt;br /&gt;window.defaultStatus = &quot;Your IP address is &quot;+ip;&lt;br /&gt;&lt;br /&gt;// This part is for the title bar&lt;br /&gt;document.write(&quot;&amp;lt;title&amp;gt;Your IP address is &quot;+ip+&quot;&amp;lt;/title&amp;gt;&quot;);&lt;br /&gt;//  End --&amp;gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;p&amp;gt;&amp;lt;center&amp;gt;&lt;br /&gt;&amp;lt;font face=&quot;arial, helvetica&quot; size&quot;-2&quot;&amp;gt;Free JavaScripts provided&amp;lt;br&amp;gt;&lt;br /&gt;by &amp;lt;a href=&quot;http://javascriptsource.com&quot;&amp;gt;The JavaScript Source&amp;lt;/a&amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;&amp;lt;/center&amp;gt;&amp;lt;p&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!-- Script Size:  1.09 KB --&amp;gt;</content><link rel='replies' type='application/atom+xml' href='http://addictdotnet.blogspot.com/feeds/4481954075130727813/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7897092287238686391&amp;postID=4481954075130727813&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/4481954075130727813'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7897092287238686391/posts/default/4481954075130727813'/><link rel='alternate' type='text/html' href='http://addictdotnet.blogspot.com/2010/01/javascript-for-getting-user-details.html' title='JavaScript for getting user details'/><author><name>Dotnetaddict</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>