<?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-1377372602482774916</id><updated>2026-03-15T21:26:05.346-07:00</updated><category term="C#"/><category term="CSharp"/><category term="Vb.Net"/><category term="asp .net"/><category term="asp.net"/><category term="C sharp"/><category term="VB"/><category term="solved"/><category term="Gridview"/><category term=".net"/><category term="ajax"/><category term="asp"/><category term="click"/><category term="default button"/><category term="dot net"/><category term="edmx"/><category term="enter key"/><category term="entity"/><category term="entity framework"/><category term="image"/><category term="javascript"/><category term="not"/><category term="not working"/><category term="parent"/><category term="server"/><category term="session"/><category term="show"/><category term="solution"/><category term="vb .net"/><category term="10th"/><category term="13 digit"/><category term="3 extra digits"/><category term="404 not found"/><category term="5.7.1"/><category term="5th"/><category term="AssociationSet"/><category term="CurrenPageIndex"/><category term="EntitySet"/><category term="Hide"/><category term="IE8"/><category term="IsDate"/><category term="OnSelectedIndexChanged"/><category term="PageIndexChanged"/><category term="Scriptmanager"/><category term="Show hidden files and folders"/><category term="SlideToggle"/><category term="The process cannot access the file because it is being used by another process"/><category term="The version of SQL Server in use does not support datatype"/><category term="Toggle"/><category term="URL Rewrite"/><category term="Updatepanel"/><category term="User friendly URL"/><category term="Validation of viewstate MAC failed"/><category term="a generic error occurred in gdi+"/><category term="access"/><category term="administratively"/><category term="allowed"/><category term="business day"/><category term="button"/><category term="c #"/><category term="cache"/><category term="calculate"/><category term="calendar"/><category term="cells"/><category term="checkbox list"/><category term="child"/><category term="client javascript value server side"/><category term="convert unix time to datetime c#"/><category term="copy"/><category term="copy directory"/><category term="database"/><category term="database change"/><category term="datagrid"/><category term="datalist"/><category term="date difference"/><category term="datetime2"/><category term="debugging"/><category term="denied"/><category term="directory"/><category term="directory.delete"/><category term="directory.move"/><category term="disable browser back button"/><category term="div without changing position"/><category term="document.ready"/><category term="dropdownlist"/><category term="enter"/><category term="entity model"/><category term="equal td column width"/><category term="error"/><category term="file"/><category term="files"/><category term="fixed position div"/><category term="folders"/><category term="function"/><category term="gdi"/><category term="godaddy"/><category term="hidden"/><category term="html"/><category term="iframe"/><category term="iis7"/><category term="invalid json"/><category term="issue"/><category term="jQuery"/><category term="json"/><category term="large file upload"/><category term="logged out"/><category term="mail"/><category term="mailbox"/><category term="mapping"/><category term="microsoft"/><category term="months"/><category term="move"/><category term="next"/><category term="nth"/><category term="paging"/><category term="php"/><category term="previous"/><category term="redirect"/><category term="refresh"/><category term="rename ldf"/><category term="rename mdf"/><category term="rename mdf ldf"/><category term="rename sql server database"/><category term="rename sql server files"/><category term="rename sql server physical files"/><category term="resolved"/><category term="response"/><category term="same image"/><category term="scroll position postback control asp.net 1.1 asp.net 2.0 asp.net 3.5 asp.net 4.0"/><category term="session expired"/><category term="session expires"/><category term="smtp"/><category term="sql"/><category term="sql server"/><category term="static div"/><category term="string"/><category term="subdomain"/><category term="sys is undefined"/><category term="tab sequence"/><category term="tabs"/><category term="timer"/><category term="timestamp to date"/><category term="timestamp to datetime"/><category term="unix epoch"/><category term="unix time to date"/><category term="unix time to datetime"/><category term="update"/><category term="valid json"/><category term="vb dot net"/><category term="virus"/><category term="visible = false"/><category term="windows"/><category term="windows xp"/><category term="working"/><category term="working day"/><category term="xp"/><title type='text'>Solving ASP .Net Issues</title><subtitle type='html'>During my life of ASP .Net development I came across some issues which I am trying to bind at one place with the solution for other people.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://issuesdotnet.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://issuesdotnet.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>36</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1377372602482774916.post-8494215248323262779</id><published>2025-03-11T02:03:00.000-07:00</published><updated>2025-03-11T02:03:02.754-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="rename ldf"/><category scheme="http://www.blogger.com/atom/ns#" term="rename mdf"/><category scheme="http://www.blogger.com/atom/ns#" term="rename mdf ldf"/><category scheme="http://www.blogger.com/atom/ns#" term="rename sql server database"/><category scheme="http://www.blogger.com/atom/ns#" term="rename sql server files"/><category scheme="http://www.blogger.com/atom/ns#" term="rename sql server physical files"/><category scheme="http://www.blogger.com/atom/ns#" term="sql"/><category scheme="http://www.blogger.com/atom/ns#" term="sql server"/><title type='text'>How to rename SQL Server Database with physical files ( MDF and LDF )</title><content type='html'>&lt;p&gt;&amp;nbsp;Even though this is rare but there can be scenarios where you may have to rename the SQL Server database along with the physical database files ( i.e. MDF and LDF )&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://issuesdotnet.blogspot.com/feeds/8494215248323262779/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://issuesdotnet.blogspot.com/2025/03/how-to-rename-sql-server-database-with-physical-files-mdf-ldf.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/8494215248323262779'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/8494215248323262779'/><link rel='alternate' type='text/html' href='http://issuesdotnet.blogspot.com/2025/03/how-to-rename-sql-server-database-with-physical-files-mdf-ldf.html' title='How to rename SQL Server Database with physical files ( MDF and LDF )'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1377372602482774916.post-7024533143448149739</id><published>2024-08-06T05:00:00.000-07:00</published><updated>2024-08-06T05:00:01.118-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c #"/><category scheme="http://www.blogger.com/atom/ns#" term="C sharp"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="CSharp"/><category scheme="http://www.blogger.com/atom/ns#" term="invalid json"/><category scheme="http://www.blogger.com/atom/ns#" term="json"/><category scheme="http://www.blogger.com/atom/ns#" term="string"/><category scheme="http://www.blogger.com/atom/ns#" term="valid json"/><title type='text'>Check if string is valid JSON - C# ( C sharp - Csharp )</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Please use the following function. If you don&#39;t have Newtonsoft installed then you need to add Newtonsoft first. You can do this using Visual Studio &#39;s NuGet package manage from Tools menu.&lt;br /&gt;&lt;br /&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt; line-height: 115%; mso-bidi-font-family: &amp;quot;Cascadia Mono&amp;quot;;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;using&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt; line-height: 115%;&quot;&gt; Newtonsoft.Json.Linq;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;div style=&quot;width: 100%;&quot;&gt;&lt;div style=&quot;text-align: left; width: 100%;&quot;&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt; mso-bidi-font-family: &amp;quot;Cascadia Mono&amp;quot;;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;private&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt; mso-bidi-font-family: &amp;quot;Cascadia Mono&amp;quot;;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt; mso-bidi-font-family: &amp;quot;Cascadia Mono&amp;quot;;&quot;&gt;bool&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt; IsValidJson(&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt; mso-bidi-font-family: &amp;quot;Cascadia Mono&amp;quot;;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt; strInput)&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;{&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt; mso-bidi-font-family: &amp;quot;Cascadia Mono&amp;quot;;&quot;&gt;try&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;.IsNullOrWhiteSpace(strInput))&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; strInput =
strInput.Trim();&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt; ((strInput.StartsWith(&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;&quot;{&quot;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;) &amp;amp;&amp;amp;
strInput.EndsWith(&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;&quot;}&quot;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;)) || (strInput.StartsWith(&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;&quot;[&quot;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;) &amp;amp;&amp;amp; strInput.EndsWith(&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;&quot;]&quot;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;)))&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;try&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&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;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt; obj = JToken.Parse(strInput);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&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;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;catch&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&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;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;else&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;catch&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;font-family: Cascadia Mono;&quot;&gt;&lt;span style=&quot;font-size: 12.6667px;&quot;&gt;json , valid json , string , c# , c # , csharp , c sharp , invalid json&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://issuesdotnet.blogspot.com/feeds/7024533143448149739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://issuesdotnet.blogspot.com/2024/08/check-if-string-is-valid-json-charp-c-sharp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/7024533143448149739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/7024533143448149739'/><link rel='alternate' type='text/html' href='http://issuesdotnet.blogspot.com/2024/08/check-if-string-is-valid-json-charp-c-sharp.html' title='Check if string is valid JSON - C# ( C sharp - Csharp )'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1377372602482774916.post-5358436386564423449</id><published>2022-07-22T04:14:00.006-07:00</published><updated>2022-07-22T04:33:29.832-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="13 digit"/><category scheme="http://www.blogger.com/atom/ns#" term="3 extra digits"/><category scheme="http://www.blogger.com/atom/ns#" term="asp.net"/><category scheme="http://www.blogger.com/atom/ns#" term="C sharp"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="convert unix time to datetime c#"/><category scheme="http://www.blogger.com/atom/ns#" term="CSharp"/><category scheme="http://www.blogger.com/atom/ns#" term="timestamp to date"/><category scheme="http://www.blogger.com/atom/ns#" term="timestamp to datetime"/><category scheme="http://www.blogger.com/atom/ns#" term="unix epoch"/><category scheme="http://www.blogger.com/atom/ns#" term="unix time to date"/><category scheme="http://www.blogger.com/atom/ns#" term="unix time to datetime"/><title type='text'>UNIX Time to DateTime - Timestamp to DateTime - C# (C Sharp)</title><content type='html'>&lt;p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Unix time is the number of seconds that have elapsed since the 01 January 1970 00:00:00 UTC.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;01 January 1970 00:00:00 UTC is called Unix epoch.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Following short and simple (2 liner) C# (CSharp) function will return the DateTime for the provided Unix Time (Timestamp)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;&lt;span style=&quot;color: blue; mso-bidi-font-family: &amp;quot;Cascadia Mono&amp;quot;;&quot;&gt;public&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; mso-bidi-font-family: &amp;quot;Cascadia Mono&amp;quot;;&quot;&gt;static&lt;/span&gt;&lt;span&gt; DateTime UnixTimeToDateTime(&lt;/span&gt;&lt;span style=&quot;color: blue; mso-bidi-font-family: &amp;quot;Cascadia Mono&amp;quot;;&quot;&gt;long&lt;/span&gt;&lt;span&gt; TimeStamp)&lt;br /&gt;&lt;/span&gt;&lt;span&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;if&lt;/span&gt;&lt;span&gt; (TimeStamp.ToString().Length
== 13)&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;{&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;text-indent: 0px;&quot;&gt;&lt;span style=&quot;color: green; font-family: arial; text-indent: 0.5in;&quot;&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;span&gt;&amp;nbsp; &lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;//It means the timestamp is in milliseconds and we need seconds.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-indent: 0px;&quot;&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;&lt;span style=&quot;text-indent: 0.5in;&quot;&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;//&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;So divide by 1000 to get seconds&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;text-indent: 0.5in;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;TimeStamp = TimeStamp / 1000;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-indent: 0px;&quot;&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;&lt;span&gt;







&lt;/span&gt;&lt;span style=&quot;text-indent: 0.5in;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;DateTime UnixEpoch = &lt;/span&gt;&lt;span style=&quot;color: blue; text-indent: 0.5in;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;text-indent: 0.5in;&quot;&gt; DateTime(1970, 1, 1, 0, 0, 0, 0);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; text-indent: 0.5in;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;return&lt;/span&gt;&lt;span style=&quot;text-indent: 0.5in;&quot;&gt;
UnixEpoch.AddSeconds(TimeStamp);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;text-indent: 48px;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Cascadia Mono&amp;quot;; font-size: 9.5pt; text-indent: 48px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;span&gt;&lt;!--more--&gt;&lt;/span&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;unix time to datetime, unix time to date, timestamp to datetime, timestamp to date, c#, c sharp, csharp, asp.net, unix epoch, convert unix time to datetime c#, 13 digit, 3 extra dgits&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://issuesdotnet.blogspot.com/feeds/5358436386564423449/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://issuesdotnet.blogspot.com/2022/07/unix-time-to-datetime-timestamp-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/5358436386564423449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/5358436386564423449'/><link rel='alternate' type='text/html' href='http://issuesdotnet.blogspot.com/2022/07/unix-time-to-datetime-timestamp-to.html' title='UNIX Time to DateTime - Timestamp to DateTime - C# (C Sharp)'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1377372602482774916.post-7414407061306046628</id><published>2013-07-08T00:05:00.000-07:00</published><updated>2013-07-08T00:06:30.113-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="10th"/><category scheme="http://www.blogger.com/atom/ns#" term="5th"/><category scheme="http://www.blogger.com/atom/ns#" term="asp.net"/><category scheme="http://www.blogger.com/atom/ns#" term="business day"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="calculate"/><category scheme="http://www.blogger.com/atom/ns#" term="CSharp"/><category scheme="http://www.blogger.com/atom/ns#" term="nth"/><category scheme="http://www.blogger.com/atom/ns#" term="VB"/><category scheme="http://www.blogger.com/atom/ns#" term="Vb.Net"/><category scheme="http://www.blogger.com/atom/ns#" term="working day"/><title type='text'>5th, 10th, nth working (business) day from today (or anydate)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Here is a little piece of code using which you can calculate 5th, 10th or nth (here n can be any number) working (business) day from today (or any given date).&lt;br /&gt;
Note that we are assumiung that Saturday and Sunday are weekend, you can change the code if your weekend is not on Saturday, Sunday.&lt;br /&gt;
btnCalc is the button on which&#39;s click we are calling the function to calculate and&amp;nbsp;lblDate is the label where we are showing the nth working (business) date.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #660000; font-size: x-large;&quot;&gt;C# (CSharp)&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;protected&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; btnCalc_Click(&lt;span style=&quot;color: blue;&quot;&gt;object&lt;/span&gt;
sender, &lt;span style=&quot;color: #2b91af;&quot;&gt;EventArgs&lt;/span&gt; e)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;//Here I am
calculating 10th working (business) day from today. You can replace the
parameter 10 with your required number of working (business) day&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;//Also I am
calculating from today, you can give your required Date as parameter as well at
the place of DateTime.Now&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lblDate.Text =
calculateNthWorkingDay(10, &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;.Now).ToString();
&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt; calculateNthWorkingDay(&lt;span style=&quot;color: blue;&quot;&gt;int&lt;/span&gt; n, &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;
pFromDate) &lt;span style=&quot;color: green;&quot;&gt;//n=Number of working day.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;int&lt;/span&gt;
mWorkingDays = 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: blue;&quot;&gt;int&lt;/span&gt; i = 1; i &amp;lt;= n; i++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pFromDate = pFromDate.AddDays(1);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt;
(!IsWeekEnd(pFromDate))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&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; mWorkingDays++;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;else&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&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; n++;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt;
pFromDate;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;bool&lt;/span&gt; IsWeekEnd(&lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;
pDateTime)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;bool&lt;/span&gt;
isWeekEnd = &lt;span style=&quot;color: blue;&quot;&gt;false&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt;
((pDateTime.DayOfWeek == &lt;span style=&quot;color: #2b91af;&quot;&gt;DayOfWeek&lt;/span&gt;.Saturday)
|| (pDateTime.DayOfWeek == &lt;span style=&quot;color: #2b91af;&quot;&gt;DayOfWeek&lt;/span&gt;.Sunday))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; isWeekEnd = &lt;span style=&quot;color: blue;&quot;&gt;true&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt;
isWeekEnd;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #660000; font-size: x-large;&quot;&gt;
VB.Net&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;Protected&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;Sub&lt;/span&gt; btnCalc_Click(sender &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;Object&lt;/span&gt;, e &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;EventArgs&lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;&#39;Here I am
calculating 10th working (business) day from today. You can replace the
parameter 10 with your required number of working (business) day&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;&#39;Also I am
calculating from today, you can give your required Date as parameter as well at
the place of DateTime.Now&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lblDate.Text =
calculateNthWorkingDay(10, &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;.Now).ToString()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Sub&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Function&lt;/span&gt; calculateNthWorkingDay(n &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Integer&lt;/span&gt;, pFromDate
&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;)
&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;&#39;n=Number of
working day.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt;
mWorkingDays &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Integer&lt;/span&gt;
= 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;For&lt;/span&gt; i &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Integer&lt;/span&gt; = 1 &lt;span style=&quot;color: blue;&quot;&gt;To&lt;/span&gt; n&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pFromDate = pFromDate.AddDays(1)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;If&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Not&lt;/span&gt; IsWeekEnd(pFromDate) &lt;span style=&quot;color: blue;&quot;&gt;Then&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&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; mWorkingDays += 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Else&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&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; n += 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;If&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Next&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Return&lt;/span&gt;
pFromDate&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Function&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Function&lt;/span&gt; IsWeekEnd(pDateTime &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;
&lt;span style=&quot;color: #2b91af;&quot;&gt;DateTime&lt;/span&gt;) &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;Boolean&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt;
isWeekEnd &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Boolean&lt;/span&gt;
= &lt;span style=&quot;color: blue;&quot;&gt;False&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;If&lt;/span&gt;
(pDateTime.DayOfWeek = &lt;span style=&quot;color: #2b91af;&quot;&gt;DayOfWeek&lt;/span&gt;.Saturday) &lt;span style=&quot;color: blue;&quot;&gt;OrElse&lt;/span&gt; (pDateTime.DayOfWeek = &lt;span style=&quot;color: #2b91af;&quot;&gt;DayOfWeek&lt;/span&gt;.Sunday) &lt;span style=&quot;color: blue;&quot;&gt;Then&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; isWeekEnd1 = &lt;span style=&quot;color: blue;&quot;&gt;True&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;If&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Return&lt;/span&gt;
isWeekEnd1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Function&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://issuesdotnet.blogspot.com/feeds/7414407061306046628/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://issuesdotnet.blogspot.com/2013/07/5th-10th-nth-working-business-day-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/7414407061306046628'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/7414407061306046628'/><link rel='alternate' type='text/html' href='http://issuesdotnet.blogspot.com/2013/07/5th-10th-nth-working-business-day-from.html' title='5th, 10th, nth working (business) day from today (or anydate)'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1377372602482774916.post-1993378676789239809</id><published>2013-03-05T01:47:00.000-08:00</published><updated>2013-03-05T01:47:01.285-08: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="CurrenPageIndex"/><category scheme="http://www.blogger.com/atom/ns#" term="datagrid"/><category scheme="http://www.blogger.com/atom/ns#" term="Gridview"/><category scheme="http://www.blogger.com/atom/ns#" term="PageIndexChanged"/><category scheme="http://www.blogger.com/atom/ns#" term="paging"/><category scheme="http://www.blogger.com/atom/ns#" term="Vb.Net"/><title type='text'>Datagrid/GridView Paging not working if set(initialize) from codebehind</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Okay, here is another frustrating issue which you may face while using Datagrid or Gridview and you want to set (initialize) paging from code behind.&lt;br /&gt;
Your code will looks perfect to you but still paging is not functional.&lt;br /&gt;
Your code may look like&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #660000; font-size: large;&quot;&gt;C#&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp; gvUsers.DataSource = mDtUsers; //&lt;span style=&quot;color: green;&quot;&gt;mDtUsers is your datasource.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;gvUsers.DataBind();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;gvUsers.AllowPaging =&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;true;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;gvUsers.PageSize = mPageSize;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;gvUsers.CurrentPageIndex = 0;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #660000; font-size: large;&quot;&gt;VB.Net&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp; gvUsers.DataSource =
mDtUsers &lt;span style=&quot;color: green;&quot;&gt;&#39;mDtUsers is your datasource.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;gvUsers.DataBind()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;gvUsers.AllowPaging = &lt;span style=&quot;color: blue;&quot;&gt;True&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;gvUsers.PageSize =
mPageSize&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;gvUsers.CurrentPageIndex = 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;o:p&gt;Everything looks fine? Yeh it do but still paging not functional. So whats the solution?&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;o:p&gt;&lt;b&gt;&lt;span style=&quot;color: #cc0000; font-size: large;&quot;&gt;The Solution&lt;/span&gt;&lt;/b&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
Solution is pretty easy and straight forward and in fact you don&#39;t have to add any extra line of code, you simply have to change the sequence of statements. That means set (initialize) the paging before the binding of Datagrid/Gridview and everything will be working perfect, it means your code should be like&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #660000; font-size: large;&quot;&gt;C#&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp; gvUsers.AllowPaging =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;true;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;gvUsers.PageSize = mPageSize;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;gvUsers.CurrentPageIndex = 0;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp; gvUsers.DataSource = mDtUsers; //&lt;span style=&quot;color: green;&quot;&gt;mDtUsers is your datasource.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;gvUsers.DataBind();&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #660000; font-size: large;&quot;&gt;VB.Net&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp; gvUsers.AllowPaging =&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;True&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;gvUsers.PageSize = mPageSize&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;gvUsers.CurrentPageIndex = 0&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp; gvUsers.DataSource = mDtUsers&amp;nbsp;&lt;span style=&quot;color: green;&quot;&gt;&#39;mDtUsers is your datasource.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;gvUsers.DataBind()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Hope this simnply solution will solve your problem.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
Happy Coding! :)&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://issuesdotnet.blogspot.com/feeds/1993378676789239809/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://issuesdotnet.blogspot.com/2013/03/datagridgridview-paging-not-working-if.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/1993378676789239809'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/1993378676789239809'/><link rel='alternate' type='text/html' href='http://issuesdotnet.blogspot.com/2013/03/datagridgridview-paging-not-working-if.html' title='Datagrid/GridView Paging not working if set(initialize) from codebehind'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1377372602482774916.post-7496326425193766612</id><published>2013-03-01T01:55:00.000-08:00</published><updated>2013-03-01T01:55:12.718-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ajax"/><category scheme="http://www.blogger.com/atom/ns#" term="asp.net"/><category scheme="http://www.blogger.com/atom/ns#" term="C sharp"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="click"/><category scheme="http://www.blogger.com/atom/ns#" term="document.ready"/><category scheme="http://www.blogger.com/atom/ns#" term="Hide"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="not working"/><category scheme="http://www.blogger.com/atom/ns#" term="Scriptmanager"/><category scheme="http://www.blogger.com/atom/ns#" term="show"/><category scheme="http://www.blogger.com/atom/ns#" term="SlideToggle"/><category scheme="http://www.blogger.com/atom/ns#" term="Toggle"/><category scheme="http://www.blogger.com/atom/ns#" term="Updatepanel"/><category scheme="http://www.blogger.com/atom/ns#" term="Vb.Net"/><title type='text'>jQuery not working in UpdatePanel </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
If you are reading this then this means that you are facing the same problem which I faced and the problem is that jQuery functions are not working after any of the event occurred within the Updatepanel.&lt;br /&gt;
&lt;br /&gt;
I mean suppose you are showing and hiding some DIV using jQuery .show() amd .hide(), the DIV resides in an updatepanel where you have another button as well which is a server side button and calls the Server side event using AJAX (update panel), after doing your work of this button you try to show/hide the DIV but you get surprised as the jQuery function is no more being called.&lt;br /&gt;
&lt;br /&gt;
You jQuery code would be like this&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;text/javascript&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;language&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;javascript&quot;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp; $(document).ready(&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt; () {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;$(&lt;/span&gt;&lt;span style=&quot;color: maroon; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&quot;#btnTest&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;).click(&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; () {&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$(&lt;span style=&quot;color: maroon;&quot;&gt;&quot;#dvTest&quot;&lt;/span&gt;).show(); &lt;span style=&quot;color: #38761d;&quot;&gt;//Here you could be having hide/toggle/slideToggle etc etc&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;});&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp; });&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;o:p&gt;&lt;b&gt;&lt;span style=&quot;color: red; font-size: large;&quot;&gt;Solution&lt;/span&gt;&lt;/b&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;o:p&gt;So whats the solution? Solution is very easy and simple. Use your jQuery code as following&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;text/javascript&quot;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;language&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;javascript&quot;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp; $(document).ready(&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt; () {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;$(&lt;span style=&quot;color: maroon;&quot;&gt;&#39;#btnTest&#39;&lt;/span&gt;).live(&lt;span style=&quot;color: maroon;&quot;&gt;&#39;click&#39;&lt;/span&gt;, &lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt;
() {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;$(&lt;span style=&quot;color: maroon;&quot;&gt;&#39;#dvTest&#39;&lt;/span&gt;).show();&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 13px;&quot;&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;//Here you could be having hide/toggle/slideToggle etc etc&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;false&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;});&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;});&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;o:p&gt;Hope your issue is solved?&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;o:p&gt;Happy coding :)&lt;/o:p&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://issuesdotnet.blogspot.com/feeds/7496326425193766612/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://issuesdotnet.blogspot.com/2013/03/jquery-not-working-in-updatepanel.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/7496326425193766612'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/7496326425193766612'/><link rel='alternate' type='text/html' href='http://issuesdotnet.blogspot.com/2013/03/jquery-not-working-in-updatepanel.html' title='jQuery not working in UpdatePanel '/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1377372602482774916.post-661654561088852261</id><published>2012-12-25T01:56:00.000-08:00</published><updated>2012-12-25T01:58:07.615-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="files"/><category scheme="http://www.blogger.com/atom/ns#" term="folders"/><category scheme="http://www.blogger.com/atom/ns#" term="hidden"/><category scheme="http://www.blogger.com/atom/ns#" term="issue"/><category scheme="http://www.blogger.com/atom/ns#" term="microsoft"/><category scheme="http://www.blogger.com/atom/ns#" term="not"/><category scheme="http://www.blogger.com/atom/ns#" term="not working"/><category scheme="http://www.blogger.com/atom/ns#" term="resolved"/><category scheme="http://www.blogger.com/atom/ns#" term="show"/><category scheme="http://www.blogger.com/atom/ns#" term="Show hidden files and folders"/><category scheme="http://www.blogger.com/atom/ns#" term="solution"/><category scheme="http://www.blogger.com/atom/ns#" term="solved"/><category scheme="http://www.blogger.com/atom/ns#" term="virus"/><category scheme="http://www.blogger.com/atom/ns#" term="windows"/><category scheme="http://www.blogger.com/atom/ns#" term="windows xp"/><category scheme="http://www.blogger.com/atom/ns#" term="working"/><category scheme="http://www.blogger.com/atom/ns#" term="xp"/><title type='text'>[RESOLVED] Show Hidden Files and Folders not working. Windows XP </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Though the problem and solution is not at all related with ASP.Net but still is an&amp;nbsp;irritating&amp;nbsp;issue.&lt;br /&gt;
&lt;br /&gt;
Okay here is the problem,&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #073763;&quot;&gt;(Note that this issue is created normally due to some virus so I am supposing that you have scanned your system with some good Anti Virus with latest virus&amp;nbsp;definitions)&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
You have to &lt;span style=&quot;color: red;&quot;&gt;&#39;Show the hidden files and folders&#39;.&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;1. &lt;/b&gt;You go to Tools -&amp;gt; Folder Options -&amp;gt; View Tab.&lt;br /&gt;
&lt;b&gt;2.&lt;/b&gt; Then you check the &lt;span style=&quot;color: red;&quot;&gt;&quot;Show hidden files and folders&quot;&lt;/span&gt; options and click Ok (or Apply then Ok).&lt;br /&gt;
Now hidden files and folders are supposed to be available but when you check they are still not there.&lt;br /&gt;
Frustrated? Yeah obviously. you repeat above two steps several times but each times either you see the option &lt;span style=&quot;color: red;&quot;&gt;&quot;Do not show hidden files and folders&quot;&lt;/span&gt; checked in View Tab or no option checked even you have checked the&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;&quot;Show hidden files and folders&quot; &lt;/span&gt;multiple times.&lt;br /&gt;
This is really frustrating I know. Anyways here are three methods you should follow in sequence. If you are good at luck the Solution 1 will serve you or then the Solution 2, and if you are not so good at luck then Solution 3 will surely work for you :). Note that even if &amp;nbsp;your problem get solved using Solution 3 then still you will be luck (no matter less).&lt;br /&gt;
All the best!&lt;br /&gt;
&lt;br /&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: #990000; font-size: large;&quot;&gt;Solution 1:&lt;/span&gt;&lt;/h2&gt;
&lt;b&gt;1.&lt;/b&gt; Click Start -&amp;gt; Run&lt;br /&gt;
&lt;b&gt;
2.&lt;/b&gt; Type regedit and click Ok.&lt;br /&gt;
&lt;b&gt;
3. &lt;/b&gt;Find the key: &lt;b&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;
4.&lt;/b&gt; Look at the &lt;span style=&quot;color: #38761d;&quot;&gt;&quot;CheckedValue&quot;&lt;/span&gt; key in the pane at right &amp;nbsp;This should be a &lt;span style=&quot;color: #38761d;&quot;&gt;DWORD &lt;/span&gt;key. If it is not &lt;span style=&quot;color: #38761d;&quot;&gt;DWORD &lt;/span&gt;key then delete it.&lt;br /&gt;
&lt;b&gt;
5.&lt;/b&gt; If you have deleted the&amp;nbsp;&lt;span style=&quot;color: #38761d;&quot;&gt;&quot;CheckedValue&quot;&lt;/span&gt; at step or&amp;nbsp;&lt;span style=&quot;color: #38761d;&quot;&gt;&quot;CheckedValue&quot; &lt;/span&gt;was not present in right pane then&amp;nbsp;Create a new key called &lt;span style=&quot;color: #38761d;&quot;&gt;&quot;CheckedValue&quot;&lt;/span&gt; as a &lt;span style=&quot;color: #38761d;&quot;&gt;DWORD &lt;/span&gt;with a value of 1 by right clicking in the right pane Else if&amp;nbsp;&lt;span style=&quot;color: #38761d;&quot;&gt;&quot;CheckedValue&quot;&lt;/span&gt; was there with value other than 1 then double click&amp;nbsp;&lt;span style=&quot;color: #38761d;&quot;&gt;&quot;CheckedValue&quot;&lt;/span&gt; and set the value 1.&lt;br /&gt;
&lt;b&gt;
6.&lt;/b&gt; The&amp;nbsp;&lt;span style=&quot;color: #38761d;&quot;&gt;&quot;DefaultValue&quot;&lt;/span&gt; (its &lt;span style=&quot;color: #38761d;&quot;&gt;DWORD&lt;/span&gt; value as well) key should be having value 2 in right pane. If its not having value 2 or is not &lt;span style=&quot;color: #38761d;&quot;&gt;DWORD &lt;/span&gt;then delete and create with value 2 just like you created&amp;nbsp;&lt;span style=&quot;color: #38761d;&quot;&gt;&quot;CheckedValue&quot; &lt;/span&gt;at step 5.&lt;br /&gt;
&lt;b&gt;7.&lt;/b&gt; Find the key:&lt;br /&gt;
&lt;b&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\NOHIDDEN&lt;/b&gt;&lt;br /&gt;
its the key&amp;nbsp;adjacent of the key at step 3.&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;8.&lt;/b&gt; Look the values of&amp;nbsp;&lt;span style=&quot;color: #38761d;&quot;&gt;&quot;CheckedValue&quot;&lt;/span&gt; and&amp;nbsp;&lt;span style=&quot;color: #38761d;&quot;&gt;&quot;DefaultValue&quot;&lt;/span&gt;, both of these are &lt;span style=&quot;color: #38761d;&quot;&gt;DWORD &lt;/span&gt;and should be having value = 2. If not &lt;span style=&quot;color: #38761d;&quot;&gt;DWORD &lt;/span&gt;or having any value other than 2 then delete or update just like you did at step 5.&lt;br /&gt;
&lt;b&gt;9.&lt;/b&gt;&amp;nbsp;Close the Registry Editor and&amp;nbsp;check the option &lt;span style=&quot;color: red;&quot;&gt;&quot;Show hidden files and folders&quot;&lt;/span&gt;. If its a success then Congratulations! and if its a fail then don&#39;t be panic and go to Solution 2.&lt;br /&gt;
&lt;br /&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: #990000; font-size: large;&quot;&gt;Solution 2:&lt;/span&gt;&lt;/h2&gt;
&lt;b&gt;1.&lt;/b&gt; Click Start -&amp;gt; Run&lt;br /&gt;
&lt;b&gt;2.&lt;/b&gt; Type regedit and click Ok.&lt;br /&gt;
&lt;b&gt;3.&lt;/b&gt; Find the key:&amp;nbsp;&lt;b&gt;HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;4.&lt;/b&gt; Check for the key &lt;span style=&quot;color: #38761d;&quot;&gt;&quot;Hidden&quot;&lt;/span&gt; (of type &lt;span style=&quot;color: #38761d;&quot;&gt;DWORD&lt;/span&gt;) in right pane. If its not a &lt;span style=&quot;color: #38761d;&quot;&gt;DWORD &lt;/span&gt;key then delete it.&lt;br /&gt;
&lt;b&gt;5.&lt;/b&gt; If you have deleted the &lt;span style=&quot;color: #38761d;&quot;&gt;&quot;Hidden&quot;&lt;/span&gt; key or if it was not there then Create a new &lt;span style=&quot;color: #38761d;&quot;&gt;DWORD &lt;/span&gt;value type key by right clicking in Right Pane and set the value =1 else if it was there with any value other than 1 then set it to 1.&lt;br /&gt;
&lt;b&gt;6. &lt;/b&gt;Close the Registry Editor and Check the &lt;span style=&quot;color: red;&quot;&gt;&quot;Show hidden files and folders&quot;&lt;/span&gt; option.&amp;nbsp;&amp;nbsp;If its a success then Congratulations! and if its a fail then don&#39;t be panic and go to Solution 2.&lt;br /&gt;
&lt;br /&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: #990000; font-size: large;&quot;&gt;Solution 3:&lt;/span&gt;&lt;/h2&gt;
&lt;b&gt;1. &lt;/b&gt;Click Start -&amp;gt; Run&lt;br /&gt;
&lt;b&gt;2.&lt;/b&gt; Type cmd and click Ok. This will open the Command Prompt (DOS)&lt;br /&gt;
&lt;b&gt;3.&lt;/b&gt; Type&lt;b&gt; regsvr32 /i browseui.dll &lt;/b&gt;then press the Enter key, wait for a confirmation window. (You can type this directly in RUN and can press enter and then can wait for t he confirmation window)&lt;br /&gt;
&lt;b&gt;4. &lt;/b&gt;Type &lt;b&gt;regsvr32 /i shell32.dll&lt;/b&gt; then press the Enter key, wait for a confirmation window.&amp;nbsp;(You can type this directly in RUN and can press enter and then can wait for t he confirmation window)&lt;br /&gt;
&lt;b&gt;5.&lt;/b&gt; All done. Now check the option &lt;span style=&quot;color: red;&quot;&gt;&quot;Show hidden files and folders&quot;&lt;/span&gt; which should now be working.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have followed above steps carefully and your system is Virus free then you must have solved the problem. If problem still exists or you can not any step from above then please comment.&lt;br /&gt;
&lt;br /&gt;
All the best.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://issuesdotnet.blogspot.com/feeds/661654561088852261/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://issuesdotnet.blogspot.com/2012/12/resolved-show-hidden-files-and-folders.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/661654561088852261'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/661654561088852261'/><link rel='alternate' type='text/html' href='http://issuesdotnet.blogspot.com/2012/12/resolved-show-hidden-files-and-folders.html' title='[RESOLVED] Show Hidden Files and Folders not working. Windows XP '/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1377372602482774916.post-175723320351592236</id><published>2012-12-04T23:49:00.003-08:00</published><updated>2012-12-04T23:51:25.514-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="asp"/><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="dropdownlist"/><category scheme="http://www.blogger.com/atom/ns#" term="Gridview"/><category scheme="http://www.blogger.com/atom/ns#" term="OnSelectedIndexChanged"/><category scheme="http://www.blogger.com/atom/ns#" term="Vb.Net"/><title type='text'>[SOLVED] Dropdownlist SelectedIndexChanged (OnSelectedIndexChanged) From GridView</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
You may want to implement some functionality on changing index of a drop down list which is provided within a grid for multi records. I too had to do the same and searched over internet for some suitable solution. Though there are more than one solutions but the solution I am providing is most easy of them and requires no tricks.&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #660000;&quot;&gt;The Solution&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;color: #38761d;&quot;&gt;Note the RED BOLD code of HTML view, which means you will have to set EnableViewState=&quot;false&quot; for the griview and also you will have to set AutoPostBack=&quot;true&quot; for the dropdownlist.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #38761d;&quot;&gt;&lt;br /&gt;&lt;/span&gt;Here is your &lt;b&gt;GridView code (The HTML)&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;asp:GridView runat=&quot;server&quot; ID=&quot;gvTest&quot; Width=&quot;50%&quot; AutoGenerateColumns=&quot;false&quot; &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;EnableViewState=&quot;false&quot;&lt;/span&gt;&lt;/b&gt;&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Columns&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;asp:BoundField DataField=&quot;Gender&quot; HeaderText=&quot;Gender&quot; HeaderStyle-HorizontalAlign=&quot;Left&quot; /&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;asp:TemplateField &amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;ItemTemplate&amp;gt;&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;lt;asp:DropDownList ID=&quot;ddlTest&quot; &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;AutoPostBack=&quot;true&quot;&lt;/span&gt;&lt;/b&gt; runat=&quot;server&quot; OnSelectedIndexChanged=&quot;ddlTest_SelectedIndexChanged&quot;&amp;gt;&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;lt;asp:ListItem Value=&quot;Male&quot;&amp;gt;Male&amp;lt;/asp:ListItem&amp;gt;&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;lt;asp:ListItem Value=&quot;Female&quot;&amp;gt;Female&amp;lt;/asp:ListItem&amp;gt;&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;lt;/asp:DropDownList&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/ItemTemplate&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/asp:TemplateField&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/Columns&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/asp:GridView&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And here is &lt;b&gt;Code behind&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #990000;&quot;&gt;1. C#&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;protected&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;
void Page_Load(object sender, System.EventArgs e)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;try&lt;/span&gt; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&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; FillGridView();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;span style=&quot;color: blue;&quot;&gt;catch&lt;/span&gt;
(Exception ex) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&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; Response.Write(ex.Message);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;
void FillGridView()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;try&lt;/span&gt; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&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; DataTable dt = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; DataTable();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&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; dt.Columns.Add(&quot;Gender&quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&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; DataRow dr = null;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&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; dr = dt.NewRow();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&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; dr[&quot;Gender&quot;] = &quot;I
am a &quot;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&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; dt.Rows.Add(dr);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&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; gvTest.DataSource = dt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&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; gvTest.DataBind();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;span style=&quot;color: blue;&quot;&gt;catch&lt;/span&gt;
(Exception ex) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&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; Response.Write(ex.Message);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;protected&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;
void ddlTest_SelectedIndexChanged(object sender, System.EventArgs e)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;try&lt;/span&gt; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&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; Response.Write(&quot;You selected
&quot; + ((DropDownList)sender).SelectedItem.Value);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;span style=&quot;color: blue;&quot;&gt;catch&lt;/span&gt;
(Exception ex) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&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; Response.Write(ex.Message);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #990000;&quot;&gt;2. VB.Net&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;Protected&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;Sub&lt;/span&gt; Page_Load(sender &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;Object&lt;/span&gt;, e &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;
System.&lt;span style=&quot;color: #2b91af;&quot;&gt;EventArgs&lt;/span&gt;) &lt;span style=&quot;color: blue;&quot;&gt;Handles&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;Me&lt;/span&gt;.Load&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Try&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FillGridView()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Catch&lt;/span&gt;
ex &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Exception&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.Write(ex.Message)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Try&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Sub&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Private&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Sub&lt;/span&gt; FillGridView()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Try&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt;
dt &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;DataTable&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&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.Add(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Gender&quot;&lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt;
dr &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;DataRow&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dr = dt.NewRow&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dr(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Gender&quot;&lt;/span&gt;)
= &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;I am a &quot;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&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(dr)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gvTest.DataSource = dt&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gvTest.DataBind()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Catch&lt;/span&gt;
ex &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Exception&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.Write(ex.Message)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Try&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Sub&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Protected&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Sub&lt;/span&gt; ddlTest_SelectedIndexChanged(sender &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Object&lt;/span&gt;, e &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; System.&lt;span style=&quot;color: #2b91af;&quot;&gt;EventArgs&lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Try&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.Write(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;You selected &quot;&lt;/span&gt; &amp;amp; &lt;span style=&quot;color: blue;&quot;&gt;CType&lt;/span&gt;(sender, &lt;span style=&quot;color: #2b91af;&quot;&gt;DropDownList&lt;/span&gt;).SelectedItem.Value)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Catch&lt;/span&gt;
ex &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Exception&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.Write(ex.Message)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Try&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Sub&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://issuesdotnet.blogspot.com/feeds/175723320351592236/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://issuesdotnet.blogspot.com/2012/12/solved-dropdownlist-selectedindexchange.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/175723320351592236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/175723320351592236'/><link rel='alternate' type='text/html' href='http://issuesdotnet.blogspot.com/2012/12/solved-dropdownlist-selectedindexchange.html' title='[SOLVED] Dropdownlist SelectedIndexChanged (OnSelectedIndexChanged) From GridView'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1377372602482774916.post-9205698714482588604</id><published>2012-09-12T06:18:00.003-07:00</published><updated>2012-09-12T06:19:45.645-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="5.7.1"/><category scheme="http://www.blogger.com/atom/ns#" term="administratively"/><category scheme="http://www.blogger.com/atom/ns#" term="allowed"/><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="CSharp"/><category scheme="http://www.blogger.com/atom/ns#" term="denied"/><category scheme="http://www.blogger.com/atom/ns#" term="error"/><category scheme="http://www.blogger.com/atom/ns#" term="godaddy"/><category scheme="http://www.blogger.com/atom/ns#" term="mail"/><category scheme="http://www.blogger.com/atom/ns#" term="mailbox"/><category scheme="http://www.blogger.com/atom/ns#" term="not"/><category scheme="http://www.blogger.com/atom/ns#" term="response"/><category scheme="http://www.blogger.com/atom/ns#" term="server"/><category scheme="http://www.blogger.com/atom/ns#" term="smtp"/><category scheme="http://www.blogger.com/atom/ns#" term="solved"/><category scheme="http://www.blogger.com/atom/ns#" term="Vb.Net"/><title type='text'>[SOLVED] Mailbox name not allowed. The server response was: sorry, your mail was administratively denied.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
If your website is hosted at &lt;b&gt;Godaddy.com&lt;/b&gt; then you may face this error while using &lt;b&gt;SMTP&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Mailbox name not allowed. The server response was: sorry, your mail was administratively denied. (#5.7.1)&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;Whats the reason? And he solution.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
the only reason of this error is that &lt;b&gt;Godaddy&lt;/b&gt; only allows those email addresses in &lt;b&gt;FROM&lt;/b&gt; clause which are from same domain.&lt;br /&gt;
Suppose your domain is &lt;b&gt;mydomain.com&lt;/b&gt; then only those Mails will be sent which are having an Email address in their &lt;b&gt;FROM &lt;/b&gt;clause which is from &lt;b&gt;mydomain.com&lt;/b&gt;. Its not must that the email address should exist. You can use imaginary mail address like &lt;b&gt;noreply@mydomain.com&lt;/b&gt; etc etc. The only restriction is that the email address should be of same domain.&lt;br /&gt;
&lt;br /&gt;
Let us suppose your domain is &lt;b&gt;mydomain.com&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;C#&lt;/b&gt;&lt;br /&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
  &lt;w:View&gt;Normal&lt;/w:View&gt;
  &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
  &lt;w:TrackMoves/&gt;
  &lt;w:TrackFormatting/&gt;
  &lt;w:PunctuationKerning/&gt;
  &lt;w:ValidateAgainstSchemas/&gt;
  &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
  &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
  &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
  &lt;w:DoNotPromoteQF/&gt;
  &lt;w:LidThemeOther&gt;EN-US&lt;/w:LidThemeOther&gt;
  &lt;w:LidThemeAsian&gt;X-NONE&lt;/w:LidThemeAsian&gt;
  &lt;w:LidThemeComplexScript&gt;AR-SA&lt;/w:LidThemeComplexScript&gt;
  &lt;w:Compatibility&gt;
   &lt;w:BreakWrappedTables/&gt;
   &lt;w:SnapToGridInCell/&gt;
   &lt;w:WrapTextWithPunct/&gt;
   &lt;w:UseAsianBreakRules/&gt;
   &lt;w:DontGrowAutofit/&gt;
   &lt;w:SplitPgBreakAndParaMark/&gt;
   &lt;w:DontVertAlignCellWithSp/&gt;
   &lt;w:DontBreakConstrainedForcedTables/&gt;
   &lt;w:DontVertAlignInTxbx/&gt;
   &lt;w:Word11KerningPairs/&gt;
   &lt;w:CachedColBalance/&gt;
  &lt;/w:Compatibility&gt;
  &lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;
  &lt;m:mathPr&gt;
   &lt;m:mathFont m:val=&quot;Cambria Math&quot;/&gt;
   &lt;m:brkBin m:val=&quot;before&quot;/&gt;
   &lt;m:brkBinSub m:val=&quot;--&quot;/&gt;
   &lt;m:smallFrac m:val=&quot;off&quot;/&gt;
   &lt;m:dispDef/&gt;
   &lt;m:lMargin m:val=&quot;0&quot;/&gt;
   &lt;m:rMargin m:val=&quot;0&quot;/&gt;
   &lt;m:defJc m:val=&quot;centerGroup&quot;/&gt;
   &lt;m:wrapIndent m:val=&quot;1440&quot;/&gt;
   &lt;m:intLim m:val=&quot;subSup&quot;/&gt;
   &lt;m:naryLim m:val=&quot;undOvr&quot;/&gt;
  &lt;/m:mathPr&gt;&lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;br /&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:LatentStyles DefLockedState=&quot;false&quot; DefUnhideWhenUsed=&quot;true&quot;
  DefSemiHidden=&quot;true&quot; DefQFormat=&quot;false&quot; DefPriority=&quot;99&quot;
  LatentStyleCount=&quot;267&quot;&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;0&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Normal&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;heading 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 7&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 8&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 9&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 7&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 8&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 9&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;35&quot; QFormat=&quot;true&quot; Name=&quot;caption&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;10&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Title&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;1&quot; Name=&quot;Default Paragraph Font&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;11&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Subtitle&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;22&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Strong&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;20&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Emphasis&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;59&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Table Grid&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Placeholder Text&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;1&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;No Spacing&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Revision&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;34&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;List Paragraph&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;29&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Quote&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;30&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Intense Quote&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;19&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Subtle Emphasis&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;21&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Intense Emphasis&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;31&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Subtle Reference&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;32&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Intense Reference&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;33&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Book Title&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;37&quot; Name=&quot;Bibliography&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; QFormat=&quot;true&quot; Name=&quot;TOC Heading&quot;/&gt;
 &lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
 {mso-style-name:&quot;Table Normal&quot;;
 mso-tstyle-rowband-size:0;
 mso-tstyle-colband-size:0;
 mso-style-noshow:yes;
 mso-style-priority:99;
 mso-style-qformat:yes;
 mso-style-parent:&quot;&quot;;
 mso-padding-alt:0in 5.4pt 0in 5.4pt;
 mso-para-margin-top:0in;
 mso-para-margin-right:0in;
 mso-para-margin-bottom:10.0pt;
 mso-para-margin-left:0in;
 line-height:115%;
 mso-pagination:widow-orphan;
 font-size:11.0pt;
 font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
 mso-ascii-font-family:Calibri;
 mso-ascii-theme-font:minor-latin;
 mso-fareast-font-family:&quot;Times New Roman&quot;;
 mso-fareast-theme-font:minor-fareast;
 mso-hansi-font-family:Calibri;
 mso-hansi-theme-font:minor-latin;}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;MailMessage
mMailMessage = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;MailMessage&lt;/span&gt;(&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;MailAddress&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&lt;b&gt;noreply@mydomain.com&lt;/b&gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;No Reply&quot;&lt;/span&gt;), &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt;
&lt;span style=&quot;color: #2b91af;&quot;&gt;MailAddress&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;anybody@testdomain.com&quot;&lt;/span&gt;,
&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Test User&quot;&lt;/span&gt;));&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;mMailMessage.Subject = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Email Subject&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt;
mEmailBody = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Email
Body&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;mMailMessage.Body = pEmailBody;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;mMailMessage.IsBodyHtml = &lt;span style=&quot;color: blue;&quot;&gt;true&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;SmtpClient mSMTPClient = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;SmtpClient&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;relay-hosting.secureserver.net&quot;&lt;/span&gt;, 25);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;mSMTPClient.Send(mMailMessage);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;mMailMessage.Dispose();&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;VB.Net&lt;/b&gt;&lt;br /&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
  &lt;w:View&gt;Normal&lt;/w:View&gt;
  &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
  &lt;w:TrackMoves/&gt;
  &lt;w:TrackFormatting/&gt;
  &lt;w:PunctuationKerning/&gt;
  &lt;w:ValidateAgainstSchemas/&gt;
  &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
  &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
  &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
  &lt;w:DoNotPromoteQF/&gt;
  &lt;w:LidThemeOther&gt;EN-US&lt;/w:LidThemeOther&gt;
  &lt;w:LidThemeAsian&gt;X-NONE&lt;/w:LidThemeAsian&gt;
  &lt;w:LidThemeComplexScript&gt;AR-SA&lt;/w:LidThemeComplexScript&gt;
  &lt;w:Compatibility&gt;
   &lt;w:BreakWrappedTables/&gt;
   &lt;w:SnapToGridInCell/&gt;
   &lt;w:WrapTextWithPunct/&gt;
   &lt;w:UseAsianBreakRules/&gt;
   &lt;w:DontGrowAutofit/&gt;
   &lt;w:SplitPgBreakAndParaMark/&gt;
   &lt;w:DontVertAlignCellWithSp/&gt;
   &lt;w:DontBreakConstrainedForcedTables/&gt;
   &lt;w:DontVertAlignInTxbx/&gt;
   &lt;w:Word11KerningPairs/&gt;
   &lt;w:CachedColBalance/&gt;
  &lt;/w:Compatibility&gt;
  &lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;
  &lt;m:mathPr&gt;
   &lt;m:mathFont m:val=&quot;Cambria Math&quot;/&gt;
   &lt;m:brkBin m:val=&quot;before&quot;/&gt;
   &lt;m:brkBinSub m:val=&quot;--&quot;/&gt;
   &lt;m:smallFrac m:val=&quot;off&quot;/&gt;
   &lt;m:dispDef/&gt;
   &lt;m:lMargin m:val=&quot;0&quot;/&gt;
   &lt;m:rMargin m:val=&quot;0&quot;/&gt;
   &lt;m:defJc m:val=&quot;centerGroup&quot;/&gt;
   &lt;m:wrapIndent m:val=&quot;1440&quot;/&gt;
   &lt;m:intLim m:val=&quot;subSup&quot;/&gt;
   &lt;m:naryLim m:val=&quot;undOvr&quot;/&gt;
  &lt;/m:mathPr&gt;&lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;br /&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:LatentStyles DefLockedState=&quot;false&quot; DefUnhideWhenUsed=&quot;true&quot;
  DefSemiHidden=&quot;true&quot; DefQFormat=&quot;false&quot; DefPriority=&quot;99&quot;
  LatentStyleCount=&quot;267&quot;&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;0&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Normal&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;heading 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 7&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 8&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 9&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 7&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 8&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 9&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;35&quot; QFormat=&quot;true&quot; Name=&quot;caption&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;10&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Title&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;1&quot; Name=&quot;Default Paragraph Font&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;11&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Subtitle&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;22&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Strong&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;20&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Emphasis&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;59&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Table Grid&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Placeholder Text&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;1&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;No Spacing&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Revision&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;34&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;List Paragraph&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;29&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Quote&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;30&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Intense Quote&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;19&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Subtle Emphasis&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;21&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Intense Emphasis&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;31&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Subtle Reference&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;32&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Intense Reference&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;33&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Book Title&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;37&quot; Name=&quot;Bibliography&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; QFormat=&quot;true&quot; Name=&quot;TOC Heading&quot;/&gt;
 &lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
 {mso-style-name:&quot;Table Normal&quot;;
 mso-tstyle-rowband-size:0;
 mso-tstyle-colband-size:0;
 mso-style-noshow:yes;
 mso-style-priority:99;
 mso-style-qformat:yes;
 mso-style-parent:&quot;&quot;;
 mso-padding-alt:0in 5.4pt 0in 5.4pt;
 mso-para-margin-top:0in;
 mso-para-margin-right:0in;
 mso-para-margin-bottom:10.0pt;
 mso-para-margin-left:0in;
 line-height:115%;
 mso-pagination:widow-orphan;
 font-size:11.0pt;
 font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
 mso-ascii-font-family:Calibri;
 mso-ascii-theme-font:minor-latin;
 mso-fareast-font-family:&quot;Times New Roman&quot;;
 mso-fareast-theme-font:minor-fareast;
 mso-hansi-font-family:Calibri;
 mso-hansi-theme-font:minor-latin;}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;
mMailMessage &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;MailMessage&lt;/span&gt;
= &lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;MailMessage&lt;/span&gt;(&lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;MailAddress&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;noreply@mydomain.com&quot;&lt;/span&gt;, &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;No Reply&quot;&lt;/span&gt;), &lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt;
&lt;span style=&quot;color: #2b91af;&quot;&gt;MailAddress&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;anybody@testdomain.com&quot;&lt;/span&gt;,
&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Test User&quot;&lt;/span&gt;))&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;mMailMessage.Subject = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Email Subject&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt;
mEmailBody &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;String&lt;/span&gt;
= &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Email Body&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;mMailMessage.Body = pEmailBody&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;mMailMessage.IsBodyHtml = &lt;span style=&quot;color: blue;&quot;&gt;True&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt;
mSMTPClient &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;SmtpClient&lt;/span&gt;
= &lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;SmtpClient&lt;/span&gt;(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;relay-hosting.secureserver.net&quot;&lt;/span&gt;, 25)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;mSMTPClient.Send(mMailMessage)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;mMailMessage.Dispose()&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://issuesdotnet.blogspot.com/feeds/9205698714482588604/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://issuesdotnet.blogspot.com/2012/09/solved-mailbox-name-not-allowed-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/9205698714482588604'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/9205698714482588604'/><link rel='alternate' type='text/html' href='http://issuesdotnet.blogspot.com/2012/09/solved-mailbox-name-not-allowed-server.html' title='[SOLVED] Mailbox name not allowed. The server response was: sorry, your mail was administratively denied.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1377372602482774916.post-3102284596151820211</id><published>2012-08-09T01:12:00.001-07:00</published><updated>2012-11-14T20:44:49.639-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AssociationSet"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="CSharp"/><category scheme="http://www.blogger.com/atom/ns#" term="database"/><category scheme="http://www.blogger.com/atom/ns#" term="edmx"/><category scheme="http://www.blogger.com/atom/ns#" term="entity"/><category scheme="http://www.blogger.com/atom/ns#" term="entity framework"/><category scheme="http://www.blogger.com/atom/ns#" term="entity model"/><category scheme="http://www.blogger.com/atom/ns#" term="EntitySet"/><category scheme="http://www.blogger.com/atom/ns#" term="mapping"/><category scheme="http://www.blogger.com/atom/ns#" term="VB"/><category scheme="http://www.blogger.com/atom/ns#" term="Vb.Net"/><title type='text'>No mapping specified for the following EntitySet/AssociationSet</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
You can get this error when you have generated your Entity Model from a database.&lt;br /&gt;
This error means that due to any issue (update/delete etc) the Entity mappings are not same as the Database.&lt;br /&gt;
&lt;br /&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #660000;&quot;&gt;Solution&lt;/span&gt;&lt;/b&gt;&lt;/h2&gt;
There can be seen many solutions to this problem over internet but the best solution as far as I know is&lt;br /&gt;
1. Double Click the edmx file to open the Entity Model in design view.&lt;br /&gt;
2. Press Ctrl A to select all objects within Entity Model.&lt;br /&gt;
3. Now press Delete to delete all objects.&lt;br /&gt;
4. Again generate your Entity model from Database using &quot;Update Model from Database&quot; option given in context menu (Right Click).&lt;br /&gt;
5. All done.&lt;br /&gt;
&lt;br /&gt;
Hope this will help.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Happy Coding :)&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://issuesdotnet.blogspot.com/feeds/3102284596151820211/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://issuesdotnet.blogspot.com/2012/08/no-mapping-specified-for-following.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/3102284596151820211'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/3102284596151820211'/><link rel='alternate' type='text/html' href='http://issuesdotnet.blogspot.com/2012/08/no-mapping-specified-for-following.html' title='No mapping specified for the following EntitySet/AssociationSet'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1377372602482774916.post-2369383100882908201</id><published>2012-06-06T05:45:00.000-07:00</published><updated>2012-06-06T05:47:02.532-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".net"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="copy"/><category scheme="http://www.blogger.com/atom/ns#" term="copy directory"/><category scheme="http://www.blogger.com/atom/ns#" term="CSharp"/><category scheme="http://www.blogger.com/atom/ns#" term="directory"/><category scheme="http://www.blogger.com/atom/ns#" term="directory.move"/><category scheme="http://www.blogger.com/atom/ns#" term="dot net"/><category scheme="http://www.blogger.com/atom/ns#" term="move"/><category scheme="http://www.blogger.com/atom/ns#" term="VB"/><category scheme="http://www.blogger.com/atom/ns#" term="Vb.Net"/><title type='text'>Copy Directory without using Directory.Move [SOLVED]</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Following function will copy a directory/folder from one place to another without using &lt;b&gt;Directory.Move.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Q:&lt;/b&gt; Why we need following function if &lt;b&gt;Directory.Move&lt;/b&gt; is there?&lt;br /&gt;
&lt;b&gt;A: &lt;/b&gt;Because&lt;b&gt; Directory.Move&lt;/b&gt;&amp;nbsp;expires(deletes) the session whenever you use it.&lt;br /&gt;
&lt;br /&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;

&lt;span style=&quot;font-size: large;&quot;&gt;VB&lt;/span&gt;&lt;/h3&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;Private&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;Sub&lt;/span&gt; CopyDirectory(pSourcePath &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;String&lt;/span&gt;, pDestinationPath &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;String&lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;For&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Each&lt;/span&gt; dirPath &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;String&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;In&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Directory&lt;/span&gt;.GetDirectories(pSourcePath, &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;*&quot;&lt;/span&gt;, &lt;span style=&quot;color: #2b91af;&quot;&gt;SearchOption&lt;/span&gt;.AllDirectories)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #2b91af;&quot;&gt;Directory&lt;/span&gt;.CreateDirectory(dirPath.Replace(pSourcePath,
pDestinationPath))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Next&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;For&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Each&lt;/span&gt; newPath &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;String&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;In&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Directory&lt;/span&gt;.GetFiles(pSourcePath, &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;*.*&quot;&lt;/span&gt;, &lt;span style=&quot;color: #2b91af;&quot;&gt;SearchOption&lt;/span&gt;.AllDirectories)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #2b91af;&quot;&gt;File&lt;/span&gt;.Copy(newPath,
newPath.Replace(pSourcePath, pDestinationPath))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Next&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Sub&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;

&lt;span style=&quot;font-size: large;&quot;&gt;C#&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt;
void CopyDirectory(string pSourcePath, string pDestinationPath)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (string dirPath &lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt; Directory.GetDirectories(pSourcePath,
&quot;*&quot;, SearchOption.AllDirectories)) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&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; Directory.CreateDirectory(dirPath.Replace(pSourcePath,
pDestinationPath));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (string newPath &lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt; Directory.GetFiles(pSourcePath, &quot;*.*&quot;,
SearchOption.AllDirectories)) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&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; File.Copy(newPath,
newPath.Replace(pSourcePath, pDestinationPath));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://issuesdotnet.blogspot.com/feeds/2369383100882908201/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://issuesdotnet.blogspot.com/2012/06/copy-directory-without-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/2369383100882908201'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/2369383100882908201'/><link rel='alternate' type='text/html' href='http://issuesdotnet.blogspot.com/2012/06/copy-directory-without-using.html' title='Copy Directory without using Directory.Move [SOLVED]'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1377372602482774916.post-2945854450414995341</id><published>2012-06-05T01:22:00.000-07:00</published><updated>2012-06-06T05:45:59.302-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".net"/><category scheme="http://www.blogger.com/atom/ns#" term="C sharp"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="CSharp"/><category scheme="http://www.blogger.com/atom/ns#" term="directory.delete"/><category scheme="http://www.blogger.com/atom/ns#" term="dot net"/><category scheme="http://www.blogger.com/atom/ns#" term="logged out"/><category scheme="http://www.blogger.com/atom/ns#" term="session expired"/><category scheme="http://www.blogger.com/atom/ns#" term="session expires"/><category scheme="http://www.blogger.com/atom/ns#" term="VB"/><category scheme="http://www.blogger.com/atom/ns#" term="Vb.Net"/><title type='text'>Directory.Delete expires the session [SOLVED]</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Yet another frustrating error. That when you delete a directory the session gets expired automatically.&lt;br /&gt;
This is a known issue and is actually a default behavior and is defined in following words.&lt;br /&gt;
&lt;b&gt;It is the default nature if you are deleting a subdirectory within your 
application, your app domain will restart. This removes all session 
data.&lt;/b&gt;&lt;br /&gt;
How to overcome this issue?&lt;br /&gt;
Here are the 3 possible solutions for this issue.&lt;br /&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;

&lt;span style=&quot;color: #990000; font-size: x-large;&quot;&gt;Solution 1:&lt;/span&gt;&lt;/h2&gt;
Make your directory outside application directory.&lt;br /&gt;
Here is the explanation how to use the directory which is outside. I got this solution from the given link as well.&lt;br /&gt;
&lt;a href=&quot;http://stackoverflow.com/questions/502743/asp-net-deleting-a-directory-results-in-application-restart&quot; target=&quot;_blank&quot;&gt;http://stackoverflow.com/questions/502743/asp-net-deleting-a-directory-results-in-application-restart&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;

&lt;span style=&quot;color: #990000; font-size: x-large;&quot;&gt;Solution 2:&lt;/span&gt;&lt;/h2&gt;
Don&#39;t delete the directory but only delete files in directory and sub directories. This will at least release the memory. Here is my function to Delete all files (and not directories). Simply call it instead of the &lt;b&gt;Directory.Delete&lt;/b&gt; Statement.&lt;br /&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;

&lt;span style=&quot;font-size: large;&quot;&gt;VB&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;Private&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;Sub&lt;/span&gt; DeleteFiles(pDirectoryPath &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;String&lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;For&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;Each&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; mFile &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;In&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;
System.IO.&lt;/span&gt;&lt;span style=&quot;color: #2b91af; font-family: Consolas; font-size: 9.5pt;&quot;&gt;Directory&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;.GetFiles(pDirectoryPath)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.IO.&lt;span style=&quot;color: #2b91af;&quot;&gt;File&lt;/span&gt;.Delete(mFile)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Next&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;For&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;Each&lt;/span&gt; mDirectory &lt;span style=&quot;color: blue;&quot;&gt;In&lt;/span&gt;
System.IO.&lt;span style=&quot;color: #2b91af;&quot;&gt;Directory&lt;/span&gt;.GetDirectories(pDirectoryPath)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DeleteFiles(mDirectory)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;Next&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;End&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;Sub&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;

&lt;/h3&gt;
&lt;h3&gt;

&lt;span style=&quot;font-family: inherit; font-size: large;&quot;&gt;CSharp (C#)&lt;/span&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt;
void DeleteFiles(string pDirectoryPath)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (object mFile_loopVariable &lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt; System.IO.Directory.GetFiles(pDirectoryPath)) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&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; mFile = mFile_loopVariable;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&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; System.IO.File.Delete(mFile);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (object mDirectory_loopVariable &lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt;
System.IO.Directory.GetDirectories(pDirectoryPath)) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&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; mDirectory =
mDirectory_loopVariable;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&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; DeleteFiles(mDirectory);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;o:p&gt;I am not stealing the credits for this solution. I got the idea of this from following article and then made my own function with little bit of modifications&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;o:p&gt;&lt;a href=&quot;http://www.vikramlakhotia.com/Deleting_Directory_in_ASPnet_20.aspx&quot; target=&quot;_blank&quot;&gt;http://www.vikramlakhotia.com/Deleting_Directory_in_ASPnet_20.aspx&lt;/a&gt;
&lt;/o:p&gt;&lt;/div&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;

&lt;o:p&gt;&lt;span style=&quot;color: #990000; font-size: x-large;&quot;&gt;Solution 3:&lt;/span&gt;&lt;/o:p&gt;&lt;/h2&gt;
&lt;/div&gt;
&lt;div&gt;
This will &lt;span style=&quot;color: red;&quot;&gt;work for your local system and for dedicated/virtually dedicated&amp;nbsp;hosting&amp;nbsp;and for only those shared&amp;nbsp;hosting&amp;nbsp;which allow you to run your application/website in full trust mode.&lt;/span&gt;&lt;/div&gt;
You have to add following function in your code and then have to call it before you use the &lt;b&gt;Directory.Delete&lt;/b&gt; method.&lt;br /&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;


&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;VB&lt;/span&gt;&lt;/b&gt;&lt;/h3&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;Private&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;Sub&lt;/span&gt; FixAppDomainRestartWhenTouchingFiles()&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt; p &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; System.Reflection.&lt;span style=&quot;color: #2b91af;&quot;&gt;PropertyInfo&lt;/span&gt;
= &lt;span style=&quot;color: blue;&quot;&gt;GetType&lt;/span&gt;(&lt;span style=&quot;color: #2b91af;&quot;&gt;HttpRuntime&lt;/span&gt;).GetProperty(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;FileChangesMonitor&quot;&lt;/span&gt;, Reflection.&lt;span style=&quot;color: #2b91af;&quot;&gt;BindingFlags&lt;/span&gt;.Public &lt;span style=&quot;color: blue;&quot;&gt;Or&lt;/span&gt;
Reflection.&lt;span style=&quot;color: #2b91af;&quot;&gt;BindingFlags&lt;/span&gt;.NonPublic &lt;span style=&quot;color: blue;&quot;&gt;Or&lt;/span&gt; Reflection.&lt;span style=&quot;color: #2b91af;&quot;&gt;BindingFlags&lt;/span&gt;.Static)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt; o &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Object&lt;/span&gt; =
p.GetValue(&lt;span style=&quot;color: blue;&quot;&gt;Nothing&lt;/span&gt;, &lt;span style=&quot;color: blue;&quot;&gt;Nothing&lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt; f &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; System.Reflection.&lt;span style=&quot;color: #2b91af;&quot;&gt;FieldInfo&lt;/span&gt;
= o.GetType.GetField(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;_dirMonSubdirs&quot;&lt;/span&gt;,
Reflection.&lt;span style=&quot;color: #2b91af;&quot;&gt;BindingFlags&lt;/span&gt;.Instance &lt;span style=&quot;color: blue;&quot;&gt;Or&lt;/span&gt; Reflection.&lt;span style=&quot;color: #2b91af;&quot;&gt;BindingFlags&lt;/span&gt;.NonPublic
&lt;span style=&quot;color: blue;&quot;&gt;Or&lt;/span&gt; Reflection.&lt;span style=&quot;color: #2b91af;&quot;&gt;BindingFlags&lt;/span&gt;.IgnoreCase)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt; monitor &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Object&lt;/span&gt; = f.GetValue(o)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt; m &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; System.Reflection.&lt;span style=&quot;color: #2b91af;&quot;&gt;MethodInfo&lt;/span&gt;
= monitor.GetType.GetMethod(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;StopMonitoring&quot;&lt;/span&gt;,
Reflection.&lt;span style=&quot;color: #2b91af;&quot;&gt;BindingFlags&lt;/span&gt;.Instance &lt;span style=&quot;color: blue;&quot;&gt;Or&lt;/span&gt; Reflection.&lt;span style=&quot;color: #2b91af;&quot;&gt;BindingFlags&lt;/span&gt;.NonPublic)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m.Invoke(monitor, &lt;span style=&quot;color: blue;&quot;&gt;New&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Object&lt;/span&gt;() {})&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Sub&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;


&lt;span style=&quot;font-family: inherit; font-size: large;&quot;&gt;CSharp (C#)&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt;
void FixAppDomainRestartWhenTouchingFiles()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Reflection.PropertyInfo p = &lt;span style=&quot;color: blue;&quot;&gt;typeof&lt;/span&gt;(HttpRuntime).GetProperty(&quot;FileChangesMonitor&quot;,
System.Reflection.BindingFlags.Public |
System.Reflection.BindingFlags.NonPublic |
System.Reflection.BindingFlags.Static);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;object&lt;/span&gt; o
= p.GetValue(null, null);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Reflection.FieldInfo f =
o.GetType().GetField(&quot;_dirMonSubdirs&quot;,
System.Reflection.BindingFlags.Instance |
System.Reflection.BindingFlags.NonPublic |
System.Reflection.BindingFlags.IgnoreCase);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;object&lt;/span&gt;
monitor = f.GetValue(o);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Reflection.MethodInfo m =
monitor.GetType().GetMethod(&quot;StopMonitoring&quot;,
System.Reflection.BindingFlags.Instance |
System.Reflection.BindingFlags.NonPublic);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m.Invoke(monitor, &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;object&lt;/span&gt;[]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Again I won&#39;t try to steal the credits.&lt;br /&gt;
Here is the link from where I got this solution.&lt;br /&gt;
&lt;a href=&quot;http://dotnetslackers.com/Community/blogs/haissam/archive/2008/11/12/disable-session-expiration-when-using-directory-delete.aspx&quot; target=&quot;_blank&quot;&gt;http://dotnetslackers.com/Community/blogs/haissam/archive/2008/11/12/disable-session-expiration-when-using-directory-delete.aspx&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://issuesdotnet.blogspot.com/feeds/2945854450414995341/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://issuesdotnet.blogspot.com/2012/06/directorydelete-expires-session-solved.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/2945854450414995341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/2945854450414995341'/><link rel='alternate' type='text/html' href='http://issuesdotnet.blogspot.com/2012/06/directorydelete-expires-session-solved.html' title='Directory.Delete expires the session [SOLVED]'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1377372602482774916.post-4298562978852197242</id><published>2012-06-05T00:24:00.000-07:00</published><updated>2012-06-05T00:24:01.417-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="datetime2"/><category scheme="http://www.blogger.com/atom/ns#" term="edmx"/><category scheme="http://www.blogger.com/atom/ns#" term="entity"/><category scheme="http://www.blogger.com/atom/ns#" term="entity framework"/><category scheme="http://www.blogger.com/atom/ns#" term="solution"/><category scheme="http://www.blogger.com/atom/ns#" term="solved"/><category scheme="http://www.blogger.com/atom/ns#" term="The version of SQL Server in use does not support datatype"/><title type='text'>The version of SQL Server in use does not support datatype &#39;datetime2&#39; [SOLVED]</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
While using the Enitity framework you can come across the following error.&lt;br /&gt;
&lt;b&gt;The version of SQL Server in use does not support datatype &#39;datetime2&#39;&lt;/b&gt;&lt;br /&gt;
You must have checked your Database tables that if you have set datatype &lt;b&gt;datetime2 &lt;/b&gt;for some field and I am sure you didn&#39;t find any of such field.&lt;br /&gt;
Okay, the problem is with the entity framework and not with the SQL Server.&lt;br /&gt;
&lt;br /&gt;
Here is the &lt;b&gt;Solution&lt;/b&gt;&lt;br /&gt;
1. Open your EDMX file in XML Editor or any file editor (like notepad).&lt;br /&gt;
2. Search for&amp;nbsp;&lt;b&gt;ProviderManifestToken &lt;/b&gt;in the file (it should be in top 7-8 lines)&lt;br /&gt;
3. It will be having the value 2008 (or may be 2010 in some cases).&lt;br /&gt;
4. Change the value from 2008 (or 2010) to 2005.&lt;br /&gt;
5. Save the file.&lt;br /&gt;
6. Run your code.&lt;br /&gt;
7. Hope the issue is not there any more.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://issuesdotnet.blogspot.com/feeds/4298562978852197242/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://issuesdotnet.blogspot.com/2012/06/version-of-sql-server-in-use-does-not.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/4298562978852197242'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/4298562978852197242'/><link rel='alternate' type='text/html' href='http://issuesdotnet.blogspot.com/2012/06/version-of-sql-server-in-use-does-not.html' title='The version of SQL Server in use does not support datatype &#39;datetime2&#39; [SOLVED]'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1377372602482774916.post-6967796532124812125</id><published>2011-12-20T23:10:00.000-08:00</published><updated>2011-12-20T23:15:15.313-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="a generic error occurred in gdi+"/><category scheme="http://www.blogger.com/atom/ns#" term="access"/><category scheme="http://www.blogger.com/atom/ns#" term="C sharp"/><category scheme="http://www.blogger.com/atom/ns#" term="file"/><category scheme="http://www.blogger.com/atom/ns#" term="gdi"/><category scheme="http://www.blogger.com/atom/ns#" term="image"/><category scheme="http://www.blogger.com/atom/ns#" term="solved"/><category scheme="http://www.blogger.com/atom/ns#" term="The process cannot access the file because it is being used by another process"/><category scheme="http://www.blogger.com/atom/ns#" term="vb .net"/><title type='text'>a generic error occurred in gdi+ [SOLVED]</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Hello folks,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;If you are reading this BLOG post then either you are facing the&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&quot;The process cannot access the file because it is being used by another process&quot; &lt;/b&gt;error&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;or the&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&quot;a generic error occurred in gdi+&quot; &lt;/b&gt;error&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;while manipulating images in ASP .Net (VB .Net/C#).&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;The issue may appear due to&amp;nbsp; &lt;b&gt;new Bitmap([IMAGE PATH]) &lt;/b&gt;statement&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;or by the&amp;nbsp;&lt;b&gt;Image.FromFile([IMAGE PATH]) &lt;/b&gt;statement in your code where you load the image in your code. This is because&amp;nbsp;GDI+ keeps a lock on files from which an image was contructed.&amp;nbsp; To avoid the lock, construct the image from a &lt;b&gt;MemorySteam&lt;/b&gt;. That is&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #741b47; font-family: Arial, Helvetica, sans-serif;&quot;&gt;C Sharp (C#)&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;MemoryStream ms = &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Arial, Helvetica, sans-serif;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #2b91af; font-family: Arial, Helvetica, sans-serif;&quot;&gt;MemoryStream&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #2b91af; font-family: Arial, Helvetica, sans-serif;&quot;&gt;File&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;.ReadAllBytes([IMAGE PATH]));&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Image img = &lt;span style=&quot;color: #2b91af;&quot;&gt;Image&lt;/span&gt;.FromStream(ms);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b&gt;&lt;span style=&quot;color: #741b47; font-family: Arial, Helvetica, sans-serif;&quot;&gt;VB .Net&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Arial, Helvetica, sans-serif;&quot;&gt;Dim&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
ms&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Arial, Helvetica, sans-serif;&quot;&gt;As&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #2b91af; font-family: Arial, Helvetica, sans-serif;&quot;&gt;MemoryStream&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
= &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Arial, Helvetica, sans-serif;&quot;&gt;New&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #2b91af; font-family: Arial, Helvetica, sans-serif;&quot;&gt;MemoryStream&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #2b91af; font-family: Arial, Helvetica, sans-serif;&quot;&gt;File&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;.ReadAllBytes(
[IMAGE PATH]))&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt;&amp;nbsp;img
&lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Image&lt;/span&gt;&amp;nbsp;= &lt;span style=&quot;color: #2b91af;&quot;&gt;Image&lt;/span&gt;.FromStream(ms)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Hope this will solve your issue and you will not receive any of the above errors.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Also don&#39;t forget to close and dispose the MemoryStream and Image after the usage else you may get the &lt;b&gt;&quot;Out of memory&quot;&lt;/b&gt;&amp;nbsp;error.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;Reference:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;a href=&quot;http://social.msdn.microsoft.com/Forums/en/csharpgeneral/thread/a3a784f2-f901-4748-90e2-dbc7e755aeeb&quot; target=&quot;_blank&quot;&gt;http://social.msdn.microsoft.com/Forums/en/csharpgeneral/thread/a3a784f2-f901-4748-90e2-dbc7e755aeeb&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://issuesdotnet.blogspot.com/feeds/6967796532124812125/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://issuesdotnet.blogspot.com/2011/12/generic-error-occurred-in-gdi-solved.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/6967796532124812125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/6967796532124812125'/><link rel='alternate' type='text/html' href='http://issuesdotnet.blogspot.com/2011/12/generic-error-occurred-in-gdi-solved.html' title='a generic error occurred in gdi+ [SOLVED]'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1377372602482774916.post-4345039816473913031</id><published>2011-09-28T00:16:00.000-07:00</published><updated>2012-12-18T03:15:35.411-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cells"/><category scheme="http://www.blogger.com/atom/ns#" term="Gridview"/><category scheme="http://www.blogger.com/atom/ns#" term="visible = false"/><title type='text'>Gridview and Hidden Cells (Visible =&quot;false&quot;)</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, sans-serif;&quot;&gt;This is another frustrating thing developers face while using Gridview instead of the Datagrid. That is when they try to use the value of some hidden cell of Gridview in Code behind they get the empty value. This is obviously very frustrating and have teased me a lot but after Googling and the doing some experiments I got the solution. Whats the solution?&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Okay here is the simple solution for this issue&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Don&#39;t set the Visible property equal to false in design time (HTML code). Instead set visibility to false in RowDataBound event of the Gridview. This will hide the cell but still the value of cell will be available in code behind.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Here is the sample code (let us suppose the Gridview id is gvTest)&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;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;VB.Net&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0.0001pt;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;Protected&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Sub&amp;nbsp;&lt;/span&gt;gvTest_RowDataBound(&lt;span style=&quot;color: blue;&quot;&gt;ByVal&lt;/span&gt;
sender &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Object&lt;/span&gt;,
&lt;span style=&quot;color: blue;&quot;&gt;ByVal&lt;/span&gt; e &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt;
System.Web.UI.WebControls.GridViewRowEventArgs) &lt;span style=&quot;color: blue;&quot;&gt;Handles&lt;/span&gt;
gvTest.RowDataBound&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 class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; e.Row.Cells(0).Visible = &lt;span style=&quot;color: blue;&quot;&gt;False&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;line-height: 115%;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Sub&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;line-height: 115%;&quot;&gt;&lt;span style=&quot;color: blue;&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;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;line-height: 115%;&quot;&gt;&lt;span style=&quot;color: blue;&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;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&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;line-height: 14px;&quot;&gt;&lt;b&gt;C#&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&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;line-height: 14px;&quot;&gt;&lt;/span&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 class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;protected&lt;/span&gt;
void gvRecruiter_RowDataBound(&lt;span style=&quot;color: blue;&quot;&gt;object&lt;/span&gt; sender,
System.Web.UI.WebControls.GridViewRowEventArgs e)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;e.Row.Cells[0].Visible = &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Arial, Helvetica, sans-serif;&quot;&gt;False&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 115%;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;&lt;br /&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;&quot;&gt;
&lt;/span&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;&lt;br /&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;&quot;&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;line-height: 115%;&quot;&gt;This will make Cells[0] to false but still its value will be available in code behind which will not be empty now.&lt;/span&gt;&lt;/div&gt;
&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://issuesdotnet.blogspot.com/feeds/4345039816473913031/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://issuesdotnet.blogspot.com/2011/09/gridview-and-hidden-cells-visible-false.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/4345039816473913031'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/4345039816473913031'/><link rel='alternate' type='text/html' href='http://issuesdotnet.blogspot.com/2011/09/gridview-and-hidden-cells-visible-false.html' title='Gridview and Hidden Cells (Visible =&quot;false&quot;)'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1377372602482774916.post-2885692877216162423</id><published>2011-02-21T23:24:00.000-08:00</published><updated>2011-02-21T23:38:48.255-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="scroll position postback control asp.net 1.1 asp.net 2.0 asp.net 3.5 asp.net 4.0"/><title type='text'>Maintain scroll position on postback (ASP.net 1.1, 2.0, 3.5, 4.0)</title><content type='html'>We often face this issue that our control is placed somewhere down in page and we have reached the control using the scrollbar of browser. &lt;div&gt;Now there is some postback event associated with that control (that control can be radiobutton, listbox, dropdown list, chekbox, button etc) and when that even is fired the page comes back with its scroll position at top.&lt;/div&gt;&lt;div&gt;Frustrated? Yes obviously its such a situation that now you have to again scroll down to the control.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot;  &gt;ASP .Net 2.0 and above&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Microsoft (ASP.Net) has provided a very simple and smart solution for this. You just have to set the &lt;b&gt;MaintainScrollPositionOnPostback &lt;/b&gt;property is page directive (Top most line of HTML view of aspx page). &lt;/div&gt;&lt;div&gt;Let say your page is default.aspx then following will be the Page directive in order to maintain the scroll position.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;lt;%@ Page Language=&quot;VB&quot; AutoEventWireup=&quot;false&quot; CodeFile=&quot;default.aspx.vb&quot; Inherits=&quot;_default&quot; MaintainScrollPositionOnPostback=&quot;true&quot; %&amp;gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot;  &gt;ASP .Net 1.1&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; &gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; &gt;For ASP .Net 1.1 you can use following. i.e. smartnavigation attribute in the page directive.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot;  &gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; &gt;&amp;lt;%@ Page Language=&quot;VB&quot; AutoEventWireup=&quot;false&quot; CodeFile=&quot;default.aspx.vb&quot; Inherits=&quot;_default&quot; SmartNavigation=&quot;True&quot; %&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot;  &gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot;  &gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Now whenever page will be posted back from some control which is somewhere scrolled down then after postback the position of cursor (control) will be maintained.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://issuesdotnet.blogspot.com/feeds/2885692877216162423/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://issuesdotnet.blogspot.com/2011/02/maintain-scroll-position-on-postback.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/2885692877216162423'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/2885692877216162423'/><link rel='alternate' type='text/html' href='http://issuesdotnet.blogspot.com/2011/02/maintain-scroll-position-on-postback.html' title='Maintain scroll position on postback (ASP.net 1.1, 2.0, 3.5, 4.0)'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1377372602482774916.post-3215784766266071292</id><published>2011-01-31T22:04:00.000-08:00</published><updated>2011-01-31T22:23:45.813-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="asp .net"/><category scheme="http://www.blogger.com/atom/ns#" term="session"/><category scheme="http://www.blogger.com/atom/ns#" term="tabs"/><title type='text'>Separate Session for multiple Tabs</title><content type='html'>With growing usage of Tabbed browsing this can be requirement in some cases that separate sessions should be used for multiple Tabs.&lt;br /&gt;ASP .Net 2.0 (and MAY BE later versions) provide a smart solution for this purpose. The solution is to add following line in your web.config file&lt;br /&gt;&lt;br /&gt;&amp;lt;sessionState mode=&quot;InProc&quot; cookieless=&quot;UseUri&quot;&amp;gt;&amp;lt;/sessionState&amp;gt;&lt;br /&gt;&lt;br /&gt;above line should be added in system.web section of web.config. This will add the session value in URL</content><link rel='replies' type='application/atom+xml' href='http://issuesdotnet.blogspot.com/feeds/3215784766266071292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://issuesdotnet.blogspot.com/2011/01/separate-session-for-multiple-tabs.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/3215784766266071292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/3215784766266071292'/><link rel='alternate' type='text/html' href='http://issuesdotnet.blogspot.com/2011/01/separate-session-for-multiple-tabs.html' title='Separate Session for multiple Tabs'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1377372602482774916.post-722783274491267442</id><published>2010-10-26T04:45:00.000-07:00</published><updated>2010-10-26T04:51:03.080-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="client javascript value server side"/><title type='text'>Accessing client side updated value at Server side</title><content type='html'>Often we use Javascript to update some hidden fields or some dropdown, textbox etc. Its ok and is a quick approach but whats the issue with it? &lt;br /&gt;The only issue we face is that when we try to access the value of such controls at server side we always get the previous value i.e. the value which was there when page was posted last time.&lt;br /&gt;Whats the solution to get the updated value i.e. the value which was updated at client side using Javascript?&lt;br /&gt;Its pretty much easy and straight. You just have to use the Request.Form at server side.&lt;br /&gt;&lt;br /&gt;Let us suppose the control name is txtTest and its value is update at client side using Javascript. We will using following statement to get the updated copy.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;VB&lt;/span&gt;&lt;br /&gt;Dim tmpStr as String = Request.Form(&quot;txtTest&quot;).Tostring()&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;C#&lt;/span&gt;&lt;br /&gt;String tmpStr = Request.Form[&quot;txtTest&quot;].ToString();</content><link rel='replies' type='application/atom+xml' href='http://issuesdotnet.blogspot.com/feeds/722783274491267442/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://issuesdotnet.blogspot.com/2010/10/accessing-client-side-updated-value-at.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/722783274491267442'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/722783274491267442'/><link rel='alternate' type='text/html' href='http://issuesdotnet.blogspot.com/2010/10/accessing-client-side-updated-value-at.html' title='Accessing client side updated value at Server side'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1377372602482774916.post-8367435041852054582</id><published>2010-10-20T03:43:00.000-07:00</published><updated>2010-10-20T04:00:16.466-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="date difference"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><title type='text'>Date difference in Javascript</title><content type='html'>This can be a need of people that they get instant difference between two dates without the postback. In .Net (C# or VB .Net) its pretty much easy and straight but in Javascript its not that much straight (Though is easy). &lt;br /&gt;Anyways here is the solution. Following is the Javascript function calculating date difference in between two dates (give in two textbox named txtStartDate and txtEndDate) and will store the result (in days) in a textbox named txtDuration.&lt;br /&gt;&lt;br /&gt;function calculateDuration()&lt;br /&gt;        {&lt;br /&gt;            var msInDay = 1000 * 60 * 60 * 24; //Milliseconds in a day&lt;br /&gt;            var startDateMS = new Date(document.getElementById(&quot;txtStartDate&quot;).value).getTime();&lt;br /&gt;            var endDateMS = new Date(document.getElementById(&quot;txtEndDate&quot;).value).getTime();&lt;br /&gt;            var differenceMS = Math.abs(endDateMS - startDateMS);&lt;br /&gt;            document.getElementById(&quot;txtDuration&quot;).value = Math.round(differenceMS/msInDay);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;This function can be called like&lt;br /&gt;&amp;lt;asp:TextBox ID=&quot;txtDuration&quot; runat=&quot;server&quot; onclick=&quot;javascript:calculateDuration();&quot; onfocus=&quot;javascript:calculateDuration();&quot;&amp;gt;&amp;lt;/asp:TextBox&amp;gt;</content><link rel='replies' type='application/atom+xml' href='http://issuesdotnet.blogspot.com/feeds/8367435041852054582/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://issuesdotnet.blogspot.com/2010/10/date-difference-in-javascript.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/8367435041852054582'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/8367435041852054582'/><link rel='alternate' type='text/html' href='http://issuesdotnet.blogspot.com/2010/10/date-difference-in-javascript.html' title='Date difference in Javascript'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1377372602482774916.post-4382894495251583203</id><published>2010-10-14T00:31:00.000-07:00</published><updated>2010-10-14T00:45:28.612-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="asp .net"/><category scheme="http://www.blogger.com/atom/ns#" term="Validation of viewstate MAC failed"/><title type='text'>Validation of viewstate MAC failed</title><content type='html'>Yet another very teasing issue ASP .Net developers face. Solution is pretty much simple.&lt;div&gt;Add following link in your&lt;b&gt; web.config&lt;/b&gt; file.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-size:10.0pt;font-family:&amp;quot;Courier New&amp;quot;; color:blue;mso-no-proof:yes&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-size:10.0pt; font-family:&amp;quot;Courier New&amp;quot;;color:#A31515;mso-no-proof:yes&quot;&gt;&amp;lt;pages&lt;/span&gt;&lt;span style=&quot;font-size:10.0pt;font-family:&amp;quot;Courier New&amp;quot;;color:blue;mso-no-proof:yes&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-size:10.0pt;font-family:&amp;quot;Courier New&amp;quot;;color:red; mso-no-proof:yes&quot;&gt;enableEventValidation&lt;/span&gt;&lt;span style=&quot;font-size:10.0pt; font-family:&amp;quot;Courier New&amp;quot;;color:blue;mso-no-proof:yes&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-size:10.0pt;font-family:&amp;quot;Courier New&amp;quot;;mso-no-proof:yes&quot;&gt;&quot;&lt;span style=&quot;color:blue&quot;&gt;false&lt;/span&gt;&quot;&lt;span style=&quot;color:blue&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color:red&quot;&gt;viewStateEncryptionMode&lt;/span&gt;&lt;span style=&quot;color:blue&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color:blue&quot;&gt;Never&lt;/span&gt;&quot;&lt;span style=&quot;color:blue&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Above line should be included within &lt;b&gt;&lt;system.web&gt;&lt;/system.web&gt; &lt;/b&gt;section.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;OR &lt;/div&gt;&lt;div&gt;if you don&#39;t want this solution to implemented on project level then you can add these attribute to the page(Top most line of HTML view) directive of the page which is creating issue.&lt;/div&gt;&lt;div&gt;That means you have to add &lt;span style=&quot;font-size:10.0pt;font-family:&amp;quot;Courier New&amp;quot;; color:red;mso-no-proof:yes&quot;&gt;enableEventValidation&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;font-family:&amp;quot;Courier New&amp;quot;;color:blue;mso-no-proof:yes&quot;&gt;=&quot;false&quot;&lt;/span&gt;&lt;span style=&quot;font-size:10.0pt;font-family:&amp;quot;Courier New&amp;quot;;mso-no-proof:yes&quot;&gt; &lt;span style=&quot;color:red&quot;&gt;viewStateEncryptionMode&lt;/span&gt;&lt;span style=&quot;color:blue&quot;&gt;=&quot;Never&quot;&lt;/span&gt;&lt;/span&gt; in page directive.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For a more detail discussion and more solution about the issue please follow the following link&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;http://blogs.msdn.com/b/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx&quot; target=&quot;_blank&quot;&gt;http://blogs.msdn.com/b/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://issuesdotnet.blogspot.com/feeds/4382894495251583203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://issuesdotnet.blogspot.com/2010/10/validation-of-viewstate-mac-failed.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/4382894495251583203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/4382894495251583203'/><link rel='alternate' type='text/html' href='http://issuesdotnet.blogspot.com/2010/10/validation-of-viewstate-mac-failed.html' title='Validation of viewstate MAC failed'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1377372602482774916.post-3351113010833554047</id><published>2010-08-18T22:13:00.000-07:00</published><updated>2010-08-18T22:42:58.097-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="asp .net"/><category scheme="http://www.blogger.com/atom/ns#" term="calendar"/><category scheme="http://www.blogger.com/atom/ns#" term="months"/><category scheme="http://www.blogger.com/atom/ns#" term="next"/><category scheme="http://www.blogger.com/atom/ns#" term="previous"/><title type='text'>Disable Next Previous Months (including all dates other than Current Month) in ASP .Net Calendar Control</title><content type='html'>Often we need ASP .Net calendar control in our webpages. Most of the times we require navigation in between dates of the calendar control but there can be a requirement that when we want that users should not be able to select dates from month other than the current month.&lt;div&gt;Some people might be thinking in mind that Microsoft has provided the &lt;b&gt;ShowNextPrevMonth &lt;/b&gt;property of a calendar control which can be set to false in order to disable the navigation in between months. Ok, this will disable navigation but what about the dates of adjacent months shown in current month?&lt;/div&gt;&lt;div&gt;Following is the output of a normal Calendar control when &lt;b&gt;ShowNextPrevMonth &lt;/b&gt;is not set to false.&lt;/div&gt;&lt;div&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI5lVD9WIfJFIsL9iKLlBIpiv9skJ3Jdmlq6XZZyb2XSMN5dA8jD409VVQm6qNd32KNeGLHL30pf-7-KXAreFu8MhBkWO1kZNJgUcyspn_9h9qEbtePBOGOleyIlED87x4AHQkoJOQ5PM/s320/simple.JPG&quot; style=&quot;cursor:pointer; cursor:hand;width: 320px; height: 182px;&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5506988013187303618&quot; /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Note the red circles in above image. &lt;b&gt;July &lt;/b&gt;and &lt;b&gt;September &lt;/b&gt; will allow you to navigate through other months and red circles below will allow you to select dates of adjacent months.&lt;/div&gt;&lt;div&gt;Ok now we set the &lt;b&gt;ShowNextPrevMonth &lt;/b&gt;property to false and see the output. Following is the output in this case.&lt;/div&gt;&lt;div&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUREMOBKUOBc6TNWqDdo98yvoxP6cbhUhA_i45yDWzhzbAE_XWLmwimNv6TgIHXkoobiC4mGgbDmVPp-N3ENLfXRoygafPCQdErhb3edDEJz6ee_mCSFBOR1IZ8QhjFxjlikLOMSt8tVE/s320/pSet.JPG&quot; style=&quot;cursor:pointer; cursor:hand;width: 320px; height: 183px;&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5506988633733286050&quot; /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So setting out the &lt;b&gt;ShowNextPrevMonth &lt;/b&gt;property has disabled the &lt;b&gt;July &lt;/b&gt;and &lt;b&gt;September &lt;/b&gt;links but dates of adjacent months are still there which can be selected as well. How to disable/hide these? Unfortunately there is no such default property provided using which one can disable or hide these dates but fortunately doing this using code is not a complex task. Use following code and this will hide these dates of adjacent months. We will make use of &lt;b&gt;DayRender &lt;/b&gt;event of the Calendar control.&lt;/div&gt;&lt;div&gt;====================================&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load&lt;/div&gt;&lt;div&gt;        Calendar1.ShowNextPrevMonth = False&lt;/div&gt;&lt;div&gt;    End Sub&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;    Protected Sub Calendar1_DayRender(ByVal sender As Object, ByVal e As DayRenderEventArgs) Handles Calendar1.DayRender&lt;/div&gt;&lt;div&gt;        If e.Day.IsOtherMonth Then&lt;/div&gt;&lt;div&gt;            e.Cell.Text = &quot;&quot;&lt;/div&gt;&lt;div&gt;        End If&lt;/div&gt;&lt;div&gt;    End Sub&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;Following is the output of above code&lt;/div&gt;&lt;div&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0tXrKsD2eY5E0l0ffpZZdBKNMhioLk6AtVjBUE9q2CeVY5PEWrpnOtgYPitta8pezVZ58Gl-GoYgO3UOUiP8uFk97RVHLUOwerALn6Lx9GNt55aoYeGllXHLPEA_01El72W26M0d-aAg/s320/alldone.JPG&quot; style=&quot;cursor:pointer; cursor:hand;width: 320px; height: 178px;&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5506990202575799794&quot; /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You see there are no navigational links (July, September) and also dates of adjacent months have been hidden.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Hope this will solve your issue.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://issuesdotnet.blogspot.com/feeds/3351113010833554047/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://issuesdotnet.blogspot.com/2010/08/disable-next-previous-months-including.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/3351113010833554047'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/3351113010833554047'/><link rel='alternate' type='text/html' href='http://issuesdotnet.blogspot.com/2010/08/disable-next-previous-months-including.html' title='Disable Next Previous Months (including all dates other than Current Month) in ASP .Net Calendar Control'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI5lVD9WIfJFIsL9iKLlBIpiv9skJ3Jdmlq6XZZyb2XSMN5dA8jD409VVQm6qNd32KNeGLHL30pf-7-KXAreFu8MhBkWO1kZNJgUcyspn_9h9qEbtePBOGOleyIlED87x4AHQkoJOQ5PM/s72-c/simple.JPG" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1377372602482774916.post-6123688535120047533</id><published>2010-08-18T00:45:00.000-07:00</published><updated>2012-02-15T22:49:38.692-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="asp .net"/><category scheme="http://www.blogger.com/atom/ns#" term="asp.net"/><category scheme="http://www.blogger.com/atom/ns#" term="C sharp"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="CSharp"/><category scheme="http://www.blogger.com/atom/ns#" term="disable browser back button"/><category scheme="http://www.blogger.com/atom/ns#" term="VB"/><category scheme="http://www.blogger.com/atom/ns#" term="vb .net"/><category scheme="http://www.blogger.com/atom/ns#" term="vb dot net"/><category scheme="http://www.blogger.com/atom/ns#" term="Vb.Net"/><title type='text'>Disable browser back button</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Sometimes we need a functionality that user should not be allowed to go to previous page using the browser back button. Most of us then try to search that how we can disable the browser back button. &lt;br /&gt;
&lt;div&gt;
A simple and straight answer is that browser&#39;s back button can not be disabled because browser resides at user&#39;s machine and not on Server. All we can do is to prevent a page for being cached. So if a page is not being cached at client then browser back button will not allow a user to navigate to that page. &lt;/div&gt;
&lt;div&gt;
What&#39;s the procedure?&lt;/div&gt;
&lt;div&gt;
Procedure is pretty much easy and described in below. &lt;/div&gt;
&lt;div&gt;
&lt;b&gt;A very important thing to remember is that you have to use this code in page1 in case you want that page1 should not be available using back button of browser. i.e. use this code in that page which you want not available at browser back button.&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
==================================&lt;/div&gt;
&lt;div&gt;
Use following 3 lines in HEAD section (HTML view)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&amp;lt;meta http-equiv=&quot;cache-control&quot; content=&quot;no-store&quot;/&amp;gt; &lt;/div&gt;
&lt;div&gt;
&amp;lt;meta http-equiv=&quot;expires&quot; content=&quot;0&quot;/&amp;gt; &lt;/div&gt;
&lt;div&gt;
&amp;lt;meta http-equiv=&quot;pragma&quot; content=&quot;no-cache&quot;/&amp;gt;&lt;/div&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;
use following lines in Page_Load (Code behind)&lt;br /&gt;
&lt;b&gt;VB&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
Response.Cache.SetCacheability(HttpCacheability.NoCache)&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
Response.Buffer = True&lt;/div&gt;
&lt;div&gt;
Response.ExpiresAbsolute = DateTime.Now().AddDays(-1)&lt;/div&gt;
&lt;div&gt;
Response.Expires = 0&lt;/div&gt;
&lt;div&gt;
Response.CacheControl = &quot;no-cache&quot;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;C # (C Sharp)&lt;/b&gt;&lt;br /&gt;
Response.Cache.SetCacheability(HttpCacheability.NoCache);&lt;br /&gt;
Response.Buffer = true;&lt;br /&gt;
Response.ExpiresAbsolute = DateTime.Now().AddDays(-1);&lt;br /&gt;
Response.Expires = 0;&lt;br /&gt;
Response.CacheControl = &quot;no-cache&quot;;&lt;/div&gt;
&lt;div&gt;
==================================&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
This should solve your issue.&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://issuesdotnet.blogspot.com/feeds/6123688535120047533/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://issuesdotnet.blogspot.com/2010/08/disable-browser-back-button.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/6123688535120047533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/6123688535120047533'/><link rel='alternate' type='text/html' href='http://issuesdotnet.blogspot.com/2010/08/disable-browser-back-button.html' title='Disable browser back button'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1377372602482774916.post-2627881592353000264</id><published>2010-08-11T03:52:00.000-07:00</published><updated>2010-08-11T05:25:45.386-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="database change"/><category scheme="http://www.blogger.com/atom/ns#" term="iframe"/><category scheme="http://www.blogger.com/atom/ns#" term="parent"/><category scheme="http://www.blogger.com/atom/ns#" term="redirect"/><category scheme="http://www.blogger.com/atom/ns#" term="refresh"/><category scheme="http://www.blogger.com/atom/ns#" term="timer"/><title type='text'>Redirecting Parent page from iframe using same query string</title><content type='html'>Once I got caught in a situation that I had to check Database changes from a hidden iframe placed withing a page and then had to redirect the parent page in a way that parent window don&#39;t lose its querystring. &lt;div&gt;Following was the solution which I used. &lt;/div&gt;&lt;div&gt;========================================&lt;/div&gt;&lt;div&gt;In my main page&lt;b&gt;(testpage.aspx)&lt;/b&gt; I had following statement for hidden iframe&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;lt;iframe src=&quot;refreshpage.aspx?&amp;lt;%= Request.QueryString.ToString %&amp;gt;&quot; style=&quot;display: none;&quot;&amp;gt;&amp;lt;/iframe&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 &lt;b&gt;refreshpage.aspx &lt;/b&gt;I was having nothing but a timer and its tick event which was having the code to check in Database that either some new entry has been made or not. And in case there was any new entry I was refreshing the parent page by using Javascript.&lt;/div&gt;&lt;div&gt;Following is the HTML code for the timer part of my &lt;b&gt;refreshpage.aspx.&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&amp;lt;asp:ScriptManager ID=&quot;ScriptManager1&quot; runat=&quot;server&quot;&amp;gt;&amp;lt;/asp:ScriptManager&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;asp:Timer ID=&quot;Timer1&quot; runat=&quot;server&quot; Interval=&quot;5000&quot;&amp;gt;&amp;lt;/asp:Timer&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Remember that scriptmanager is must as I am using Timer of AJAX Extensions.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Following is the VB code for &lt;b&gt;refreshpage.aspx.&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;Protected Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick&lt;/div&gt;&lt;div&gt;        If RecordInserted() Then&lt;/div&gt;&lt;div&gt;            &#39;RecordInserted is my own function to check if data is enetered or not.&lt;/div&gt;&lt;div&gt;            ClientScript.RegisterClientScriptBlock(Me.GetType, &quot;&quot;, &quot;&amp;lt;script&amp;gt;window.parent.location.href = &quot;&quot;testpage.aspx?&quot; &amp;amp; Request.QueryString.ToString &amp;amp; &quot;&quot;&quot;;&amp;lt;/script&amp;gt;&quot;)&lt;/div&gt;&lt;div&gt;        End If&lt;/div&gt;&lt;div&gt;    End Sub&lt;/div&gt;&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;This is it for the code and following is the explanation of above. &lt;/div&gt;&lt;div&gt;&lt;b&gt;refreshpage.aspx &lt;/b&gt;checks the database after every 5 seconds that if there is new entry or not and if there is any it refreshes the parent page using Javascript.&lt;/div&gt;&lt;div&gt;&amp;lt;%= Request.QueryString.ToString %&amp;gt; is required in case when QueryString is required for the redirect from iframe.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Hope this will help you :)&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://issuesdotnet.blogspot.com/feeds/2627881592353000264/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://issuesdotnet.blogspot.com/2010/08/redirecting-parent-page-from-iframe.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/2627881592353000264'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/2627881592353000264'/><link rel='alternate' type='text/html' href='http://issuesdotnet.blogspot.com/2010/08/redirecting-parent-page-from-iframe.html' title='Redirecting Parent page from iframe using same query string'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1377372602482774916.post-1349695517064376590</id><published>2010-08-03T00:52:00.000-07:00</published><updated>2010-08-03T00:57:31.137-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="CSharp"/><category scheme="http://www.blogger.com/atom/ns#" term="IsDate"/><category scheme="http://www.blogger.com/atom/ns#" term="Vb.Net"/><title type='text'>IsDate() for C# (C Sharp)</title><content type='html'>As we all know that IsDate() is a function of VB .Net which checks that either a provided object is date or not. Naturally we all think that the same function will be there in C# (C Sharp) as well but this is not the case.&lt;div&gt;Following is a simple IsDate() function for C# (C Sharp) which acts exactly like VB .Net&lt;/div&gt;&lt;div&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;div&gt;public static bool IsDate(object pDate)&lt;/div&gt;&lt;div&gt;    {&lt;/div&gt;&lt;div&gt;        DateTime mDate;&lt;/div&gt;&lt;div&gt;        if ((pDate != null) &amp;amp;&amp;amp; (pDate.ToString().Trim() != &quot;&quot;))&lt;/div&gt;&lt;div&gt;        {&lt;/div&gt;&lt;div&gt;            return DateTime.TryParse(pDate.ToString(), out mDate);&lt;/div&gt;&lt;div&gt;        }&lt;/div&gt;&lt;div&gt;        else&lt;/div&gt;&lt;div&gt;        {&lt;/div&gt;&lt;div&gt;            return false;&lt;/div&gt;&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://issuesdotnet.blogspot.com/feeds/1349695517064376590/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://issuesdotnet.blogspot.com/2010/08/isdate-for-c-c-sharp.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/1349695517064376590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/1349695517064376590'/><link rel='alternate' type='text/html' href='http://issuesdotnet.blogspot.com/2010/08/isdate-for-c-c-sharp.html' title='IsDate() for C# (C Sharp)'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1377372602482774916.post-199971076464107437</id><published>2010-07-15T00:29:00.000-07:00</published><updated>2012-01-20T04:23:28.789-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="URL Rewrite"/><category scheme="http://www.blogger.com/atom/ns#" term="User friendly URL"/><title type='text'>URL Rewriting (making user Friendly URLs)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;The Problem:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
At number of occasions we need a user friendly URL instead of a messy URL having the query string variables.&lt;br /&gt;
&lt;div&gt;
Like we may be having&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;URL A: &lt;/b&gt;http://www.mywebpage.com/product.aspx?id=123476576&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
and we want to have a URL for above as&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;URL B: &lt;/b&gt;http://www.mywebpage.com/product_123476576.aspx&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Obviously from above two the 2nd one is more user friendly and easily readable.  Now the question is how to accomplish this task. Okay solution is not at all a complex solution. In following I will be explaining the solution in detail&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;The Solution&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;Though there are more than one ways for this task but I will make use of the method &quot;application_beginrequest&quot; of &quot;Global.asax&quot;. This method is called every time some request is made to the website.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;Following will be the code to convert &lt;/span&gt;URL A into URL B. You can modify this code as per your need.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;VB&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; Public Sub application_beginrequest(ByVal sender As Object, ByVal e As EventArgs)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Try&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim initialurl As String = Request.Url.ToString&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; If initialurl.ToLower.IndexOf(&quot;product_&quot;) &amp;gt;= 0 Then&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim mTemp As String = initialurl.Substring(initialurl.LastIndexOf(&quot;_&quot;) + 1)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim mProductID As Integer = mTemp.Substring(0, mTemp.LastIndexOf(&quot;.aspx&quot;))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim mOriginalURL As String = &quot;product.aspx?id=&quot; + mProductID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Context.RewritePath(mOriginalURL)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; End If&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;Code to Log your Error&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Catch ex As Exception&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; End Try&lt;br /&gt;
&amp;nbsp; &amp;nbsp; End Sub&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;CSharp (C#)&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public void application_beginrequest(object sender, EventArgs e)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string initialurl = Request.Url.ToString();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (initialurl.ToLower().IndexOf(&quot;product_&quot;) &amp;gt;= 0)&lt;br /&gt;
&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; string mTemp = initialurl.Substring(initialurl.LastIndexOf(&quot;_&quot;) + 1);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int mProductID = Convert.ToInt32(mTemp.Substring(0, mTemp.LastIndexOf(&quot;.aspx&quot;)));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string mOriginalURL = &quot;product.aspx?id=&quot; + mProductID;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Context.RewritePath(mOriginalURL);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; catch (Exception ex)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Code to Log your Error&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://issuesdotnet.blogspot.com/feeds/199971076464107437/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://issuesdotnet.blogspot.com/2010/07/url-rewriting-making-user-friendly-urls.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/199971076464107437'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1377372602482774916/posts/default/199971076464107437'/><link rel='alternate' type='text/html' href='http://issuesdotnet.blogspot.com/2010/07/url-rewriting-making-user-friendly-urls.html' title='URL Rewriting (making user Friendly URLs)'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>