<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:blogChannel="http://backend.userland.com/blogChannelModule" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" version="2.0">
  <channel>
    <title>Vijay Kodali's Blog</title>
    <description />
    <link>http://www.vijaykodali.com/Blog/</link>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>BlogEngine.NET 1.6.1.0</generator>
    <language>en-GB</language>
    <blogChannel:blogRoll>http://www.vijaykodali.com/Blog/opml.axd</blogChannel:blogRoll>
    <blogChannel:blink>http://www.dotnetblogengine.net/syndication.axd</blogChannel:blink>
    <dc:creator>Vijay</dc:creator>
    <dc:title>Vijay Kodali's Blog</dc:title>
    <geo:lat>0.000000</geo:lat>
    <geo:long>0.000000</geo:long>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/AspNetDev" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="aspnetdev" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
      <title>Asp.Net Security ebook</title>
      <description>&lt;p&gt;If you want to read one book about Asp.Net security, read &lt;a href="http://asafaweb.com/OWASP%20Top%2010%20for%20.NET%20developers.pdf" target="_blank"&gt;OWASP Top 10 for .NET developer&lt;/a&gt; by &lt;a href="http://www.troyhunt.com/" target="_blank"&gt;Troy Hunt&lt;/a&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; There’s a harsh reality web application developers need to face up to; we don’t do security very well. A report from WhiteHat Security last year reported “83% of websites have had a high, critical or urgent issue”. That is, quite simply, a staggeringly high number and it’s only once you start to delve into to depths of web security that you begin to understand just how easy it is to inadvertently produce vulnerable code.&lt;/p&gt;&lt;/blockquote&gt;</description>
      <link>http://www.vijaykodali.com/Blog/post/2011/12/29/AspNet-Security-ebook.aspx</link>
      <author>vijay</author>
      <comments>http://www.vijaykodali.com/Blog/post/2011/12/29/AspNet-Security-ebook.aspx#comment</comments>
      <guid>http://www.vijaykodali.com/Blog/post.aspx?id=19694cc4-540f-4935-b810-3c2147a6d7c0</guid>
      <pubDate>Thu, 29 Dec 2011 18:05:00 -0600</pubDate>
      <category>ASP.Net 3.5</category>
      <category>Asp.Net 4.0</category>
      <category>Web Development</category>
      <dc:publisher>vijay</dc:publisher>
      <pingback:server>http://www.vijaykodali.com/Blog/pingback.axd</pingback:server>
      <pingback:target>http://www.vijaykodali.com/Blog/post.aspx?id=19694cc4-540f-4935-b810-3c2147a6d7c0</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.vijaykodali.com/Blog/trackback.axd?id=19694cc4-540f-4935-b810-3c2147a6d7c0</trackback:ping>
      <wfw:comment>http://www.vijaykodali.com/Blog/post/2011/12/29/AspNet-Security-ebook.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.vijaykodali.com/Blog/syndication.axd?post=19694cc4-540f-4935-b810-3c2147a6d7c0</wfw:commentRss>
    </item>
    <item>
      <title>Make sure AjaxControlToolkit. Properties. Resources. NET4.resources was correctly embedded</title>
      <description>&lt;p&gt;&lt;b&gt;Error Message:&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;i&gt;&lt;font color="#ff0000"&gt;Could not find any resources appropriate for the specified culture or the neutral culture.&amp;#160; Make sure &amp;quot;AjaxControlToolkit.Properties.Resources.NET4.resources&amp;quot; was correctly embedded or linked into assembly &amp;quot;AjaxControlToolkit&amp;quot; at compile time, or that all the satellite assemblies required are loadable and fully signed.&lt;/font&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Reason: &lt;/b&gt;&lt;/p&gt;  &lt;p&gt;AjaxControlToolkit’s control load reference refers to the base System.Web.UI.Control method which is present as a part of the ASP.NET AJAX Libraries and those libraries are referenced only when the ScriptManager is referenced in the page.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Solution:&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Add ScriptManager in the page and this error would be resolved. &lt;/p&gt;  &lt;pre class="csharpcode"&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:ScriptManager&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;ScriptManager1&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:ScriptManager&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;style type="text/css"&gt;


.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;</description>
      <link>http://www.vijaykodali.com/Blog/post/2011/11/06/Make-sure-AjaxControlToolkitPropertiesResourcesNET4resources-was-correctly-embedded.aspx</link>
      <author>vijay</author>
      <comments>http://www.vijaykodali.com/Blog/post/2011/11/06/Make-sure-AjaxControlToolkitPropertiesResourcesNET4resources-was-correctly-embedded.aspx#comment</comments>
      <guid>http://www.vijaykodali.com/Blog/post.aspx?id=465f79b5-5a76-4e20-b334-2e32fdd5d7c5</guid>
      <pubDate>Sun, 06 Nov 2011 21:16:23 -0600</pubDate>
      <category>Asp.Net 4.0</category>
      <category>Ajax Toolkit</category>
      <dc:publisher>vijay</dc:publisher>
      <pingback:server>http://www.vijaykodali.com/Blog/pingback.axd</pingback:server>
      <pingback:target>http://www.vijaykodali.com/Blog/post.aspx?id=465f79b5-5a76-4e20-b334-2e32fdd5d7c5</pingback:target>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://www.vijaykodali.com/Blog/trackback.axd?id=465f79b5-5a76-4e20-b334-2e32fdd5d7c5</trackback:ping>
      <wfw:comment>http://www.vijaykodali.com/Blog/post/2011/11/06/Make-sure-AjaxControlToolkitPropertiesResourcesNET4resources-was-correctly-embedded.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.vijaykodali.com/Blog/syndication.axd?post=465f79b5-5a76-4e20-b334-2e32fdd5d7c5</wfw:commentRss>
    </item>
    <item>
      <title>SharePoint Server 2010 PerformancePoint Services Architecture</title>
      <description>&lt;p&gt;This diagram shows the high-level architecture of PerformancePoint Services in Microsoft SharePoint Server 2010 Enterprise. (From &lt;a href="http://blogs.msdn.com/b/sharepointpictures/" target="_blank"&gt;MSDN Sharepoint Blog&lt;/a&gt;)&lt;/p&gt;  &lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-filesystemfile.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-40-86-metablogapi/4760.PerformancePoint_5F00_Architecture_5F00_in_5F00_Microsoft_5F00_SharePoint_5F00_Server_5F00_2010_5F00_7E9C5765.gif" /&gt;&lt;/p&gt;</description>
      <link>http://www.vijaykodali.com/Blog/post/2011/04/14/SharePoint-Server-2010-PerformancePoint-Services-Architecture.aspx</link>
      <author>vijay</author>
      <comments>http://www.vijaykodali.com/Blog/post/2011/04/14/SharePoint-Server-2010-PerformancePoint-Services-Architecture.aspx#comment</comments>
      <guid>http://www.vijaykodali.com/Blog/post.aspx?id=9e377392-7963-4db1-a087-74823068c1a5</guid>
      <pubDate>Thu, 14 Apr 2011 18:44:00 -0600</pubDate>
      <category>SharePoint</category>
      <dc:publisher>vijay</dc:publisher>
      <pingback:server>http://www.vijaykodali.com/Blog/pingback.axd</pingback:server>
      <pingback:target>http://www.vijaykodali.com/Blog/post.aspx?id=9e377392-7963-4db1-a087-74823068c1a5</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.vijaykodali.com/Blog/trackback.axd?id=9e377392-7963-4db1-a087-74823068c1a5</trackback:ping>
      <wfw:comment>http://www.vijaykodali.com/Blog/post/2011/04/14/SharePoint-Server-2010-PerformancePoint-Services-Architecture.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.vijaykodali.com/Blog/syndication.axd?post=9e377392-7963-4db1-a087-74823068c1a5</wfw:commentRss>
    </item>
    <item>
      <title>URL length restrictions in SharePoint Foundation 2010</title>
      <description>&lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="520"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="193"&gt;         &lt;p&gt;&lt;font color="#0000a0"&gt;&lt;strong&gt;&lt;em&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; URL part &lt;/em&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="325"&gt;         &lt;p&gt;&lt;strong&gt;&lt;font color="#0000a0"&gt;&lt;em&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Example&lt;/em&gt;&lt;/font&gt; &lt;/strong&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="192"&gt;         &lt;p&gt;&lt;b&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Protocol&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="326"&gt;         &lt;p&gt;http://&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="192"&gt;         &lt;p&gt;&lt;b&gt;&amp;#160;&amp;#160; Server name&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="326"&gt;         &lt;p&gt;www.contoso.com/&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="192"&gt;         &lt;p&gt;&lt;b&gt;&amp;#160; Folder or file path&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="326"&gt;         &lt;p&gt;sites/marketing/documents/Shared%20Documents/Promotion/&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="192"&gt;         &lt;p&gt;&lt;b&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; File name&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="327"&gt;         &lt;p&gt;Some%20File.xlsx&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;ul&gt;   &lt;li&gt;&lt;b&gt;260 Unicode (UTF-16) code units&lt;/b&gt; – the characters in a full file path, not including a domain/server name. &lt;/li&gt;    &lt;li&gt;&lt;b&gt;256 Unicode (UTF-16) code units&lt;/b&gt; – the characters in a full folder path, not including the file name and the domain/server name. &lt;/li&gt;    &lt;li&gt;&lt;b&gt;128 Unicode (UTF-16) code units&lt;/b&gt; - characters in a path component, that is, a file or folder name. &lt;/li&gt;    &lt;li&gt;&lt;b&gt;260 Unicode (UTF-16) code units&lt;/b&gt; – the characters in a full path, including a domain/server name for use with Office clients. &lt;/li&gt;    &lt;li&gt;&lt;b&gt;256 Unicode (UTF-16) code units&lt;/b&gt; – the characters in a full path including the domain/server name, for use with Active X controls. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;The above limitations apply to the total length of the URL path to a folder or a file in SharePoint Foundation 2010 but &lt;b&gt;not to the length of any parameters&lt;/b&gt;. Also, &lt;b&gt;these limitations apply only to un-encoded URLs&lt;/b&gt;, not to encoded URLs. There is no limit to encoded URLs in SharePoint Foundation 2010&lt;/p&gt;  &lt;p&gt;Reference: &lt;a href="http://technet.microsoft.com/en-us/library/ff919562.aspx"&gt;http://technet.microsoft.com/en-us/library/ff919562.aspx&lt;/a&gt;&lt;/p&gt;</description>
      <link>http://www.vijaykodali.com/Blog/post/2010/10/08/URL-length-restrictions-in-SharePoint-Foundation-2010.aspx</link>
      <author>vijay</author>
      <comments>http://www.vijaykodali.com/Blog/post/2010/10/08/URL-length-restrictions-in-SharePoint-Foundation-2010.aspx#comment</comments>
      <guid>http://www.vijaykodali.com/Blog/post.aspx?id=b6ea52b4-0f27-4135-8506-d643aab0b8cc</guid>
      <pubDate>Fri, 08 Oct 2010 21:22:00 -0600</pubDate>
      <dc:publisher>vijay</dc:publisher>
      <pingback:server>http://www.vijaykodali.com/Blog/pingback.axd</pingback:server>
      <pingback:target>http://www.vijaykodali.com/Blog/post.aspx?id=b6ea52b4-0f27-4135-8506-d643aab0b8cc</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.vijaykodali.com/Blog/trackback.axd?id=b6ea52b4-0f27-4135-8506-d643aab0b8cc</trackback:ping>
      <wfw:comment>http://www.vijaykodali.com/Blog/post/2010/10/08/URL-length-restrictions-in-SharePoint-Foundation-2010.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.vijaykodali.com/Blog/syndication.axd?post=b6ea52b4-0f27-4135-8506-d643aab0b8cc</wfw:commentRss>
    </item>
    <item>
      <title>AsyncFileUpload events with Update Panel</title>
      <description>&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-ansi-language: EN;" lang="EN"&gt;&lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;&lt;span style="font-family: verdana,geneva;"&gt;Problem:&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; mso-ansi-language: EN;" lang="EN"&gt;&lt;span style="font-family: verdana,geneva;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; mso-ansi-language: EN;" lang="EN"&gt;&lt;span style="font-family: verdana,geneva;"&gt;Last week I came across this bug (?) with AsyncFileUpload control in updatepanel. The control is not firing OnUploadedComplete server side event when it&amp;rsquo;s in updatepanel. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; mso-ansi-language: EN;" lang="EN"&gt;&lt;span style="font-family: verdana,geneva;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; mso-ansi-language: EN;" lang="EN"&gt;&lt;span style="font-family: verdana,geneva;"&gt;&lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;Solution:&lt;/span&gt;&lt;/strong&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; mso-ansi-language: EN;" lang="EN"&gt;&lt;span style="font-family: verdana,geneva;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; mso-ansi-language: EN;" lang="EN"&gt;&lt;span style="font-family: verdana,geneva;"&gt;After doing some research on this issue, came across these solutions.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; mso-ansi-language: EN;" lang="EN"&gt;&lt;span style="font-family: verdana,geneva;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; mso-list: l0 level1 lfo1;"&gt;&lt;span style="font-family: verdana,geneva;"&gt;&lt;span style="font-size: 10pt; mso-ansi-language: EN; mso-fareast-font-family: Arial;" lang="EN"&gt;&lt;span style="mso-list: Ignore;"&gt;1)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; mso-ansi-language: EN;" lang="EN"&gt;Add another AsyncFileUpload control on the page and set its&amp;rsquo; style to &lt;strong style="mso-bidi-font-weight: normal;"&gt;display:none;&lt;/strong&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-ansi-language: EN;" lang="EN"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in; mso-layout-grid-align: none;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; mso-no-proof: yes;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in; mso-layout-grid-align: none;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: &amp;quot;Courier New&amp;quot;; mso-no-proof: yes;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: #a31515; font-family: &amp;quot;Courier New&amp;quot;; mso-no-proof: yes;"&gt;div&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; mso-no-proof: yes;"&gt; &lt;span style="color: red;"&gt;style&lt;/span&gt;&lt;span style="color: blue;"&gt;="&lt;/span&gt;&lt;span style="color: red;"&gt;display&lt;/span&gt;: &lt;span style="color: blue;"&gt;none&lt;/span&gt;;&lt;span style="color: blue;"&gt;"&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in; mso-layout-grid-align: none;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; mso-no-proof: yes;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;cc1&lt;/span&gt;&lt;span style="color: blue;"&gt;:&lt;/span&gt;&lt;span style="color: #a31515;"&gt;AsyncFileUpload&lt;/span&gt; &lt;span style="color: red;"&gt;ID&lt;/span&gt;&lt;span style="color: blue;"&gt;="AsyncFileUpload1"&lt;/span&gt; &lt;span style="color: red;"&gt;runat&lt;/span&gt;&lt;span style="color: blue;"&gt;="server"&lt;/span&gt; &lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: &amp;quot;Courier New&amp;quot;; mso-no-proof: yes;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 10pt; color: #a31515; font-family: &amp;quot;Courier New&amp;quot;; mso-no-proof: yes;"&gt;div&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: &amp;quot;Courier New&amp;quot;; mso-no-proof: yes;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in;"&gt;&lt;span style="font-size: 10pt; color: blue; font-family: &amp;quot;Courier New&amp;quot;; mso-no-proof: yes;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-ansi-language: EN;" lang="EN"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; mso-list: l0 level1 lfo1;"&gt;&lt;span style="font-family: verdana,geneva;"&gt;&lt;strong style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-size: 10pt; mso-ansi-language: EN; mso-fareast-font-family: Arial;" lang="EN"&gt;&lt;span style="mso-list: Ignore;"&gt;2)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt; mso-ansi-language: EN;" lang="EN"&gt;Another workaround is to add the following attributes to the &amp;lt;form&amp;gt; tag of the page..&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;strong style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-size: 10pt; mso-ansi-language: EN;" lang="EN"&gt;&lt;span style="font-family: verdana,geneva;"&gt;enctype="multipart/form-data" method="post"&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;strong style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-size: 10pt; mso-ansi-language: EN;" lang="EN"&gt;&lt;span style="font-family: verdana,geneva;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; mso-ansi-language: EN;" lang="EN"&gt;&lt;span style="font-family: verdana,geneva;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; mso-ansi-language: EN;" lang="EN"&gt;&lt;span style="font-family: verdana,geneva;"&gt;Both the solutions are working fine. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; mso-ansi-language: EN;" lang="EN"&gt;&lt;span style="font-family: verdana,geneva;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;strong style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-size: 10pt; mso-ansi-language: EN;" lang="EN"&gt;&lt;span style="font-family: verdana,geneva;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-ansi-language: EN;" lang="EN"&gt;&lt;span style="font-family: verdana,geneva;"&gt;Thanks to &lt;/span&gt;&lt;a href="http://forums.asp.net/members/obout_5F00_teo.aspx"&gt;&lt;span style="font-family: verdana,geneva;"&gt;obout_teo&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: verdana,geneva;"&gt; and &lt;/span&gt;&lt;a href="http://forums.asp.net/members/MikeMelendez.aspx"&gt;&lt;span style="font-family: verdana,geneva;"&gt;MikeMelendez&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: verdana,geneva;"&gt; of Asp.Net forums&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;</description>
      <link>http://www.vijaykodali.com/Blog/post/2010/09/20/AsyncFileUpload-events-with-Update-Panel.aspx</link>
      <author>Vijay</author>
      <comments>http://www.vijaykodali.com/Blog/post/2010/09/20/AsyncFileUpload-events-with-Update-Panel.aspx#comment</comments>
      <guid>http://www.vijaykodali.com/Blog/post.aspx?id=23659cb5-1056-4e87-8833-05baa909624e</guid>
      <pubDate>Mon, 20 Sep 2010 18:22:00 -0600</pubDate>
      <category>AJAX</category>
      <category>ASP.Net 3.5</category>
      <dc:publisher>Vijay</dc:publisher>
      <pingback:server>http://www.vijaykodali.com/Blog/pingback.axd</pingback:server>
      <pingback:target>http://www.vijaykodali.com/Blog/post.aspx?id=23659cb5-1056-4e87-8833-05baa909624e</pingback:target>
      <slash:comments>3</slash:comments>
      <trackback:ping>http://www.vijaykodali.com/Blog/trackback.axd?id=23659cb5-1056-4e87-8833-05baa909624e</trackback:ping>
      <wfw:comment>http://www.vijaykodali.com/Blog/post/2010/09/20/AsyncFileUpload-events-with-Update-Panel.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.vijaykodali.com/Blog/syndication.axd?post=23659cb5-1056-4e87-8833-05baa909624e</wfw:commentRss>
    </item>
    <item>
      <title>SharePoint repeatedly prompts for login credentials</title>
      <description>&lt;p&gt;&lt;b&gt;&lt;i&gt;Symptoms:&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;After you enter credentials on SharePoint site login prompt, you will be thrown the login prompt repeatedly despite providing the right credentials.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;i&gt;Cause:&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;This issue occurs with default security settings of IE7 in windows server environment. The settings include a loopback check security feature that is designed to help prevent reflection attacks on your computer. Therefore, authentication fails.&lt;/p&gt;  &lt;p&gt;It can also happen for users that are behind a secured network and browser settings are controlled by administrator. &lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;i&gt;Solution: &lt;/i&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;To work-around this problem, users need to turn off Integrated Windows Authentication in Internet Explorer.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;In Internet Explorer, click on the Tools button, then choose Internet Options&lt;/li&gt;    &lt;li&gt;Click on the advanced tab&lt;/li&gt;    &lt;li&gt;Clear the Enable Integrated Windows Authentication option (In Security section) and Click “OK”&lt;/li&gt;    &lt;li&gt;Close and restart Internet Explorer.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;If the problem persists, you may need to manually add the team Web site to the list of trusted intranet sites. To do this, complete the following steps:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;On the Internet Explorer toolbar, click Tools, and then click Internet Options.&lt;/li&gt;    &lt;li&gt;In the Internet Options dialog box, click the Security tab, and then select Local intranet.&lt;/li&gt;    &lt;li&gt;Click Sites, and then click Advanced.&lt;/li&gt;    &lt;li&gt;Type the URL of the team Web site in the Add this Web site to the zone box, click Add, and then click OK.&lt;/li&gt; &lt;/ol&gt;</description>
      <link>http://www.vijaykodali.com/Blog/post/2010/08/27/SharePoint-repeatedly-prompts-for-login-credentials.aspx</link>
      <author>vijay</author>
      <comments>http://www.vijaykodali.com/Blog/post/2010/08/27/SharePoint-repeatedly-prompts-for-login-credentials.aspx#comment</comments>
      <guid>http://www.vijaykodali.com/Blog/post.aspx?id=917b6cf6-f18c-40e9-b34a-fc6ec32505a1</guid>
      <pubDate>Fri, 27 Aug 2010 22:01:00 -0600</pubDate>
      <category>SharePoint2010</category>
      <category>SharePoint</category>
      <dc:publisher>vijay</dc:publisher>
      <pingback:server>http://www.vijaykodali.com/Blog/pingback.axd</pingback:server>
      <pingback:target>http://www.vijaykodali.com/Blog/post.aspx?id=917b6cf6-f18c-40e9-b34a-fc6ec32505a1</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.vijaykodali.com/Blog/trackback.axd?id=917b6cf6-f18c-40e9-b34a-fc6ec32505a1</trackback:ping>
      <wfw:comment>http://www.vijaykodali.com/Blog/post/2010/08/27/SharePoint-repeatedly-prompts-for-login-credentials.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.vijaykodali.com/Blog/syndication.axd?post=917b6cf6-f18c-40e9-b34a-fc6ec32505a1</wfw:commentRss>
    </item>
    <item>
      <title>Disabled button not grayed out in Firefox and Chrome</title>
      <description>&lt;p&gt;When button is disabled, it’s not-clickable in all browsers. However in Firefox and Chrome, the button looks enabled, though the user cannot click it. &lt;/p&gt;  &lt;p&gt;&lt;b&gt;Reason&lt;/b&gt;:&lt;/p&gt;  &lt;p&gt;From &lt;a href="http://www.w3schools.com/tags/tag_button.asp"&gt;W3Scholl&lt;/a&gt;, &amp;quot;Enabled&amp;quot; Property isn't standard property of XHTML 4.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Solution&lt;/b&gt;:&lt;/p&gt;  &lt;p&gt;You can modify the way they look with CSS&lt;/p&gt;  &lt;pre class="brush: css; auto-links: true; collapse: false; first-line: 1; gutter: true; html-script: false; light: false; ruler: false; smart-tabs: true; tab-size: 4; toolbar: true;"&gt;button[disabled] { 
 color:Grey;
/* Add other  styles here for disable button */ 
} &lt;/pre&gt;</description>
      <link>http://www.vijaykodali.com/Blog/post/2010/08/12/Disabled-button-not-grayed-out-in-Firefox-and-Chrome.aspx</link>
      <author>vijay</author>
      <comments>http://www.vijaykodali.com/Blog/post/2010/08/12/Disabled-button-not-grayed-out-in-Firefox-and-Chrome.aspx#comment</comments>
      <guid>http://www.vijaykodali.com/Blog/post.aspx?id=6466f938-d090-44f2-b460-2a55d81ad92d</guid>
      <pubDate>Thu, 12 Aug 2010 21:08:00 -0600</pubDate>
      <category>ASP.Net 3.5</category>
      <category>ASP.NET</category>
      <category>Web Development</category>
      <dc:publisher>vijay</dc:publisher>
      <pingback:server>http://www.vijaykodali.com/Blog/pingback.axd</pingback:server>
      <pingback:target>http://www.vijaykodali.com/Blog/post.aspx?id=6466f938-d090-44f2-b460-2a55d81ad92d</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.vijaykodali.com/Blog/trackback.axd?id=6466f938-d090-44f2-b460-2a55d81ad92d</trackback:ping>
      <wfw:comment>http://www.vijaykodali.com/Blog/post/2010/08/12/Disabled-button-not-grayed-out-in-Firefox-and-Chrome.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.vijaykodali.com/Blog/syndication.axd?post=6466f938-d090-44f2-b460-2a55d81ad92d</wfw:commentRss>
    </item>
    <item>
      <title>Developer Dashboard SharePoint 2010</title>
      <description>&lt;p&gt;Enable Developer Dashboard via stsadm :&lt;/p&gt;
&lt;pre class="csharpcode"&gt;stsadm -o setproperty -pn developer-dashboard -pv ondemand&lt;/pre&gt;
&lt;p&gt;&lt;!-- .csharpcode, .csharpcode pre { 	font-size: small; 	color: black; 	font-family: consolas, "Courier New", courier, monospace; 	background-color: #ffffff; 	/*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { 	background-color: #f4f4f4; 	width: 100%; 	margin: 0em; } .csharpcode .lnum { color: #606060; } --&gt;&lt;a href="http://www.vijaykodali.com/Blog/image.axd?picture=Developer%20Dashboard.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Developer Dashboard" src="http://www.vijaykodali.com/Blog/image.axd?picture=Developer%20Dashboard_thumb.jpg" border="0" alt="Developer Dashboard" width="562" height="64" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To disable Developer Dashboard:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;stsadm -o setproperty -pn developer-dashboard -pv off&lt;/pre&gt;
&lt;p&gt;&lt;!-- .csharpcode, .csharpcode pre { 	font-size: small; 	color: black; 	font-family: consolas, "Courier New", courier, monospace; 	background-color: #ffffff; 	/*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { 	background-color: #f4f4f4; 	width: 100%; 	margin: 0em; } .csharpcode .lnum { color: #606060; } --&gt;&lt;/p&gt;</description>
      <link>http://www.vijaykodali.com/Blog/post/2010/06/10/Developer-Dashboard-SharePoint-2010.aspx</link>
      <author>Vijay</author>
      <comments>http://www.vijaykodali.com/Blog/post/2010/06/10/Developer-Dashboard-SharePoint-2010.aspx#comment</comments>
      <guid>http://www.vijaykodali.com/Blog/post.aspx?id=a94ce545-0a91-41c6-8bc7-858ea3726fae</guid>
      <pubDate>Thu, 10 Jun 2010 18:03:00 -0600</pubDate>
      <category>SharePoint2010</category>
      <dc:publisher>Vijay</dc:publisher>
      <pingback:server>http://www.vijaykodali.com/Blog/pingback.axd</pingback:server>
      <pingback:target>http://www.vijaykodali.com/Blog/post.aspx?id=a94ce545-0a91-41c6-8bc7-858ea3726fae</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.vijaykodali.com/Blog/trackback.axd?id=a94ce545-0a91-41c6-8bc7-858ea3726fae</trackback:ping>
      <wfw:comment>http://www.vijaykodali.com/Blog/post/2010/06/10/Developer-Dashboard-SharePoint-2010.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.vijaykodali.com/Blog/syndication.axd?post=a94ce545-0a91-41c6-8bc7-858ea3726fae</wfw:commentRss>
    </item>
    <item>
      <title>Alert user before session timeout</title>
      <description>&lt;p&gt;Here is a quick &amp;amp; dirty trick to alert users on session timeout. This is &lt;b&gt;not&lt;/b&gt; a perfect solution. But it will give reader an idea to work on...&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Some facts before we start:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#ff0000"&gt;Session &lt;u&gt;doesn't&lt;/u&gt; end &lt;/font&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;font color="#ff0000"&gt;When the user closes his browser &lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font color="#ff0000"&gt;When the user navigates away from your page &lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font color="#ff0000"&gt;When user connection lost.&lt;/font&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;font color="#ff0000"&gt;Session ends, when the server hasn't gotten a request from the user in a specific time (Session timeout value).&lt;/font&gt; &lt;/p&gt;  &lt;p&gt;In this solution, I am using ajaxtoolkit’s modalpopupextender control to alert user about expiring session.&lt;/p&gt;  &lt;p&gt;Each time a page is rendered back to the client, I am injecting JavaScript that will show modalpopup two minutes before session timeout. I am passing the session expiry value to the client side java script. This will execute a countdown, and at the end display the Popup.&lt;/p&gt;  &lt;p&gt;I added modalpopupextender to the page and set its target control id to a panel. That panel contains alert message and two buttons. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.vijaykodali.com/Blog/image.axd?picture=clip_image002.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://www.vijaykodali.com/Blog/image.axd?picture=clip_image002_thumb.jpg" width="744" height="509" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The Page_Load code looks like this.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.vijaykodali.com/Blog/image.axd?picture=clip_image004_2.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image004" border="0" alt="clip_image004" src="http://www.vijaykodali.com/Blog/image.axd?picture=clip_image004_thumb_2.jpg" width="744" height="342" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I added two java script functions, one for showing alert message and second one is for hiding that message. &lt;/p&gt;  &lt;p&gt;Here are javascript functions&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.vijaykodali.com/Blog/image.axd?picture=clip_image006_2.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image006" border="0" alt="clip_image006" src="http://www.vijaykodali.com/Blog/image.axd?picture=clip_image006_thumb_2.jpg" width="744" height="371" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;That’s it. Run the application and it will check 2 minutes before the timeout and provide user the option to &amp;quot;slide&amp;quot; the session. If user clicks “OK” it will refresh page, which in turn will slide the session. If user clicks “Cancel” the popup will hide.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.vijaykodali.com/Blog/image.axd?picture=clip_image008_1.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image008" border="0" alt="clip_image008" src="http://www.vijaykodali.com/Blog/image.axd?picture=clip_image008_thumb_1.jpg" width="544" height="166" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;You can improve this code on each step. Like for example, to renew session you don’t have to refresh the page. You can just call web service from client side etc.&lt;/p&gt;  &lt;p&gt;If you have any questions, leave a comment.&lt;/p&gt;</description>
      <link>http://www.vijaykodali.com/Blog/post/2010/05/20/Alert-user-before-session-timeout.aspx</link>
      <author>vijay</author>
      <comments>http://www.vijaykodali.com/Blog/post/2010/05/20/Alert-user-before-session-timeout.aspx#comment</comments>
      <guid>http://www.vijaykodali.com/Blog/post.aspx?id=9e93b6dc-89d9-4979-859c-c88dd623acfa</guid>
      <pubDate>Thu, 20 May 2010 20:51:05 -0600</pubDate>
      <category>ASP.Net 3.5</category>
      <category>Web Development</category>
      <dc:publisher>vijay</dc:publisher>
      <pingback:server>http://www.vijaykodali.com/Blog/pingback.axd</pingback:server>
      <pingback:target>http://www.vijaykodali.com/Blog/post.aspx?id=9e93b6dc-89d9-4979-859c-c88dd623acfa</pingback:target>
      <slash:comments>25</slash:comments>
      <trackback:ping>http://www.vijaykodali.com/Blog/trackback.axd?id=9e93b6dc-89d9-4979-859c-c88dd623acfa</trackback:ping>
      <wfw:comment>http://www.vijaykodali.com/Blog/post/2010/05/20/Alert-user-before-session-timeout.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.vijaykodali.com/Blog/syndication.axd?post=9e93b6dc-89d9-4979-859c-c88dd623acfa</wfw:commentRss>
    </item>
    <item>
      <title>Asp.net session on browser close</title>
      <description>&lt;p&gt;&lt;font color="#ff0000"&gt;How to capture logoff time when user closes browser?&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Or &lt;/p&gt;  &lt;p&gt;&lt;font color="#ff0000"&gt;How to end user session when browser closed?&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;These are some of the frequently asked questions in asp.net forums. &lt;/p&gt;  &lt;p&gt;In this post I'll show you how to do this when you're building an ASP.NET web application.&lt;/p&gt;  &lt;p&gt;&lt;font color="#ff0000"&gt;Before we start, one fact:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;There is &lt;strong&gt;no&lt;/strong&gt; full-proof technique to catch the browser close event for 100% of time. The trouble lies in the stateless nature of HTTP. The Web server is out of the picture as soon as it finishes sending the page content to the client. After that, all you can rely on is a client side script. Unfortunately, there is no reliable client side event for browser close. &lt;/p&gt;  &lt;p&gt;&lt;font color="#ff0000"&gt;Solution:&lt;/font&gt; &lt;/p&gt;  &lt;p&gt;The first thing you need to do is create the web service. I've added web service and named it AsynchronousSave.asmx.&amp;#160; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;a href="http://www.vijaykodali.com/Blog/image.axd?picture=Open%20Dialog.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Open Dialog" border="0" alt="Open Dialog" src="http://www.vijaykodali.com/Blog/image.axd?picture=Open%20Dialog_thumb.jpg" width="644" height="392" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Make this web service accessible from Script, by setting class qualified with the ScriptServiceAttribute attribute...&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.vijaykodali.com/Blog/image.axd?picture=clip_image004_1.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image004" border="0" alt="clip_image004" src="http://www.vijaykodali.com/Blog/image.axd?picture=clip_image004_thumb_1.jpg" width="644" height="68" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Add a method (SaveLogOffTime) marked with [WebMethod] attribute. This method simply accepts UserId as a string variable and writes that value and logoff time to text file. But you can pass as many variables as required. You can then use this information for many purposes. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.vijaykodali.com/Blog/image.axd?picture=clip_image006_1.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image006" border="0" alt="clip_image006" src="http://www.vijaykodali.com/Blog/image.axd?picture=clip_image006_thumb_1.jpg" width="640" height="268" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;To end user session, you can just call Session.Abandon() in the above web method.&lt;/p&gt;  &lt;p&gt;To enable web service to be called from page’s client side code, add script manager to page. Here i am adding to SessionTest.aspx page &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.vijaykodali.com/Blog/image.axd?picture=clip_image008.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image008" border="0" alt="clip_image008" src="http://www.vijaykodali.com/Blog/image.axd?picture=clip_image008_thumb.jpg" width="644" height="134" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;When the user closes the browser, &lt;b&gt;&lt;i&gt;onbeforeunload&lt;/i&gt;&lt;/b&gt;&lt;i&gt; &lt;/i&gt;event fires on the client side. Our final step is adding a java script function to that event, which makes web service calls. The code is simple but effective&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.vijaykodali.com/Blog/image.axd?picture=clip_image010_1.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image010" border="0" alt="clip_image010" src="http://www.vijaykodali.com/Blog/image.axd?picture=clip_image010_thumb_1.jpg" width="644" height="193" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;My Code&lt;/p&gt;  &lt;p&gt;HTML:( SessionTest.aspx )&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.vijaykodali.com/Blog/image.axd?picture=clip_image012_1.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image012" border="0" alt="clip_image012" src="http://www.vijaykodali.com/Blog/image.axd?picture=clip_image012_thumb_1.jpg" width="644" height="358" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;C#:( SessionTest.aspx.cs )&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.vijaykodali.com/Blog/image.axd?picture=clip_image014_1.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image014" border="0" alt="clip_image014" src="http://www.vijaykodali.com/Blog/image.axd?picture=clip_image014_thumb_1.jpg" width="644" height="335" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;That’s’ it. Run the application and after browser close, open the text file to see the log off time. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.vijaykodali.com/Blog/image.axd?picture=clip_image016.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image016" border="0" alt="clip_image016" src="http://www.vijaykodali.com/Blog/image.axd?picture=clip_image016_thumb.jpg" width="644" height="259" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The above code works well in IE 7/8. If you have any questions, leave a comment.&lt;/p&gt;</description>
      <link>http://www.vijaykodali.com/Blog/post/2010/04/29/Aspnet-session-on-browser-close.aspx</link>
      <author>vijay</author>
      <comments>http://www.vijaykodali.com/Blog/post/2010/04/29/Aspnet-session-on-browser-close.aspx#comment</comments>
      <guid>http://www.vijaykodali.com/Blog/post.aspx?id=24e4baa4-cbc2-4aea-a890-b28fb429688b</guid>
      <pubDate>Thu, 29 Apr 2010 18:09:00 -0600</pubDate>
      <category>.Net 3.5</category>
      <category>.Net 3.5</category>
      <category>AJAX</category>
      <category>ASP.Net 3.5</category>
      <category>AJAX</category>
      <category>C#3.0</category>
      <category>ASP.Net 3.5</category>
      <category>Visual Studio 2008</category>
      <category>C#3.0</category>
      <category>Visual Studio 2008</category>
      <dc:publisher>vijay</dc:publisher>
      <pingback:server>http://www.vijaykodali.com/Blog/pingback.axd</pingback:server>
      <pingback:target>http://www.vijaykodali.com/Blog/post.aspx?id=24e4baa4-cbc2-4aea-a890-b28fb429688b</pingback:target>
      <slash:comments>13</slash:comments>
      <trackback:ping>http://www.vijaykodali.com/Blog/trackback.axd?id=24e4baa4-cbc2-4aea-a890-b28fb429688b</trackback:ping>
      <wfw:comment>http://www.vijaykodali.com/Blog/post/2010/04/29/Aspnet-session-on-browser-close.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.vijaykodali.com/Blog/syndication.axd?post=24e4baa4-cbc2-4aea-a890-b28fb429688b</wfw:commentRss>
    </item>
    <item>
      <title>Visual Studio 2008 short cuts</title>
      <description>&lt;p&gt;&lt;font size="2" face="Verdana"&gt;I know there are many posts dedicated to this topic. For example, &lt;a href="http://blogs.msdn.com/saraford/archive/tags/Visual+Studio+2008+Tip+of+the+Day/default.aspx" target="_blank"&gt;Sara Ford&lt;/a&gt; posted about 290 shortcuts on her blog. Check &lt;a href="http://blogs.msdn.com/zainnab/default.aspx" target="_blank"&gt;Zain Naboulsi&lt;/a&gt; blog for VS 2010 tips. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Verdana"&gt;But it’s almost impossible to use all of them on daily basis. And further most of them are really not that useful. Here are 10 of my favorite Visual Studio keyboard shortcuts, ones I use most..&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Verdana"&gt;1) &lt;strong&gt;Double TAB&lt;/strong&gt; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Verdana"&gt;If you know snippet key name, write and click double Tab. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Verdana"&gt;For example: Write&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Verdana"&gt;&lt;em&gt;If &lt;/em&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Verdana"&gt;and then click tab key twice to get&lt;/font&gt;&lt;/p&gt;  &lt;div&gt;   &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (&lt;span style="color: #0000ff"&gt;true&lt;/span&gt;)
{
    
}&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&lt;font size="2" face="Verdana"&gt;Similarly write &lt;em&gt;try&lt;/em&gt; then click tab key twice to get &lt;/font&gt;&lt;/p&gt;

&lt;div&gt;
  &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;try&lt;/span&gt;
{

}
&lt;span style="color: #0000ff"&gt;catch&lt;/span&gt; (Exception)
{
    
    &lt;span style="color: #0000ff"&gt;throw&lt;/span&gt;;
}&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="2" face="Verdana"&gt;&lt;/font&gt;&lt;/p&gt;
&lt;font size="2" face="Verdana"&gt;2) &lt;strong&gt;CTRL + TAB&lt;/strong&gt; to switch open windows in visual studio&lt;/font&gt; 

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="2" face="Verdana"&gt;3) &lt;strong&gt;CTRL+K&lt;/strong&gt; and &lt;strong&gt;CTRL+D&lt;/strong&gt; to format code&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="2" face="Verdana"&gt;4) &lt;strong&gt;CTRL+SHIFT+V&lt;/strong&gt; to cycle through clipboard&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="2" face="Verdana"&gt;5) &lt;strong&gt;SHIFT+ALT+ENTER&lt;/strong&gt; for full screen mode&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="2" face="Verdana"&gt;6)&lt;strong&gt; &lt;/strong&gt;&lt;/font&gt;&lt;strong&gt;F7&lt;/strong&gt; to switch between code behind and .aspx files&lt;/p&gt;

&lt;p&gt;7) &lt;strong&gt;&lt;strong&gt;CTRL&lt;/strong&gt;+H&lt;/strong&gt; or &lt;strong&gt;&lt;strong&gt;CTRL&lt;/strong&gt;+SHIFT+H&lt;/strong&gt; for find and replace&lt;/p&gt;

&lt;p&gt;8) &lt;strong&gt;Ctrl+F5&lt;/strong&gt; to run without debugging. &lt;strong&gt;F5&lt;/strong&gt; only will run in debugging mode&lt;/p&gt;

&lt;p&gt;&amp;#160;&amp;#160;&amp;#160; &lt;strong&gt;F11&lt;/strong&gt; to step into a method. &lt;strong&gt;SHIFT+F11&lt;/strong&gt; to step out of a method. &lt;strong&gt;F10&lt;/strong&gt; to step over a method.&lt;/p&gt;

&lt;p&gt;9) &lt;strong&gt;F9&lt;/strong&gt; toggle and un-toggle breakpoints&lt;/p&gt;

&lt;p&gt;10)&lt;strong&gt;F12&lt;/strong&gt; to go to definition&lt;/p&gt;

&lt;p&gt;&lt;font size="2" face="Verdana"&gt;&amp;#160;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;What’s your favorite Visual Studio keyboard shortcut/hidden feature/trick..?&lt;/p&gt;</description>
      <link>http://www.vijaykodali.com/Blog/post/2010/03/04/Visual-Studio-2008-short-cuts.aspx</link>
      <author>vijay</author>
      <comments>http://www.vijaykodali.com/Blog/post/2010/03/04/Visual-Studio-2008-short-cuts.aspx#comment</comments>
      <guid>http://www.vijaykodali.com/Blog/post.aspx?id=ffd2a42f-10ff-4f2e-93b9-918cc31dd960</guid>
      <pubDate>Thu, 04 Mar 2010 21:42:10 -0600</pubDate>
      <category>Visual Studio 2008</category>
      <category>.Net 3.5</category>
      <dc:publisher>vijay</dc:publisher>
      <pingback:server>http://www.vijaykodali.com/Blog/pingback.axd</pingback:server>
      <pingback:target>http://www.vijaykodali.com/Blog/post.aspx?id=ffd2a42f-10ff-4f2e-93b9-918cc31dd960</pingback:target>
      <slash:comments>2</slash:comments>
      <trackback:ping>http://www.vijaykodali.com/Blog/trackback.axd?id=ffd2a42f-10ff-4f2e-93b9-918cc31dd960</trackback:ping>
      <wfw:comment>http://www.vijaykodali.com/Blog/post/2010/03/04/Visual-Studio-2008-short-cuts.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.vijaykodali.com/Blog/syndication.axd?post=ffd2a42f-10ff-4f2e-93b9-918cc31dd960</wfw:commentRss>
    </item>
    <item>
      <title>Cannot start service SPUserCodeV4 on computer – SharePoint 2010</title>
      <description>&lt;p&gt;&lt;strong&gt;Issue:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;If you try to deploy a sandboxed solution and run into this Error&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;em&gt;&lt;font color="#ff0000"&gt;Cannot start service SPUserCodeV4 on computer&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.vijaykodali.com/Blog/image.axd?picture=SandboxError.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="SandboxError" border="0" alt="SandboxError" src="http://www.vijaykodali.com/Blog/image.axd?picture=SandboxError_thumb.jpg" width="346" height="131" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Reason:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Microsoft SharePoint Foundation Sandboxed Code Service is not running on the server.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Go to Central Administration -&amp;gt; System Settings -&amp;gt; Manage services on server- &amp;gt; “&lt;em&gt;Microsoft SharePoint Foundation Sandboxed Code Service&lt;/em&gt; ”&lt;/p&gt;  &lt;p&gt;-&amp;gt; click the “Start” link button to start the service.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.vijaykodali.com/Blog/image.axd?picture=StartSandBoxCodeService.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="StartSandBoxCodeService" border="0" alt="StartSandBoxCodeService" src="http://www.vijaykodali.com/Blog/image.axd?picture=StartSandBoxCodeService_thumb.jpg" width="796" height="100" /&gt;&lt;/a&gt;&lt;/p&gt;</description>
      <link>http://www.vijaykodali.com/Blog/post/2010/01/14/Cannot-start-service-SPUserCodeV4-on-computer-e28093-SharePoint-2010.aspx</link>
      <author>vijay</author>
      <comments>http://www.vijaykodali.com/Blog/post/2010/01/14/Cannot-start-service-SPUserCodeV4-on-computer-e28093-SharePoint-2010.aspx#comment</comments>
      <guid>http://www.vijaykodali.com/Blog/post.aspx?id=4949f005-52fc-4394-b6ac-974a1c431745</guid>
      <pubDate>Thu, 14 Jan 2010 20:51:00 -0600</pubDate>
      <category>SharePoint2010</category>
      <dc:publisher>vijay</dc:publisher>
      <pingback:server>http://www.vijaykodali.com/Blog/pingback.axd</pingback:server>
      <pingback:target>http://www.vijaykodali.com/Blog/post.aspx?id=4949f005-52fc-4394-b6ac-974a1c431745</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.vijaykodali.com/Blog/trackback.axd?id=4949f005-52fc-4394-b6ac-974a1c431745</trackback:ping>
      <wfw:comment>http://www.vijaykodali.com/Blog/post/2010/01/14/Cannot-start-service-SPUserCodeV4-on-computer-e28093-SharePoint-2010.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.vijaykodali.com/Blog/syndication.axd?post=4949f005-52fc-4394-b6ac-974a1c431745</wfw:commentRss>
    </item>
    <item>
      <title>Convert time from one timezone to another timezone in Asp.Net</title>
      <description>&lt;p&gt;Handling timzone is quite simple in Asp.Net applications. First thing,&amp;nbsp;&amp;nbsp; you should always store DateTime values in the DB in one timezone (UTC is most commonly used).&amp;nbsp; This eliminates many conversion issues.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Here is the sample code..&lt;/p&gt;
&lt;pre class="csharpcode"&gt;DateTime time1 = &lt;span class="kwrd"&gt;new&lt;/span&gt; DateTime(2008, 12, 11, 6, 0, 0);  &lt;span class="rem"&gt;// your DataTimeVariable &lt;/span&gt;
TimeZoneInfo timeZone1 = TimeZoneInfo.FindSystemTimeZoneById(&lt;span class="str"&gt;"Eastern Standard Time"&lt;/span&gt;); 
TimeZoneInfo timeZone2 = TimeZoneInfo.FindSystemTimeZoneById(&lt;span class="str"&gt;"India Standard Time"&lt;/span&gt;); 
DateTime newTime = TimeZoneInfo.ConvertTime(time1, timeZone1, timeZone2);&lt;/pre&gt;
&lt;p&gt;&lt;!-- .csharpcode, .csharpcode pre { 	font-size: small; 	color: black; 	font-family: consolas, "Courier New", courier, monospace; 	background-color: #ffffff; 	/*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { 	background-color: #f4f4f4; 	width: 100%; 	margin: 0em; } .csharpcode .lnum { color: #606060; } --&gt;&lt;!-- .csharpcode, .csharpcode pre { 	font-size: small; 	color: black; 	font-family: consolas, "Courier New", courier, monospace; 	background-color: #ffffff; 	/*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { 	background-color: #f4f4f4; 	width: 100%; 	margin: 0em; } .csharpcode .lnum { color: #606060; } --&gt;&lt;/p&gt;
&lt;p&gt;Get all available/supported Timezones in .Net &lt;a href="http://msdn.microsoft.com/en-us/library/system.timezoneinfo.aspx"&gt;TimeZoneInfo class&lt;/a&gt;&lt;/p&gt;
&lt;pre class="csharpcode"&gt;      &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (var tz &lt;span class="kwrd"&gt;in&lt;/span&gt; TimeZoneInfo.GetSystemTimeZones())
            {
                Response.Write(tz.DisplayName + &lt;span class="str"&gt;" is Id =','"&lt;/span&gt; + tz.Id + &lt;span class="str"&gt;"'"&lt;/span&gt;);
                Response.Write(&lt;span class="str"&gt;"&amp;lt;br&amp;gt;"&lt;/span&gt;);
            }&lt;/pre&gt;
&lt;p&gt;&lt;!-- .csharpcode, .csharpcode pre { 	font-size: small; 	color: black; 	font-family: consolas, "Courier New", courier, monospace; 	background-color: #ffffff; 	/*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { 	background-color: #f4f4f4; 	width: 100%; 	margin: 0em; } .csharpcode .lnum { color: #606060; } --&gt;&lt;/p&gt;</description>
      <link>http://www.vijaykodali.com/Blog/post/2010/01/06/Convert-time-from-one-timezone-to-another-timezone-in-AspNet.aspx</link>
      <author>Vijay</author>
      <comments>http://www.vijaykodali.com/Blog/post/2010/01/06/Convert-time-from-one-timezone-to-another-timezone-in-AspNet.aspx#comment</comments>
      <guid>http://www.vijaykodali.com/Blog/post.aspx?id=e3982702-25ea-43cd-b453-1746cfb0bb07</guid>
      <pubDate>Wed, 06 Jan 2010 20:24:00 -0600</pubDate>
      <category>ASP.Net 3.5</category>
      <category>C# 2.0</category>
      <category>Visual Studio 2008</category>
      <dc:publisher>Vijay</dc:publisher>
      <pingback:server>http://www.vijaykodali.com/Blog/pingback.axd</pingback:server>
      <pingback:target>http://www.vijaykodali.com/Blog/post.aspx?id=e3982702-25ea-43cd-b453-1746cfb0bb07</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.vijaykodali.com/Blog/trackback.axd?id=e3982702-25ea-43cd-b453-1746cfb0bb07</trackback:ping>
      <wfw:comment>http://www.vijaykodali.com/Blog/post/2010/01/06/Convert-time-from-one-timezone-to-another-timezone-in-AspNet.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.vijaykodali.com/Blog/syndication.axd?post=e3982702-25ea-43cd-b453-1746cfb0bb07</wfw:commentRss>
    </item>
    <item>
      <title>Auto save Asp.net form values Asynchronously</title>
      <description>&lt;p&gt;&lt;font face="arial,helvetica,sans-serif"&gt;&lt;font size="2"&gt;In this article, I will explain how to save Asp.Net page values asynchronously (aka Gmail style of saving mail drafts). &lt;span style="font-family: 'Trebuchet MS'; font-size: 11pt"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;span&gt;&lt;span style="font-family: 'Trebuchet MS'; font-size: 11pt"&gt;&lt;font size="2" face="arial,helvetica,sans-serif"&gt;&lt;strong&gt;Introduction:&lt;/strong&gt; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt; &lt;p&gt;&lt;span style="font-family: 'Trebuchet MS'; font-size: 11pt"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt"&gt;&lt;span&gt;&lt;font face="arial,helvetica,sans-serif"&gt;In the past, Web applications were known for having less usable, less responsive user interfaces. AJAX changed all of that. The application can work asynchronously and the user doesn't have to sit and wait for pages to refresh. : &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-family: 'Trebuchet MS'; font-size: 11pt"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt"&gt;&lt;span&gt;&lt;font face="arial,helvetica,sans-serif"&gt;What is Ajax? &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-family: 'Trebuchet MS'; font-size: 11pt"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt"&gt;&lt;span&gt;&lt;font face="arial,helvetica,sans-serif"&gt;Ajax (Asynchronous JavaScript and XML) is an approach to web development that uses client-side scripting to exchange data with a web server.&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-family: 'Trebuchet MS'; font-size: 11pt"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt"&gt;&lt;span&gt;&lt;font face="arial,helvetica,sans-serif"&gt;&lt;strong&gt;Solution:&lt;/strong&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;/p&gt; &lt;p&gt;&lt;span style="font-family: 'Trebuchet MS'; font-size: 11pt"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt"&gt;&lt;span&gt;&lt;font face="arial,helvetica,sans-serif"&gt;There are several ways of achieve it. In this article I am using AJAX functionality to call ASP.NET Web services from the browser by using client script. Yes, no updatepanel.&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-family: 'Trebuchet MS'; font-size: 11pt"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt"&gt;&lt;span&gt;&lt;font face="arial,helvetica,sans-serif"&gt;Start by adding a web service to the project as shown below, name it as AsynchronousSave.asmx. Make this web service accessible from Script, by setting class qualified with the ScriptServiceAttribute attribute...&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;div&gt;&lt;pre class="csharpcode"&gt;[System.Web.Script.Services.ScriptService]    
&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; AsynchronousSave : System.Web.Services.WebService 
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;span style="font-family: 'Trebuchet MS'; font-size: 11pt"&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt"&gt;&lt;span&gt;&lt;font face="arial,helvetica,sans-serif"&gt;&lt;br&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;
&lt;div&gt;&lt;pre class="csharpcode"&gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt"&gt;&lt;span&gt;&lt;font face="arial,helvetica,sans-serif"&gt;Here is the AsynchronousSave webservice class:&lt;/font&gt;&amp;nbsp;&lt;br&gt;&lt;/pre&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt"&gt;&lt;span&gt;&lt;font face="arial,helvetica,sans-serif"&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;pre class="csharpcode"&gt;&lt;span class="rem"&gt;// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. &lt;/span&gt;
[System.Web.Script.Services.ScriptService]
&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; WebService2 : System.Web.Services.WebService
{

    [WebMethod]
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; HelloWorld()
    {

        &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="str"&gt;"Hello World"&lt;/span&gt;;

    }

    [WebMethod]
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; SaveInput(String input)
    {
        &lt;span class="kwrd"&gt;string&lt;/span&gt; StrInput = Server.HtmlEncode(input); &lt;span class="kwrd"&gt;if&lt;/span&gt; (!String.IsNullOrEmpty(StrInput))
        {

            &lt;span class="kwrd"&gt;string&lt;/span&gt;[] strFields = StrInput.Split(&lt;span class="str"&gt;'+'&lt;/span&gt;);

            &lt;span class="rem"&gt;//code to save all input values&lt;/span&gt;
            &lt;span class="rem"&gt;// you can easily savethese values to temp DB table, temp file or xml file&lt;/span&gt;
            &lt;span class="rem"&gt;//Dispaly last saved values&lt;/span&gt;

            &lt;span class="kwrd"&gt;return&lt;/span&gt; String.Format(&lt;span class="str"&gt;"Last saved text: FirstName {0} ,&amp;lt;br/&amp;gt; Last name {1} &amp;lt;br/&amp;gt; Last "&lt;/span&gt;

            + &lt;span class="str"&gt;"saved draft {2} at {3}."&lt;/span&gt;, strFields[0], strFields[1], strFields[2], DateTime.Now);

        }

        &lt;span class="kwrd"&gt;else&lt;/span&gt;
        {

            &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="str"&gt;""&lt;/span&gt;; &lt;span class="rem"&gt;//if input values are empty..retrun empty string&lt;/span&gt;
        }
    }
}&lt;/pre&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt"&gt;&lt;span&gt;&lt;font face="arial,helvetica,sans-serif"&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt"&gt;&lt;span&gt;&lt;font face="arial,helvetica,sans-serif"&gt;Nothing fancy here, just methods marked with [WebMethod] attribute. The Saveinput method takes an input string with “+” as delimiter between form values.&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt"&gt;&lt;span&gt;&lt;font face="arial,helvetica,sans-serif"&gt;To enable web service to be called from client side, add script manager to page&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;br&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Trebuchet MS'; font-size: 11pt"&gt;&lt;font size="2"&gt;&lt;/p&gt;
&lt;div&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:ScriptManager&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="scriptManager"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Services&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:ServiceReference&lt;/span&gt; &lt;span class="attr"&gt;Path&lt;/span&gt;&lt;span class="kwrd"&gt;="~/AsynchronousSave.asmx"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Services&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:ScriptManager&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;p&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt"&gt;&lt;span&gt;&lt;font face="arial,helvetica,sans-serif"&gt;And here is HTML of page&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    First Name:&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="txtFirstName"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
    LastName:&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="txtLastName"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 
    Draft :&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="txtDraft"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:TextBox&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="Preview"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt"&gt;&lt;span&gt;
&lt;p&gt;&lt;font face="arial,helvetica,sans-serif"&gt;The following example shows the java script that makes service calls&lt;/font&gt;&lt;/p&gt;
&lt;div&gt;&lt;pre class="csharpcode"&gt;&amp;lt;script language =&lt;span class="str"&gt;"javascript"&lt;/span&gt; &amp;gt;
    &lt;span class="rem"&gt;//This function calls the web service    &lt;/span&gt;
    &lt;span class="kwrd"&gt;function&lt;/span&gt; SaveUserInput() {
        &lt;span class="kwrd"&gt;var&lt;/span&gt; fName = document.getElementById(&lt;span class="str"&gt;"txtFirstName"&lt;/span&gt;);
        &lt;span class="kwrd"&gt;var&lt;/span&gt; lName = document.getElementById(&lt;span class="str"&gt;"txtLastName"&lt;/span&gt;);
        &lt;span class="kwrd"&gt;var&lt;/span&gt; draft = document.getElementById(&lt;span class="str"&gt;"txtDraft"&lt;/span&gt;);
        &lt;span class="rem"&gt;//Saving all input in a single value         &lt;/span&gt;
        &lt;span class="kwrd"&gt;var&lt;/span&gt; input = fName.value + &lt;span class="str"&gt;"+"&lt;/span&gt; + lName.value + &lt;span class="str"&gt;"+"&lt;/span&gt; + draft.value;
        &lt;span class="rem"&gt;//ProjName.WebServiceName.WebMethod         &lt;/span&gt;
        SampleApplication1.AsynchronousSave.SaveInput(input, SucceededCallback);
    }
    &lt;span class="rem"&gt;// This is the callback function that processes the Web Service return value.     &lt;/span&gt;
    &lt;span class="kwrd"&gt;function&lt;/span&gt; SucceededCallback(result) {
        &lt;span class="kwrd"&gt;var&lt;/span&gt; divPreview = document.getElementById(&lt;span class="str"&gt;"Preview"&lt;/span&gt;);
        divPreview.innerHTML = result;
    }
    &lt;span class="rem"&gt;// execute SaveUserInput for every 10 sec, timeout value is in miliseconds&lt;/span&gt;
    window.setInterval(&lt;span class="str"&gt;'SaveUserInput()'&lt;/span&gt;, 10000); 
    
&amp;lt;/script&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt"&gt;&lt;span&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;font face="arial,helvetica,sans-serif"&gt;Reference: &lt;/font&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt" class="MsoNormal"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/bb398998.aspx"&gt;&lt;font color="#800080" size="3" face="arial,helvetica,sans-serif"&gt;http://msdn.microsoft.com/en-us/library/bb398998.aspx&lt;/font&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;</description>
      <link>http://www.vijaykodali.com/Blog/post/2009/11/23/Auto-save-Aspnet-web-form-values-Asynchronously.aspx</link>
      <author>vijay</author>
      <comments>http://www.vijaykodali.com/Blog/post/2009/11/23/Auto-save-Aspnet-web-form-values-Asynchronously.aspx#comment</comments>
      <guid>http://www.vijaykodali.com/Blog/post.aspx?id=e75162b8-eeee-4793-92c8-b56f5da0e55d</guid>
      <pubDate>Mon, 23 Nov 2009 14:17:00 -0600</pubDate>
      <category>.Net 3.5</category>
      <category>ASP.Net 3.5</category>
      <category>JavaScript</category>
      <category>Web services</category>
      <dc:publisher>vijay</dc:publisher>
      <pingback:server>http://www.vijaykodali.com/Blog/pingback.axd</pingback:server>
      <pingback:target>http://www.vijaykodali.com/Blog/post.aspx?id=e75162b8-eeee-4793-92c8-b56f5da0e55d</pingback:target>
      <slash:comments>4</slash:comments>
      <trackback:ping>http://www.vijaykodali.com/Blog/trackback.axd?id=e75162b8-eeee-4793-92c8-b56f5da0e55d</trackback:ping>
      <wfw:comment>http://www.vijaykodali.com/Blog/post/2009/11/23/Auto-save-Aspnet-web-form-values-Asynchronously.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.vijaykodali.com/Blog/syndication.axd?post=e75162b8-eeee-4793-92c8-b56f5da0e55d</wfw:commentRss>
    </item>
    <item>
      <title>ASP.Net AJAX AsyncFileUpload Control</title>
      <description>&lt;p&gt;&lt;span style="font-family: arial; font-size: 10pt"&gt;&lt;span style="font-family: arial; font-size: 10pt"&gt;&lt;span style="font-family: arial; font-size: 10pt"&gt;AsyncFileUpload is a new ASP.NET AJAX Control (Ajax Control Toolkit (v 3.0.30930) released for .NET 3.5 SP1&lt;/span&gt;&lt;span style="font-family: tahoma; color: navy; font-size: 10pt"&gt;) &lt;/span&gt;&lt;span style="font-family: arial; font-size: 10pt"&gt;that allows you asynchronously upload files to server. You don’t need a separate upload button for this control. &lt;/span&gt;&lt;span style="font-family: arial; font-size: 10pt"&gt;&amp;#160;&lt;/span&gt;&lt;span style="font-family: arial; font-size: 10pt"&gt;Add the AsyncFileUpload control and a label to the web form for the uploading and displaying messages respectively.&amp;#160; HTML:&lt;/span&gt;&lt;span style="font-family: arial; font-size: 10pt"&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #c71585"&gt;asp&lt;/span&gt;:&lt;span style="color: #800000"&gt;ScriptManager&lt;/span&gt; &lt;span style="color: #ff0000"&gt;ID&lt;/span&gt;=&lt;span style="color: #0000ff"&gt;&amp;quot;ScriptManager1&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;runat&lt;/span&gt;=&lt;span style="color: #0000ff"&gt;&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; 
&lt;/pre&gt;
&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #c71585"&gt;asp&lt;/span&gt;:&lt;span style="color: #800000"&gt;ScriptManager&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; 
&lt;/pre&gt;
&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;cc1&lt;/span&gt;:&lt;span style="color: #ff0000"&gt;AsyncFileUpload&lt;/span&gt; &lt;span style="color: #ff0000"&gt;ID&lt;/span&gt;=&lt;span style="color: #0000ff"&gt;&amp;quot;AsyncFileUpload1&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;runat&lt;/span&gt;=&lt;span style="color: #0000ff"&gt;&amp;quot;server&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;CompleteBackColor&lt;/span&gt;=&lt;span style="color: #0000ff"&gt;&amp;quot;White&amp;quot;&lt;/span&gt; 
&lt;/pre&gt;
&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #ff0000"&gt;OnUploadedComplete&lt;/span&gt;=&lt;span style="color: #0000ff"&gt;&amp;quot;AsyncFileUpload1_UploadedComplete&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;OnUploadedFileError&lt;/span&gt;=&lt;span style="color: #0000ff"&gt;&amp;quot;AsyncFileUpload1_UploadedFileError&amp;quot;&lt;/span&gt; 
&lt;/pre&gt;
&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #ff0000"&gt;OnClientUploadComplete&lt;/span&gt;=&lt;span style="color: #0000ff"&gt;&amp;quot;Success&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;OnClientUploadError&lt;/span&gt;=&lt;span style="color: #0000ff"&gt;&amp;quot;Error&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt; 
&lt;/pre&gt;
&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #c71585"&gt;asp&lt;/span&gt;:&lt;span style="color: #800000"&gt;Label&lt;/span&gt; &lt;span style="color: #ff0000"&gt;ID&lt;/span&gt;=&lt;span style="color: #0000ff"&gt;&amp;quot;Label1&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;runat&lt;/span&gt;=&lt;span style="color: #0000ff"&gt;&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #c71585"&gt;asp&lt;/span&gt;:&lt;span style="color: #800000"&gt;Label&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; 
&lt;/pre&gt;&lt;/pre&gt;
&lt;span style="font-family: arial; font-size: 10pt"&gt;&lt;span style="font-family: arial; font-size: 10pt"&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;
        &lt;p&gt;&lt;span style="font-family: arial; font-size: 10pt"&gt;&lt;font size="3"&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;

        &lt;p&gt;&lt;span style="font-family: arial; font-size: 10pt"&gt;&lt;font size="3"&gt;Server side events:&lt;/font&gt;&lt;/span&gt; &lt;/p&gt;
      &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;

&lt;pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #0000ff"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; AsyncFileUpload1_UploadedComplete(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; sender, AjaxControlToolkit.AsyncFileUploadEventArgs e) 
&lt;/pre&gt;
&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;{ 
&lt;/pre&gt;
&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; &lt;span style="color: #008000"&gt;//Fired on the server side when the file successfully uploaded &lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;   &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (AsyncFileUpload1.HasFile) 
&lt;/pre&gt;
&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;   { 
&lt;/pre&gt;
&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;         AsyncFileUpload1.SaveAs(@&amp;quot;&lt;span style="color: #8b0000"&gt;C:\Images\&lt;/span&gt;&amp;quot; + AsyncFileUpload1.FileName ); 
&lt;/pre&gt;
&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;         Label1.Text = &amp;quot;&lt;span style="color: #8b0000"&gt;Received &lt;/span&gt;&amp;quot; + AsyncFileUpload1.FileName + &amp;quot;&lt;span style="color: #8b0000"&gt; Content Type &lt;/span&gt;&amp;quot; + AsyncFileUpload1.PostedFile.ContentType ; 
&lt;/pre&gt;
&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;   } 
&lt;/pre&gt;
&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; } 
&lt;/pre&gt;
&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #0000ff"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; AsyncFileUpload1_UploadedFileError(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; sender, AjaxControlToolkit.AsyncFileUploadEventArgs e) 
&lt;/pre&gt;
&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; { 
&lt;/pre&gt;
&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; &lt;span style="color: #008000"&gt;//Fired on the server side when the loaded file is corrupted &lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; &lt;span style="color: #008000"&gt;//Display some error message here &lt;/span&gt;
&lt;/pre&gt;
&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; } 
&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;&lt;span style="font-family: arial; font-size: 10pt"&gt;&lt;font size="3"&gt;Client side events:&lt;/font&gt;&lt;/span&gt; &lt;/p&gt;

&lt;p&gt;&lt;span style="font-family: arial; font-size: 10pt"&gt;&lt;font size="3"&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style="font-family: arial; font-size: 10pt"&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="font-family: arial; font-size: 10pt"&gt;OnClientUploadError&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family: arial; font-size: 10pt"&gt; - The name of a javascript function executed in the client-side if the file uploading failed &lt;/span&gt;&lt;span style="font-family: arial; font-size: 10pt"&gt;&amp;#160;&lt;/span&gt; &lt;/p&gt;

&lt;p&gt;&lt;span style="font-family: arial; font-size: 10pt"&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="font-family: arial; font-size: 10pt"&gt;OnClientUploadComplete&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family: arial; font-size: 10pt"&gt; - The name of a javascript function executed in the client-side on the file uploading completed &lt;/span&gt;&lt;/p&gt;

&lt;pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #0000ff"&gt;function&lt;/span&gt; Success() { 
&lt;/pre&gt;
&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #0000ff"&gt;document&lt;/span&gt;.getElementById(&amp;quot;&lt;span style="color: #8b0000"&gt;Label1&lt;/span&gt;&amp;quot;).innerHTML = &amp;quot;&lt;span style="color: #8b0000"&gt;File Uploaded Successfully !!&lt;/span&gt;&amp;quot;; 
&lt;/pre&gt;
&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;} 
&lt;/pre&gt;
&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #0000ff"&gt;function&lt;/span&gt; Error() { 
&lt;/pre&gt;
&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #0000ff"&gt;document&lt;/span&gt;.getElementById(&amp;quot;&lt;span style="color: #8b0000"&gt;Label1&lt;/span&gt;&amp;quot;).innerHTML = &amp;quot;&lt;span style="color: #8b0000"&gt;File upload failed&lt;/span&gt;&amp;quot;; 
&lt;/pre&gt;
&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;} 
&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;&lt;font size="2"&gt;&lt;span style="font-family: arial; font-size: 10pt"&gt;&lt;span style="font-family: arial; font-size: 10pt"&gt;We can use&amp;#160; &lt;span style="font-family: arial; font-size: 10pt"&gt;&lt;strong&gt;OnClientUploadComplete &lt;/strong&gt;to clear fileupload control selction,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt; &lt;/p&gt;
&lt;font size="+0"&gt;&lt;span style="font-family: arial; font-size: 10pt"&gt;&lt;span style="font-family: arial; font-size: 10pt"&gt;&lt;span style="font-family: arial; font-size: 10pt"&gt;
        &lt;pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #0000ff"&gt;function&lt;/span&gt; Success() { 
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #0000ff"&gt;document&lt;/span&gt;.getElementById (&amp;quot;&lt;span style="color: #8b0000"&gt;Label1&lt;/span&gt;&amp;quot;).innerHTML = &amp;quot;&lt;span style="color: #8b0000"&gt;File Uploaded Successfully !!&lt;/span&gt;&amp;quot;; 
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #0000ff"&gt;var&lt;/span&gt; fu = &lt;span style="color: #0000ff"&gt;document&lt;/span&gt;.getElementById(&amp;quot;&lt;span style="color: #8b0000"&gt;AsyncFileUpload1&lt;/span&gt;&amp;quot;); 
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #0000ff"&gt;document&lt;/span&gt;.getElementById(&amp;quot;&lt;span style="color: #8b0000"&gt;AsyncFileUpload1&lt;/span&gt;&amp;quot;).innerHTML = fu.innerHTML; 
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;} 
&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;/pre&gt;
      &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;

&lt;p&gt;&lt;font size="2"&gt;&lt;span style="font-family: arial; font-size: 10pt"&gt;&lt;span style="font-family: arial; font-size: 10pt"&gt;Reference:&lt;/span&gt;&lt;span style="font-family: arial; font-size: 10pt"&gt;&amp;#160;&lt;/span&gt; &lt;/span&gt;&lt;span style="font-family: arial; font-size: 10pt"&gt;&lt;a href="http://www.asp.net/AJAX/AjaxControlToolkit/Samples/AsyncFileUpload/AsyncFileUpload.aspx"&gt;&lt;font color="#800080"&gt;http://www.asp.net/AJAX/AjaxControlToolkit/Samples/AsyncFileUpload/AsyncFileUpload.aspx&lt;/font&gt;&lt;/a&gt;&lt;/span&gt; &lt;/font&gt;&lt;span style="font-family: arial; font-size: 10pt"&gt;&lt;/span&gt;&lt;/p&gt;</description>
      <link>http://www.vijaykodali.com/Blog/post/2009/10/02/ASPNet-AJAX-AsyncFileUpload-Control.aspx</link>
      <author>vijay</author>
      <comments>http://www.vijaykodali.com/Blog/post/2009/10/02/ASPNet-AJAX-AsyncFileUpload-Control.aspx#comment</comments>
      <guid>http://www.vijaykodali.com/Blog/post.aspx?id=20588550-f4a8-44fb-ac41-6d53347f477c</guid>
      <pubDate>Fri, 02 Oct 2009 14:48:00 -0600</pubDate>
      <category>.Net 3.5</category>
      <category>.Net 3.5</category>
      <category>.Net 3.5</category>
      <category>AJAX</category>
      <category>.Net 3.5</category>
      <category>AJAX</category>
      <category>AJAX</category>
      <category>ASP.Net 3.5</category>
      <category>AJAX</category>
      <category>ASP.Net 3.5</category>
      <category>ASP.Net 3.5</category>
      <category>ASP.Net 3.5</category>
      <dc:publisher>vijay</dc:publisher>
      <pingback:server>http://www.vijaykodali.com/Blog/pingback.axd</pingback:server>
      <pingback:target>http://www.vijaykodali.com/Blog/post.aspx?id=20588550-f4a8-44fb-ac41-6d53347f477c</pingback:target>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://www.vijaykodali.com/Blog/trackback.axd?id=20588550-f4a8-44fb-ac41-6d53347f477c</trackback:ping>
      <wfw:comment>http://www.vijaykodali.com/Blog/post/2009/10/02/ASPNet-AJAX-AsyncFileUpload-Control.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.vijaykodali.com/Blog/syndication.axd?post=20588550-f4a8-44fb-ac41-6d53347f477c</wfw:commentRss>
    </item>
  </channel>
</rss>

