<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="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" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-6570205941698119855</atom:id><lastBuildDate>Wed, 06 Nov 2024 02:51:56 +0000</lastBuildDate><category>ASP.NET(C#)</category><category>SQL</category><category>C#</category><category>JavaScript</category><category>SilverLight</category><category>Web Application</category><category>Web Technologies</category><category>JQuery</category><category>WindowsApp(C#)</category><category>CSS</category><category>Tips</category><title>Microsoft Dot Net Wheel</title><description>&lt;b&gt;A blog by Anand Mani Tiwari&lt;/b&gt;</description><link>http://msdnw.blogspot.com/</link><managingEditor>noreply@blogger.com (Anand Mani Tiwari)</managingEditor><generator>Blogger</generator><openSearch:totalResults>27</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6570205941698119855.post-6387144662902196322</guid><pubDate>Tue, 07 May 2013 15:14:00 +0000</pubDate><atom:updated>2013-05-07T08:23:19.764-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ASP.NET(C#)</category><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">JavaScript</category><category domain="http://www.blogger.com/atom/ns#">JQuery</category><category domain="http://www.blogger.com/atom/ns#">Web Application</category><category domain="http://www.blogger.com/atom/ns#">Web Technologies</category><title>Generate Select All Checkbox control in C# , ASP.Net</title><description>&lt;p&gt;Hi guys, today I faced a scenario where I need to create (auto generate) a Select All CheckBox control by C# code behind at runtime and and insert it to the Ajax Control toolkit TabPanel.&lt;/p&gt;  &lt;p&gt;Once user will check the Select All checkbox all the other checkbox within that Tab will get checked without post back of page. For opposing post back and achieving mark as check JavaScript is the best option coming in mind. And hence I choose the same.&lt;/p&gt;  &lt;p&gt;I wrote JavaScript Global function which accept Select All CheckBox Control Id and look for the related controls and auto generate the required Id for them.&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRPNbek7nctOkLx84j8691wgTOl7jjg9wX6_nea-OUrbim6Ki9OQwSu8EnePvahWtdukBmYp2Ey-qGU-kUcwUbz6Lx9pBjE_SXRCQk2h8KZMtSBHXL_ZWEp_cR3OJS9FhDMpXr1W_K4PU/s1600-h/image%25255B232%25255D.png&quot; target=&quot;_blank&quot;&gt;&lt;img style=&quot;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&quot; title=&quot;Generate Select All Checkbox : 2bexpert&quot; border=&quot;0&quot; alt=&quot;Generate Select All Checkbox : 2bexpert&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8EttIY77H7Pq3QuY-IQcQCn5SJzO84T5Bs8B_bOwBGGArjoY-mtX_rVjgyaYVdFnGN9PEppcsTafYvgzXsGrK3cZpuFB5BL13Mb0MhfIoFQPAYzat46cFqbd_o7hxe00xw3ShQLcpfpQ/?imgmax=800&quot; width=&quot;470&quot; height=&quot;209&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;For achieving this functionality I have written Below mention code:&lt;/p&gt;  &lt;p&gt;&lt;u&gt;&lt;strong&gt;&lt;font color=&quot;#30b8cf&quot;&gt;C# Code for Generating CheckBox Dynamically (Auto Generate Checkbox):&lt;/font&gt;&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;font face=&quot;Consolas&quot;&gt;&lt;span style=&quot;font-family: ; color: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;font color=&quot;#0000ff&quot;&gt;&lt;font style=&quot;font-size: 9.5pt&quot;&gt;#region&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style=&quot;font-family: ; color: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;font style=&quot;font-size: 9.5pt&quot; color=&quot;#000000&quot;&gt; Generate SelectAllCbx&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;font face=&quot;Consolas&quot;&gt;&lt;span style=&quot;font-family: ; color: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;font color=&quot;#000000&quot; face=&quot;Consolas&quot;&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;font face=&quot;Consolas&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;&lt;font style=&quot;font-size: 9.5pt&quot;&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;font style=&quot;font-size: 9.5pt&quot;&gt;&lt;span style=&quot;color: &quot;&gt;&lt;font color=&quot;#0000ff&quot;&gt;private&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#000000&quot;&gt; &lt;/font&gt;&lt;span style=&quot;color: &quot;&gt;&lt;font color=&quot;#0000ff&quot;&gt;void&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#000000&quot;&gt; GenerateSelectAllCbx(&lt;/font&gt;&lt;span style=&quot;color: &quot;&gt;&lt;font color=&quot;#0000ff&quot;&gt;string&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#000000&quot;&gt; cbxId, &lt;/font&gt;&lt;span style=&quot;color: &quot;&gt;&lt;font color=&quot;#0000ff&quot;&gt;int&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#000000&quot;&gt; index, &lt;/font&gt;&lt;span style=&quot;color: &quot;&gt;&lt;font color=&quot;#0000ff&quot;&gt;int&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#000000&quot;&gt; width, &lt;/font&gt;&lt;span style=&quot;color: &quot;&gt;&lt;font color=&quot;#0000ff&quot;&gt;bool&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#000000&quot;&gt; isChecked, AjaxControlToolkit.&lt;/font&gt;&lt;span style=&quot;color: &quot;&gt;&lt;font color=&quot;#2b91af&quot;&gt;TabPanel&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#000000&quot;&gt; tab)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;font face=&quot;Consolas&quot;&gt;&lt;font style=&quot;font-size: 9.5pt&quot; color=&quot;#000000&quot;&gt;&amp;#160;&amp;#160;&amp;#160; {&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;font face=&quot;Consolas&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;&lt;font style=&quot;font-size: 9.5pt&quot;&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;font style=&quot;font-size: 9.5pt&quot;&gt;&lt;span style=&quot;color: &quot;&gt;&lt;font color=&quot;#2b91af&quot;&gt;CheckBox&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#000000&quot;&gt; cbAll = &lt;/font&gt;&lt;span style=&quot;color: &quot;&gt;&lt;font color=&quot;#0000ff&quot;&gt;new&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#000000&quot;&gt; &lt;/font&gt;&lt;span style=&quot;color: &quot;&gt;&lt;font color=&quot;#2b91af&quot;&gt;CheckBox&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#000000&quot;&gt;();&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;font face=&quot;Consolas&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;&lt;font style=&quot;font-size: 9.5pt&quot;&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; cbAll.Attributes.Add(&lt;/font&gt;&lt;/font&gt;&lt;font style=&quot;font-size: 9.5pt&quot;&gt;&lt;span style=&quot;color: &quot;&gt;&lt;font color=&quot;#a31515&quot;&gt;&amp;quot;Value&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#000000&quot;&gt;, &lt;/font&gt;&lt;span style=&quot;color: &quot;&gt;&lt;font color=&quot;#a31515&quot;&gt;&amp;quot;All&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#000000&quot;&gt;);&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;font face=&quot;Consolas&quot;&gt;&lt;font style=&quot;font-size: 9.5pt&quot; color=&quot;#000000&quot;&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; cbAll.ID = cbxId + index.ToString();&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;font face=&quot;Consolas&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;&lt;font style=&quot;font-size: 9.5pt&quot;&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; cbAll.Text = &lt;/font&gt;&lt;/font&gt;&lt;font style=&quot;font-size: 9.5pt&quot;&gt;&lt;span style=&quot;color: &quot;&gt;&lt;font color=&quot;#a31515&quot;&gt;&amp;quot;Select All&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#000000&quot;&gt;;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;font face=&quot;Consolas&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;&lt;font style=&quot;font-size: 9.5pt&quot;&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; cbAll.Width = &lt;/font&gt;&lt;/font&gt;&lt;font style=&quot;font-size: 9.5pt&quot;&gt;&lt;span style=&quot;color: &quot;&gt;&lt;font color=&quot;#2b91af&quot;&gt;Unit&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#000000&quot;&gt;.Pixel(width);&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;font face=&quot;Consolas&quot;&gt;&lt;font style=&quot;font-size: 9.5pt&quot; color=&quot;#000000&quot;&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; cbAll.Checked = isChecked;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;font face=&quot;Consolas&quot;&gt;&lt;font style=&quot;font-size: 9.5pt&quot; color=&quot;#000000&quot;&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; cbAll.Enabled = !isChecked;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;font face=&quot;Consolas&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;&lt;font style=&quot;font-size: 9.5pt&quot;&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; cbAll.Attributes.Add(&lt;/font&gt;&lt;/font&gt;&lt;font style=&quot;font-size: 9.5pt&quot;&gt;&lt;span style=&quot;color: &quot;&gt;&lt;font color=&quot;#a31515&quot;&gt;&amp;quot;onclick&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#000000&quot;&gt;, &lt;/font&gt;&lt;span style=&quot;color: &quot;&gt;&lt;font color=&quot;#a31515&quot;&gt;&amp;quot;javascript: SelectAll(this,&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#000000&quot;&gt; + index.ToString() + &lt;/font&gt;&lt;span style=&quot;color: &quot;&gt;&lt;font color=&quot;#a31515&quot;&gt;&amp;quot;);&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#000000&quot;&gt;);&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;font face=&quot;Consolas&quot;&gt;&lt;font style=&quot;font-size: 9.5pt&quot; color=&quot;#000000&quot;&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; tab.Controls.Add(cbAll);&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;font face=&quot;Consolas&quot;&gt;&lt;font style=&quot;font-size: 9.5pt&quot; color=&quot;#000000&quot;&gt;&amp;#160;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;font face=&quot;Consolas&quot;&gt;&lt;font style=&quot;font-size: 9.5pt&quot; color=&quot;#000000&quot;&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;font color=&quot;#000000&quot; face=&quot;Consolas&quot;&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; color: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;font face=&quot;Consolas&quot;&gt;&lt;font style=&quot;font-size: 9.5pt&quot; color=&quot;#0000ff&quot;&gt;&amp;#160;&amp;#160;&amp;#160; #endregion&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; color: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;font color=&quot;#0000ff&quot; face=&quot;Consolas&quot;&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;Just we need to call this method where we want to insert Select All CheckBox:&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;font face=&quot;Consolas&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;&lt;font style=&quot;font-size: 9.5pt&quot;&gt;GenerateSelectAllCbx(&lt;/font&gt;&lt;/font&gt;&lt;font style=&quot;font-size: 9.5pt&quot;&gt;&lt;span style=&quot;color: &quot;&gt;&lt;font color=&quot;#a31515&quot;&gt;&amp;quot;cbEngRating_&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#000000&quot;&gt;, 4, 750, &lt;/font&gt;&lt;span style=&quot;color: &quot;&gt;&lt;font color=&quot;#0000ff&quot;&gt;false&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#000000&quot;&gt;, tabICFRating);&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Whenever this Method would get called it will Insert a Checkbox (Select All) and handle other automatically for achieving that below is JavaScript Code:&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;font face=&quot;Consolas&quot;&gt;&lt;span style=&quot;font-family: ; color: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;font color=&quot;#0000ff&quot;&gt;&lt;font style=&quot;font-size: 9.5pt&quot;&gt;function&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style=&quot;font-family: ; color: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;font style=&quot;font-size: 9.5pt&quot; color=&quot;#000000&quot;&gt; SelectAll(control_id, x) {&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;font face=&quot;Consolas&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;&lt;font style=&quot;font-size: 9.5pt&quot;&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;font style=&quot;font-size: 9.5pt&quot;&gt;&lt;span style=&quot;color: &quot;&gt;&lt;font color=&quot;#0000ff&quot;&gt;var&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#000000&quot;&gt; chkAll = $(control_id);&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;font face=&quot;Consolas&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;&lt;font style=&quot;font-size: 9.5pt&quot;&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;font style=&quot;font-size: 9.5pt&quot;&gt;&lt;span style=&quot;color: &quot;&gt;&lt;font color=&quot;#0000ff&quot;&gt;var&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#000000&quot;&gt; autoId = control_id.id.substring(0, control_id.id.length - x.toString().length)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;font face=&quot;Consolas&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;&lt;font style=&quot;font-size: 9.5pt&quot;&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;font style=&quot;font-size: 9.5pt&quot;&gt;&lt;span style=&quot;color: &quot;&gt;&lt;font color=&quot;#0000ff&quot;&gt;for&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#000000&quot;&gt; (&lt;/font&gt;&lt;span style=&quot;color: &quot;&gt;&lt;font color=&quot;#0000ff&quot;&gt;var&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#000000&quot;&gt; i = 0; i &amp;lt; x; i++) {&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;font face=&quot;Consolas&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;&lt;font style=&quot;font-size: 9.5pt&quot;&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $(&lt;/font&gt;&lt;/font&gt;&lt;font style=&quot;font-size: 9.5pt&quot;&gt;&lt;span style=&quot;color: &quot;&gt;&lt;font color=&quot;#800000&quot;&gt;&amp;quot;#&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#000000&quot;&gt; + autoId + i).attr(&lt;/font&gt;&lt;span style=&quot;color: &quot;&gt;&lt;font color=&quot;#800000&quot;&gt;&amp;quot;Checked&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#000000&quot;&gt;, chkAll.prop(&lt;/font&gt;&lt;span style=&quot;color: &quot;&gt;&lt;font color=&quot;#800000&quot;&gt;&amp;quot;checked&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#000000&quot;&gt;));&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;font face=&quot;Consolas&quot;&gt;&lt;font style=&quot;font-size: 9.5pt&quot; color=&quot;#000000&quot;&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;font face=&quot;Consolas&quot;&gt;&lt;font style=&quot;font-size: 9.5pt&quot; color=&quot;#000000&quot;&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;font face=&quot;Consolas&quot;&gt;&lt;font style=&quot;font-size: 9.5pt&quot; color=&quot;#000000&quot;&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;font color=&quot;#000000&quot; face=&quot;Consolas&quot;&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;Here I am passing the Control Id and the Postfix Id to generate auto ID.&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;That’s it now you are able to select auto generated multiple checkbox and mark them check.&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;&lt;/span&gt;&lt;/p&gt;  &lt;br /&gt;  &lt;br /&gt;  &lt;br /&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;Cheers… &lt;/span&gt;&lt;/p&gt;  &lt;p style=&quot;padding-bottom: 0px; line-height: normal; margin: 0in 0in 0pt&quot; class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: ; mso-fareast-font-family: &amp;#39;Times New Roman&amp;#39;&quot;&gt;Anand Tiwari….&lt;/span&gt;&lt;/p&gt;  </description><link>http://msdnw.blogspot.com/2013/05/generate-select-all-checkbox-control-in.html</link><author>noreply@blogger.com (Anand Mani Tiwari)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8EttIY77H7Pq3QuY-IQcQCn5SJzO84T5Bs8B_bOwBGGArjoY-mtX_rVjgyaYVdFnGN9PEppcsTafYvgzXsGrK3cZpuFB5BL13Mb0MhfIoFQPAYzat46cFqbd_o7hxe00xw3ShQLcpfpQ/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6570205941698119855.post-7076959200796882953</guid><pubDate>Thu, 25 Apr 2013 14:59:00 +0000</pubDate><atom:updated>2013-04-25T07:59:19.525-07:00</atom:updated><title>A Brand New Blogger Editor in BlogSpot.</title><description>&lt;p&gt;Wow a brand New Editor in Blogspot, I love the way Blogspot is giving flexibility to the blooger, by this blog Template Editor we can Edit HTML code very easily unlike in previous days it was a simple text editor but now with Line number and color code for each code it is quit easy to Modify as like .&lt;/p&gt;  &lt;p&gt;I love this change, thanks Google I love this Editor , guy’s have a look once, below is the Screen shot for Perusal:&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVgGL6f0R47XSunnfefJAkgPSE0rg8kdu986HIgYn08nMfnWzrFDfZ-g8tqKEMCIJWiF4vNhqYUBfRzgI9zRxHyW1QoUbFmIBU9mW_7UE7GLY7YSZk5kNRq2SDa3py8dqHR9JoS9LNrOo/s1600-h/image%25255B3%25255D.png&quot;&gt;&lt;img style=&quot;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&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyk__gXSRFxXkdlmNKYs0d7bd1xmgi760Vm4nQgFklVd-UcHVd2eUALJuxACusjdJ2jgQMUiHobpvMpj2jBK8q5UpGvfDocqSjfizKkFEFc1chkGZi6_3cpLzk5sK-xqQsXR9pQYF53SQ/?imgmax=800&quot; width=&quot;582&quot; height=&quot;218&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I am sure you too goanna like this.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Cheers…..&lt;/p&gt;  &lt;p&gt;Anand Tiwari &lt;/p&gt;  </description><link>http://msdnw.blogspot.com/2013/04/a-brand-new-blogger-editor-in-blogspot.html</link><author>noreply@blogger.com (Anand Mani Tiwari)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyk__gXSRFxXkdlmNKYs0d7bd1xmgi760Vm4nQgFklVd-UcHVd2eUALJuxACusjdJ2jgQMUiHobpvMpj2jBK8q5UpGvfDocqSjfizKkFEFc1chkGZi6_3cpLzk5sK-xqQsXR9pQYF53SQ/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6570205941698119855.post-7907851381290421673</guid><pubDate>Thu, 25 Apr 2013 14:47:00 +0000</pubDate><atom:updated>2013-04-25T07:47:40.558-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ASP.NET(C#)</category><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">JavaScript</category><category domain="http://www.blogger.com/atom/ns#">JQuery</category><category domain="http://www.blogger.com/atom/ns#">Web Application</category><category domain="http://www.blogger.com/atom/ns#">Web Technologies</category><title>Scroll Content of div tag like page scrolling.</title><description>&lt;p&gt;Hi guys today I have faced a requirement where I need to Scroll the content of one div to show all the content in it. Actually we had a Modal Popup which was displaying some sort of information based on link click by the user.&lt;/p&gt;  &lt;p&gt;When ever we are going to show another html (web page) in modal popup we are facing this type of challenge as there in modal popup if you are scrolling by mouse the Parent page will get started scrolling. And hence here our JavaScript is helping as to achieve this functionality.&amp;#160; &lt;/p&gt;  &lt;p&gt;Lets say you have a &lt;strong&gt;div &lt;/strong&gt;with lots of content (text and images or video) and your modal popup size is small to show them at once so in this case you need to do like below .&lt;/p&gt;  &lt;p&gt;Here I have used a html table control for Demo purpose you can as you like just we need is the id of the div control which we are going to scroll. Like here ‘&lt;strong&gt;’dvcontainer&lt;/strong&gt;” .&lt;/p&gt; &lt;code&gt;   &lt;pre class=&quot;code&quot;&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;table &lt;/span&gt;&lt;span style=&quot;color: red&quot;&gt;width&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;=&amp;quot;175px&amp;quot;&amp;gt;&lt;br /&gt;        &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;tr&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;br /&gt;            &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;td&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;br /&gt;                &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;div &lt;/span&gt;&lt;span style=&quot;color: red&quot;&gt;style&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;=&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: red&quot;&gt;position&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;: relative; &lt;/span&gt;&lt;span style=&quot;color: red&quot;&gt;width&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;: 175px; &lt;/span&gt;&lt;span style=&quot;color: red&quot;&gt;height&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;: 160px; &lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre class=&quot;code&quot;&gt;&lt;span style=&quot;color: blue&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: red&quot;&gt;border&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;: 1px solid black;&lt;br /&gt;                    &lt;/span&gt;&lt;span style=&quot;color: red&quot;&gt;overflow&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;: hidden&amp;quot;&amp;gt;&lt;br /&gt;                    &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;div &lt;/span&gt;&lt;span style=&quot;color: red&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;=&amp;quot;dvcontainer&amp;quot; &lt;/span&gt;&lt;span style=&quot;color: red&quot;&gt;style&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;=&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: red&quot;&gt;position&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;: absolute; &lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre class=&quot;code&quot;&gt;&lt;span style=&quot;color: blue&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: red&quot;&gt;width&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;: 170px; &lt;/span&gt;&lt;span style=&quot;color: red&quot;&gt;left&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;: 0; &lt;/span&gt;&lt;span style=&quot;color: red&quot;&gt;top&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;: 0&amp;quot;&amp;gt;&lt;br /&gt;                        &lt;/span&gt;&lt;span style=&quot;color: #006400&quot;&gt;&amp;lt;!--INSERT CONTENT HERE--&amp;gt;&lt;br /&gt;                        &lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;p&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;br /&gt;                            &lt;/span&gt;Anand Mani Tiwari holds an Engineering degree in &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre class=&quot;code&quot;&gt;Computer Science from BPUT and&lt;br /&gt;                            has previously worked at NCPL Inc. and now working &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre class=&quot;code&quot;&gt;at Orion Systems Integrators&lt;br /&gt;                            Inc for a Client which is worlds Biggest Auditing &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre class=&quot;code&quot;&gt;Company KPMG. He is a Software&lt;br /&gt;                            Engineer and working on different Microsoft &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre class=&quot;code&quot;&gt;Technologies like ASP.Net, WPF, Silverlight,&lt;br /&gt;                            WCF... He is a Microsoft Certified Professional. &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre class=&quot;code&quot;&gt;And recently Passed Microsoft Technology&lt;br /&gt;                            Specialist Exam in HTML 5 with a Excellent &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre class=&quot;code&quot;&gt;Score of 920/ 1000.&lt;br /&gt;                        &lt;span style=&quot;color: blue&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;p&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;br /&gt;                        &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;p&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;br /&gt;                            &lt;/span&gt;- &lt;span style=&quot;color: blue&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;a &lt;/span&gt;&lt;span style=&quot;color: red&quot;&gt;href&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;=&amp;quot;http://www.2bexpert.com/p/about-me.html&amp;quot;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre class=&quot;code&quot;&gt;&lt;span style=&quot;color: blue&quot;&gt;&lt;/span&gt;Click here to see his complete profile&lt;span style=&quot;color: blue&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;br /&gt;                        &amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;p&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;br /&gt;                        &lt;/span&gt;&lt;span style=&quot;color: #006400&quot;&gt;&amp;lt;!--END CONTENT--&amp;gt;&lt;br /&gt;                    &lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;br /&gt;                &amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;br /&gt;            &amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;td&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;br /&gt;            &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;td&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;br /&gt;                &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;a &lt;/span&gt;&lt;span style=&quot;color: red&quot;&gt;href&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;=&amp;quot;#&amp;quot; &lt;/span&gt;&lt;span style=&quot;color: red&quot;&gt;onmouseover&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;=&amp;quot;move(&#39;dvcontainer&#39;,1)&amp;quot; &lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre class=&quot;code&quot;&gt;&lt;span style=&quot;color: blue&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: red&quot;&gt;onmouseout&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;=&amp;quot;clearTimeout(move.to)&amp;quot;&amp;gt;&lt;br /&gt;                    &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;img &lt;/span&gt;&lt;span style=&quot;color: red&quot;&gt;alt&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;=&amp;quot;Page Up&amp;quot; &lt;/span&gt;&lt;span style=&quot;color: red&quot;&gt;src&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;=&amp;quot;images/up.gif&amp;quot; &lt;/span&gt;&lt;span style=&quot;color: red&quot;&gt;border&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;=&amp;quot;0&amp;quot;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;br /&gt;                &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;div &lt;/span&gt;&lt;span style=&quot;color: red&quot;&gt;style&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;=&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: red&quot;&gt;height&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;: 145px; &lt;/span&gt;&lt;span style=&quot;color: red&quot;&gt;display&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;: block; &lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre class=&quot;code&quot;&gt;&lt;span style=&quot;color: blue&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: red&quot;&gt;background&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;: url(images/);&amp;quot;&amp;gt;&lt;br /&gt;                &amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;div&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;br /&gt;                &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;a &lt;/span&gt;&lt;span style=&quot;color: red&quot;&gt;href&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;=&amp;quot;#&amp;quot; &lt;/span&gt;&lt;span style=&quot;color: red&quot;&gt;onmouseover&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;=&amp;quot;move(&#39;dvcontainer&#39;,-1)&amp;quot; &lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre class=&quot;code&quot;&gt;&lt;span style=&quot;color: blue&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: red&quot;&gt;onmouseout&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;=&amp;quot;clearTimeout(move.to)&amp;quot;&amp;gt;&lt;br /&gt;                    &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;img &lt;/span&gt;&lt;span style=&quot;color: red&quot;&gt;alt&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;=&amp;quot;Page Down&amp;quot; &lt;/span&gt;&lt;span style=&quot;color: red&quot;&gt;src&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;=&amp;quot;images/down.gif&amp;quot; &lt;/span&gt;&lt;span style=&quot;color: red&quot;&gt;border&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;=&amp;quot;0&amp;quot;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;br /&gt;            &amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;td&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;br /&gt;        &amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;tr&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;br /&gt;    &amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;table&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;After this we need to write the code for Scroll the “&lt;strong&gt;dvcontainer&lt;/strong&gt;” content. So here we go with JavaScript ….&lt;/p&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;  &lt;pre class=&quot;code&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: red&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;=&amp;quot;text/javascript&amp;quot; &lt;/span&gt;&lt;span style=&quot;color: red&quot;&gt;language&lt;/span&gt;&lt;span style=&quot;color: blue&quot;&gt;=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;        function &lt;/span&gt;move(id, spd) {&lt;br /&gt;            &lt;span style=&quot;color: blue&quot;&gt;var &lt;/span&gt;obj = document.getElementById(id), max = -obj.offsetHeight +&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre class=&quot;code&quot;&gt; obj.parentNode.offsetHeight, top = parseInt(obj.style.top);&lt;br /&gt;            &lt;span style=&quot;color: blue&quot;&gt;if &lt;/span&gt;((spd &amp;gt; 0 &amp;amp;&amp;amp; top &amp;lt;= 0) || (spd &amp;lt; 0 &amp;amp;&amp;amp; top &amp;gt;= max)) {&lt;br /&gt;                obj.style.top = top + spd + &lt;span style=&quot;color: maroon&quot;&gt;&amp;quot;px&amp;quot;&lt;/span&gt;;&lt;br /&gt;                move.to = setTimeout(&lt;span style=&quot;color: blue&quot;&gt;function &lt;/span&gt;() { move(id, spd); }, 20);&lt;br /&gt;            }&lt;br /&gt;            &lt;span style=&quot;color: blue&quot;&gt;else &lt;/span&gt;{&lt;br /&gt;                obj.style.top = (spd &amp;gt; 0 ? 0 : max) + &lt;span style=&quot;color: maroon&quot;&gt;&amp;quot;px&amp;quot;&lt;/span&gt;;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&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;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;That’s it now you can see the div content is getting scroll on mouse hover of Up and Down image.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Required Images for this demo : &lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4BaUeXs11P2BImnkssLawgj7dW2MTMXcvVcMhaw-mkuerxgD1CX1XhjYVna1Rqt8ZEV688Y_eQZdvhwXqGXDfFldULVTXkX_sg78XwmSC5iSszFGRKifk7QJ30L95exr4LjmD27XT698/s1600-h/up2.gif&quot;&gt;&lt;img style=&quot;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&quot; title=&quot;up&quot; border=&quot;0&quot; alt=&quot;up&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhi0F9TTo33QfJnQbjv9OwCFGW8wz569nj_7GRv1gla8pffX_pNVEHV4wTN3vMjlyvlLVwTA02zWpJI_lxKYeI2i2XeRx58N9BfRUgu_7EjpoRpB5NhIgPfxmIFHWTb3KSil8V_C3L3BaY/?imgmax=800&quot; width=&quot;9&quot; height=&quot;5&quot; /&gt;&lt;/a&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMzMPd5Ythofk3iha94VjvWlo7RQP4-ZtmDcrbp7zDK6ddmSAuXBGlEFf3fKpbDYTqhuZw68whPLvgjrgdEh55rZrz8cnxrtaLCR8XQ3R3YTZrknX6ueAgwKe86sRp_dha-GKD8bIWPRg/s1600-h/down2.gif&quot;&gt;&lt;img style=&quot;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&quot; title=&quot;down&quot; border=&quot;0&quot; alt=&quot;down&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRCrdv6psJMbYeadN3NXvAcaKCvXu9cyQKM0NhgP0CkhuplbluvKIyv8WWqbcZSXjILnEbEHiBy4-yi9ZxfVNR1YzCXu7AoYPD85TbLgqZPPEPtKDbGpmMlBny5q9ZNn_EXTNIxJV14IQ/?imgmax=800&quot; width=&quot;9&quot; height=&quot;5&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I hope this post has helped you, please comment. Thanks&lt;/p&gt;  </description><link>http://msdnw.blogspot.com/2013/04/scroll-content-of-div-tag-like-page.html</link><author>noreply@blogger.com (Anand Mani Tiwari)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhi0F9TTo33QfJnQbjv9OwCFGW8wz569nj_7GRv1gla8pffX_pNVEHV4wTN3vMjlyvlLVwTA02zWpJI_lxKYeI2i2XeRx58N9BfRUgu_7EjpoRpB5NhIgPfxmIFHWTb3KSil8V_C3L3BaY/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6570205941698119855.post-1486198525896999850</guid><pubDate>Thu, 25 Apr 2013 14:43:00 +0000</pubDate><atom:updated>2013-04-25T07:43:50.987-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ASP.NET(C#)</category><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">Web Application</category><category domain="http://www.blogger.com/atom/ns#">Web Technologies</category><title>Generate Thumbnail Image in ASP.Net by C# Class</title><description>&lt;p&gt;Hi Guys today I am going to show you how you can generate Thumbnail’s of any selected image dynamically by a C# class. This class is very handy in admin area development, where admin has to upload the images.&lt;/p&gt;  &lt;p&gt;By this class you can generate not only Thumbnail but the real resource will also get saved in Servers folder which is handy to show the related big image as well.&lt;/p&gt;  &lt;p&gt;We can use this Thumbnail Generator class by just calling the function GenerateThumbNail() and passing the required signatures (Parameters), we need to initiate the class first by Creating the instance first for that below is the code block:&lt;/p&gt; &lt;code&gt;&amp;#160; public Helper hlp { get; set; } &lt;/code&gt;  &lt;p&gt;Let say we are having a ASP FileUpload control and ASP Button control to select desired file and send the same to server for making thumbnail of selected image.&lt;/p&gt;  &lt;p&gt;Below is the *.aspx code:&lt;/p&gt; &lt;code&gt;   &lt;p&gt;&amp;lt;fieldset&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;legend&amp;gt;Thumbnail Generator&amp;lt;/legend&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;asp:FileUpload ID=&amp;quot;flUpload&amp;quot; runat=&amp;quot;server&amp;quot; /&amp;gt;&amp;lt;asp:Button ID=&amp;quot;btnUpload&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; runat=&amp;quot;server&amp;quot; Text=&amp;quot;Upload&amp;quot; onclick=&amp;quot;btnUpload_Click&amp;quot; /&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/fieldset&amp;gt;&lt;/p&gt; &lt;/code&gt;  &lt;p&gt;it will generate a html page like below:&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjt9iS4n5YUxvxMvHmBCbpMTtbLgLp35o3SZiJmzraMZI1sYycl5l5ih-TwmOu6QznZh3sbsFekf19PraBeDkGmhTj-y_16xIlXzgDO0MdHC5G2vtfzxIUurE7R0Znrwf0L62glTrH1Vjg/s1600-h/image2.png&quot;&gt;&lt;img style=&quot;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&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTw5iNrQx9e71DiqQ0s0puvm7pibi3kCiGGTHz0chbz8Ou0XYnkKoJ3oqee-k_ESd0kqc-8UUN-UXH7XAxdEygASZqD6wvuohbpaGXV04vkxhLkhuZj7SGASn8r4jpt_uPvOes9isAVGk/?imgmax=800&quot; width=&quot;244&quot; height=&quot;49&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now our Fileupload control having the Sorce file after selecting Image file from local Server (User Computer).&lt;/p&gt;  &lt;p&gt;On Upload Button Click by user below mentioned code required:&lt;/p&gt; &lt;code&gt;   &lt;p&gt;protected void btnUpload_Click(object sender, EventArgs e)      &lt;br /&gt;&amp;#160;&amp;#160; {       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; hlp = new Helper();       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; hlp.GenerateThumbNail(flUpload.PostedFile, &amp;quot;thumbFile&amp;quot;,300);       &lt;br /&gt;&amp;#160;&amp;#160; }&lt;/p&gt; &lt;/code&gt;  &lt;p&gt;Below is the required Class for Generating Thumbnail:&lt;/p&gt; &lt;code&gt;   &lt;p&gt;using System;      &lt;br /&gt;using System.Collections.Generic;       &lt;br /&gt;using System.Linq;       &lt;br /&gt;using System.Web;       &lt;br /&gt;using System.Drawing;       &lt;br /&gt;using System.Drawing.Drawing2D;&lt;/p&gt;    &lt;p&gt;/// &amp;lt;summary&amp;gt;      &lt;br /&gt;/// Summary description for Helper       &lt;br /&gt;/// &amp;lt;/summary&amp;gt;       &lt;br /&gt;public class Helper       &lt;br /&gt;{       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; public Helper()       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; //       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; // TODO: Add constructor logic here       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; //       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p&gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; public void GenerateThumbNail(HttpPostedFile srcFile,string thumbNailFolder,int width)       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; HttpPostedFile myFile = srcFile;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; string filename = srcFile.FileName;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; int oFileLength = myFile.ContentLength;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; if (oFileLength != 0)       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; int i = filename.LastIndexOf(&amp;quot;\\&amp;quot;);       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; filename = filename.Substring(i + 1);       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; filename = DateTime.Now.Hour + &amp;quot;-&amp;quot; + DateTime.Now.Minute + &amp;quot;-&amp;quot; + DateTime.Now.Second + &amp;quot;-&amp;quot; + filename;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; string thumb_filename = &amp;quot;thumb_&amp;quot;+DateTime.Now.Hour + &amp;quot;-&amp;quot; + DateTime.Now.Minute + &amp;quot;-&amp;quot; + DateTime.Now.Second + &amp;quot;-&amp;quot; + filename;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; byte[] myData = new Byte[oFileLength];       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; myFile.InputStream.Read(myData, 0, oFileLength);&lt;/p&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; System.IO.FileStream newFile      &lt;br /&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; = new System.IO.FileStream(HttpContext.Current.Server.MapPath(&amp;quot;~/images/&amp;quot;) + filename,       &lt;br /&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;&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;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; System.IO.FileMode.Create);       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; newFile.Write(myData, 0, myData.Length);       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; newFile.Close();&lt;/p&gt;    &lt;p&gt;&amp;#160;&lt;/p&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; System.Drawing.Image image =      &lt;br /&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; System.Drawing.Image.FromFile(newFile.Name);       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; int srcWidth = image.Width;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; int srcHeight = image.Height;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; int thumbWidth = width;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; int thumbHeight;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Bitmap bmp;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; if (srcHeight &amp;gt; srcWidth)       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {       &lt;br /&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; thumbHeight = (srcHeight / srcWidth) * thumbWidth;       &lt;br /&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; bmp = new Bitmap(thumbWidth, thumbHeight);       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; else       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {       &lt;br /&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; thumbHeight = thumbWidth;       &lt;br /&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; thumbWidth = (srcWidth / srcHeight) * thumbHeight;       &lt;br /&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; bmp = new Bitmap(thumbWidth, thumbHeight);       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&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; System.Drawing.Graphics gr = System.Drawing.Graphics.FromImage(bmp);      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; gr.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; gr.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; gr.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.High;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; System.Drawing.Rectangle rectDestination =       &lt;br /&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;&amp;#160;&amp;#160;&amp;#160; new System.Drawing.Rectangle(0, 0, thumbWidth, thumbHeight);       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; gr.DrawImage(image, rectDestination, 0, 0, srcWidth, srcHeight, GraphicsUnit.Pixel);       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; bmp.Save(HttpContext.Current.Server.MapPath(&amp;quot;~/&amp;quot;+thumbNailFolder + &amp;quot;/&amp;quot; + thumb_filename));       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; bmp.Dispose();       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; image.Dispose();       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }       &lt;br /&gt;}&lt;/p&gt; &lt;/code&gt;  &lt;p&gt;And that’s it, now be sure to make two folders in you solution (Project). One for original Picture Upload and another one for Thumbnail file.&lt;/p&gt;  &lt;p&gt;I am pasting Overall screen shot of Project which will help you :&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvPcTQPQGb142oMbN2q33EbALQrOddaGgEyaeWmqCgfLdmFwwDpgcfo2XUjQeguNC-bCAE3CmYaQbXePbDVDP0tfbpQ-JG-XaFvYwoVqc2rMb_zvYZlvLY4rux2fd9MyIwZBpzX4eUx5A/s1600-h/image8.png&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJnfil0BgH9Q3d3VgFoCNSMwebXA3pg9kOHZHd90kRSbbH4Q0w6JT32hviZIpNGoN0QKDBlUeJz8Y1zw_fpXhAYkPbHT7ToklVw-7qpCV-w_-rtINQ-qABzWHBO9BXpu48rWoSdxshqFw/?imgmax=800&quot; width=&quot;217&quot; height=&quot;216&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Cheers…..&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Regards,&lt;/p&gt;  &lt;p&gt;Anand Tiwari&lt;/p&gt;  </description><link>http://msdnw.blogspot.com/2013/04/generate-thumbnail-image-in-aspnet-by-c.html</link><author>noreply@blogger.com (Anand Mani Tiwari)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTw5iNrQx9e71DiqQ0s0puvm7pibi3kCiGGTHz0chbz8Ou0XYnkKoJ3oqee-k_ESd0kqc-8UUN-UXH7XAxdEygASZqD6wvuohbpaGXV04vkxhLkhuZj7SGASn8r4jpt_uPvOes9isAVGk/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6570205941698119855.post-7099244020215444523</guid><pubDate>Sun, 20 Nov 2011 17:34:00 +0000</pubDate><atom:updated>2011-11-20T09:37:17.485-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SilverLight</category><title>What is Application Library Caching</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Most of the time including this extra assembly in your XAP file would be fine.  There is an alternative though.  You can separated the Microsoft.Maps.MapControl assembly out and have the client’s browser cache it locally.  This is called “Application Library Caching”.  If the client already has a cached copy of the assembly it does not need to be downloaded again.  This would obviously decrease the amount of content that needs to be downloaded for the application to run.

To configure the Silverlight project to use library caching you right-click on the project in Solution Explorer and choose the “Properties” option.  This will open the properties tab for the project and then you check the box labeled “Reduce XAP size by using application library caching”, as shown in the following screen capture:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhd5Qg_yhwgYpwz7KVrjDgPa9WgjsGCfKkDkRhMvZWg4FmFJj1txNRJlA3jhBXaLPulBYmVQBKFOFfT-Y2kk7UXVw0cbdmPhIpfoD2NWZDx62C-1T4sZ4uC7_2DJd3NeCbJXrYIEPSNPS0/s1600/ApplicationLibraryCaching.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhd5Qg_yhwgYpwz7KVrjDgPa9WgjsGCfKkDkRhMvZWg4FmFJj1txNRJlA3jhBXaLPulBYmVQBKFOFfT-Y2kk7UXVw0cbdmPhIpfoD2NWZDx62C-1T4sZ4uC7_2DJd3NeCbJXrYIEPSNPS0/s1600/ApplicationLibraryCaching.jpg&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;
ClientBin folder is used to place the .XAP file of Silverlight application. You can keep this anywhere in your web application but this is the default that is used by the Silverlight.&lt;br /&gt;
The .XAP mime type is: &lt;strong&gt;application/x-silverlight&lt;/strong&gt; &lt;/div&gt;</description><link>http://msdnw.blogspot.com/2011/11/what-is-application-library-caching.html</link><author>noreply@blogger.com (Anand Mani Tiwari)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhd5Qg_yhwgYpwz7KVrjDgPa9WgjsGCfKkDkRhMvZWg4FmFJj1txNRJlA3jhBXaLPulBYmVQBKFOFfT-Y2kk7UXVw0cbdmPhIpfoD2NWZDx62C-1T4sZ4uC7_2DJd3NeCbJXrYIEPSNPS0/s72-c/ApplicationLibraryCaching.jpg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6570205941698119855.post-3926773435006105764</guid><pubDate>Sun, 20 Nov 2011 16:56:00 +0000</pubDate><atom:updated>2011-11-20T09:37:17.479-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SilverLight</category><title>AppManifest.xaml file?</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div&gt;
The AppManifest.xml file defines the assemblies that get deployed in the client application. This file is automatically updated when compiling your application.&lt;br /&gt;
Basic example:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;&amp;lt;deployment entrypointassembly=&quot;MySimpleSilverlight&quot; entrypointtype=&quot;MySimpleSilverlight.App&quot; runtimeversion=&quot;3.0.40624.0&quot; xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot; xmlns=&quot;http://schemas.microsoft.com/client/2007/deployment&quot;&amp;gt;
&amp;lt;deployment.parts&amp;gt;
&amp;lt;assemblypart source=&quot; MySimpleSilverlight.dll&quot; x:name=&quot;MySimpleSilverlight&quot;&amp;gt;
&amp;lt;assemblypart source=&quot;Microsoft.Maps.MapControl.Common.dll&quot; x:name=&quot;Microsoft.Maps.MapControl.Common&quot;&amp;gt;
&amp;lt;assemblypart source=&quot;Microsoft.Maps.MapControl.dll&quot; x:name=&quot;Microsoft.Maps.MapControl&quot;&amp;gt;
&amp;lt;/assemblypart&amp;gt;&amp;lt;/assemblypart&amp;gt;&amp;lt;/assemblypart&amp;gt;&amp;lt;/deployment.parts&amp;gt;
&amp;lt;/deployment&amp;gt;&lt;/pre&gt;
Based on the settings of a referenced assembly it is added to the Application manifest. For example, if you have an assembly that you are referencing in your application but do not wish to have it included into the. XAP file you can choose to set “Copy Local” to false. See the image below:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipP1F3ayrrnj40WcsAjhTjOVpenkOWTB8Adjfjk8iW4iueHfdsTwwKu5P8LI-ULryyw1kX0r7dkFnRV3dZHWl4HRBeLGW-UYVHeWAOkhyphenhyphenw6Zt6eV5bsjRnkhmOfxqBHDiviR_pH9TzLJE/s1600/VisualStudioSilverlightCopyAssembly_62BE73ED.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipP1F3ayrrnj40WcsAjhTjOVpenkOWTB8Adjfjk8iW4iueHfdsTwwKu5P8LI-ULryyw1kX0r7dkFnRV3dZHWl4HRBeLGW-UYVHeWAOkhyphenhyphenw6Zt6eV5bsjRnkhmOfxqBHDiviR_pH9TzLJE/s1600/VisualStudioSilverlightCopyAssembly_62BE73ED.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
In this example I’m referencing the &lt;b&gt;Microsoft.Maps.MapControl.Common&lt;/b&gt;
 assembly and chose not to have a local copied deployed with the .XAP. 
I’ll then need to add “on demand download of the assembly” when 
accessing it in my code. &lt;br /&gt;


This can be useful to have only your base assembly deployed and have 
an on demand download of subsequent assemblies on the fly so that your 
initial download time is minimal. When only a part of your application 
uses a specific assembly you may want to use this mechanism.&lt;/div&gt;
&lt;/div&gt;</description><link>http://msdnw.blogspot.com/2011/11/appmanifestxaml-file.html</link><author>noreply@blogger.com (Anand Mani Tiwari)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipP1F3ayrrnj40WcsAjhTjOVpenkOWTB8Adjfjk8iW4iueHfdsTwwKu5P8LI-ULryyw1kX0r7dkFnRV3dZHWl4HRBeLGW-UYVHeWAOkhyphenhyphenw6Zt6eV5bsjRnkhmOfxqBHDiviR_pH9TzLJE/s72-c/VisualStudioSilverlightCopyAssembly_62BE73ED.jpg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6570205941698119855.post-9081918187391130382</guid><pubDate>Sun, 20 Nov 2011 16:35:00 +0000</pubDate><atom:updated>2011-11-20T08:47:37.955-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SilverLight</category><title>What is XAP File?</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPFNZLCSxAUfsJt-k8cfaYg9XHNf4HSc8Hvo1Z09l2bDJKvyCowSbEFFdn3UO3iFTKQJTLk7RvJM2eyx-x9AQieKQZpXLdIyEuZdeowRcQhNP1orS2IQmpfmj6pQcKgcSBkzhbdZ4PfB4/s1600/silverlight.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;133&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPFNZLCSxAUfsJt-k8cfaYg9XHNf4HSc8Hvo1Z09l2bDJKvyCowSbEFFdn3UO3iFTKQJTLk7RvJM2eyx-x9AQieKQZpXLdIyEuZdeowRcQhNP1orS2IQmpfmj6pQcKgcSBkzhbdZ4PfB4/s200/silverlight.jpg&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
A XAP file (pronounced &quot;zap&quot;) is basically a compressed output file for 
the Silverlight application containing Silverlight solution components 
such as the compiled XAML and code-behind, an application manifest and 
possibly one or more assemblies delivering Silverlight controls.&lt;br /&gt;
When a Silverlight project is built in Visual Studio all of the files, 
XAML and .NET code, are compiled into a single DLL.&amp;nbsp; This DLL file is 
then compressed into a zip file that gets named with a .XAP extension 
rather than the traditional .ZIP.&amp;nbsp; In addition to XAML and code files, 
graphics and media files are compiled by default into the DLL assembly 
as well.&lt;br /&gt;
&quot;.XAP&quot; files use the standard .zip compression algorithm to minimize 
client download size. A &quot;hello world&quot; .NET Silverlight application 
(built using VB or C#) is about &lt;strong&gt;5KB&lt;/strong&gt; in size. The size of the file depends on the XAML files, assemblies used in Silverlight project.&lt;br /&gt;
&lt;br /&gt;
To view the contents of a .XAP file you can rename the extension of the 
.XAP file to .ZIP. Then view the .ZIP file using any standard .ZIP 
utility.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUNhN2KGfgWTVdIjWbBnR9yaVjysdcClC9oNghhq_AOREKEVoeN1DFHhuY1yFmR2QNwBeBq8tDd6cmPbBPSiG54PwgcYiqatIOiMKpbV1IpgSg7RZiVfg5xQk2Weg-ne_0MUEOOuwLkrM/s1600/WhatisXAPFile_101AE85C.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUNhN2KGfgWTVdIjWbBnR9yaVjysdcClC9oNghhq_AOREKEVoeN1DFHhuY1yFmR2QNwBeBq8tDd6cmPbBPSiG54PwgcYiqatIOiMKpbV1IpgSg7RZiVfg5xQk2Weg-ne_0MUEOOuwLkrM/s1600/WhatisXAPFile_101AE85C.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
A basic XAP file will have an assembly related to specific code for 
the application, an application manifest file and any additional 
assemblies need to run the application. At a minimum, two files are 
needed, the application manifest file and the application assembly.&lt;br /&gt;
  For example:&lt;br /&gt;
  &lt;ul&gt;
&lt;li&gt;AppManifest.xaml &lt;/li&gt;
&lt;li&gt;Demo1.dll &lt;/li&gt;
&lt;/ul&gt;
Here &lt;b&gt;Microsoft.Maps.MapControl.Common.dll&lt;/b&gt; and &lt;b&gt;Microsoft.Maps.MapControl.dll&lt;/b&gt; are two &lt;b&gt;external&lt;/b&gt;
 dlls used in the Silverlight application to show the Bing Map.External 
resources like images or other types of files can also be added to the 
.XAP file if you do embed them into your client DLL .&lt;br /&gt;
 &lt;/div&gt;</description><link>http://msdnw.blogspot.com/2011/11/what-is-xap-file.html</link><author>noreply@blogger.com (Anand Mani Tiwari)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPFNZLCSxAUfsJt-k8cfaYg9XHNf4HSc8Hvo1Z09l2bDJKvyCowSbEFFdn3UO3iFTKQJTLk7RvJM2eyx-x9AQieKQZpXLdIyEuZdeowRcQhNP1orS2IQmpfmj6pQcKgcSBkzhbdZ4PfB4/s72-c/silverlight.jpg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6570205941698119855.post-4264894372025984027</guid><pubDate>Mon, 27 Dec 2010 10:43:00 +0000</pubDate><atom:updated>2010-12-27T02:44:02.821-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SQL</category><title>What is Index?</title><description>An index is a physical structure containing pointers to the data. Indices are created in an existing table to locate rows more quickly and efficiently. It is possible to create an index on one or more columns of a table, and each index is given a name. The users cannot see the indexes; they are just used to speed up queries. Effective indexes are one of the best ways to improve performance in a database application. A table scan happens when there is no index available to help a query. In a table scan SQL Server examines every row in the table to satisfy the query results. Table scans are sometimes unavoidable, but on large tables, scans have a terrific impact on performance.</description><link>http://msdnw.blogspot.com/2010/12/what-is-index.html</link><author>noreply@blogger.com (Anand Mani Tiwari)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6570205941698119855.post-1296794278727874940</guid><pubDate>Mon, 27 Dec 2010 10:43:00 +0000</pubDate><atom:updated>2010-12-27T02:44:02.822-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SQL</category><title>What is View?</title><description>A simple view can be thought of as a subset of a table. It can be used for retrieving data, as well as updating or deleting rows. Rows updated or deleted in the view are updated or deleted in the table the view was created with. It should also be noted that as data in the original table changes, so does data in the view, as views are the way to look at part of the original table. The results of using a view are not permanently stored in the database. The data accessed through a view is actually constructed using standard T-SQL select command and can come from one to many different base tables or even other views.</description><link>http://msdnw.blogspot.com/2010/12/what-is-view.html</link><author>noreply@blogger.com (Anand Mani Tiwari)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6570205941698119855.post-275827526050155396</guid><pubDate>Mon, 27 Dec 2010 10:42:00 +0000</pubDate><atom:updated>2010-12-27T02:44:02.822-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SQL</category><title>What is Trigger?</title><description>A trigger is a SQL procedure that initiates an action when an event (INSERT, DELETE or UPDATE) occurs. Triggers are stored in and managed by the DBMS. Triggers are used to maintain the referential integrity of data by changing the data in a systematic fashion. A trigger cannot be called or executed; DBMS automatically fires the trigger as a result of a data modification to the associated table. Triggers can be viewed as similar to stored procedures in that both consist of procedural logic that is stored at the database level. Stored procedures, however, are not event-drive and are not attached to a specific table as triggers are. Stored procedures are explicitly executed by invoking a CALL to the procedure while triggers are implicitly executed. In addition, triggers can also execute stored procedures.&lt;br /&gt;
&lt;br /&gt;
Nested Trigger: A trigger can also contain INSERT, UPDATE and DELETE logic within itself, so when the trigger is fired because of data modification it can also cause another data modification, thereby firing another trigger. A trigger that contains data modification logic within itself is called a nested trigger.</description><link>http://msdnw.blogspot.com/2010/12/what-is-trigger.html</link><author>noreply@blogger.com (Anand Mani Tiwari)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6570205941698119855.post-179576731730605982</guid><pubDate>Mon, 27 Dec 2010 10:39:00 +0000</pubDate><atom:updated>2010-12-27T02:39:57.319-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SQL</category><title>What is Stored Procedure?</title><description>A stored procedure is a named group of SQL statements that have been previously created and stored in the server database. Stored procedures accept input parameters so that a single procedure can be used over the network by several clients using different input data. And when the procedure is modified, all clients automatically get the new version. Stored procedures reduce network traffic and improve performance. Stored procedures can be used to help ensure the integrity of the database.&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;e.g. sp_helpdb, sp_renamedb, sp_depends etc.&lt;/code&gt;</description><link>http://msdnw.blogspot.com/2010/12/what-is-stored-procedure.html</link><author>noreply@blogger.com (Anand Mani Tiwari)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6570205941698119855.post-8926439974995348422</guid><pubDate>Mon, 27 Dec 2010 10:19:00 +0000</pubDate><atom:updated>2010-12-27T02:19:33.051-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SQL</category><title>List All Tables of Database</title><description>&lt;code&gt;&lt;br /&gt;
USE YourDBName&lt;br /&gt;
GO&lt;br /&gt;
SELECT *&lt;br /&gt;
FROM sys.Tables&lt;br /&gt;
GO &lt;br /&gt;
&lt;/code&gt;</description><link>http://msdnw.blogspot.com/2010/12/list-all-tables-of-database.html</link><author>noreply@blogger.com (Anand Mani Tiwari)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6570205941698119855.post-3972821260522304049</guid><pubDate>Tue, 07 Dec 2010 06:06:00 +0000</pubDate><atom:updated>2010-12-15T22:47:54.009-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ASP.NET(C#)</category><category domain="http://www.blogger.com/atom/ns#">CSS</category><title>How to Add CSS dynamically to controls in C#, ASP.NET</title><description>&lt;b&gt;T&lt;/b&gt;o add style Dynamically just add this code snippet.&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;Control_ID.Style.Add(&quot;color&quot;,&quot;#FFFF99&quot;);
&lt;/pre&gt;As in the above example I had just given a example to change the font color dynamically. You can use another method to add the style to the control dynamically... Like&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;Control_ID.Attribute.Add(&quot;Style=&#39;color:#FFFF99;&#39;&quot;);
&lt;/pre&gt;</description><link>http://msdnw.blogspot.com/2010/12/how-to-add-css-dynamically-to-controls.html</link><author>noreply@blogger.com (Anand Mani Tiwari)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6570205941698119855.post-5647279110924356161</guid><pubDate>Mon, 06 Dec 2010 13:06:00 +0000</pubDate><atom:updated>2011-10-18T01:40:46.750-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ASP.NET(C#)</category><title>How to Encrypt and Decrypt the Query string automatically by C#, Asp.Net</title><description>Just Create a Businesslogic class in App_code folder with the name QueryStringModule.cs&lt;br /&gt;
and then add the below given code.&lt;br /&gt;
&lt;pre class=&quot;brush: js; ruler: true; first-line: 10; highlight: [2, 4, 6]&quot;&gt;using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Security.Cryptography;
using System.Text;
using System.IO;

/// &lt;summary&gt;
/// Summary description for QueryStringModule
/// &lt;/summary&gt;
public class QueryStringModule : IHttpModule
{
    /// &lt;summary&gt;  
    /// Summary description for QueryStringModule  
    /// &lt;/summary&gt;  
    
        //  private ILog m_Logger = LogManager.GetLogger(typeof(QueryStringModule));  
        #region IHttpModule Members

        public void Dispose()
        {
            // Nothing to dispose  
        }

        public void Init(HttpApplication context)
        {
            context.BeginRequest += new EventHandler(context_BeginRequest);
        }

        #endregion

        private const string PARAMETER_NAME = &quot;enc=&quot;;
        private const string ENCRYPTION_KEY = &quot;key&quot;;

        void context_BeginRequest(object sender, EventArgs e)
        {
            HttpContext context = HttpContext.Current;
            string query = string.Empty;
            string path = string.Empty;

            try
            {
                if (context.Request.Url.OriginalString.Contains(&quot;aspx&quot;) &amp;&amp; context.Request.RawUrl.Contains(&quot;?&quot;))
                {
                    query = ExtractQuery(context.Request.RawUrl);
                    path = GetVirtualPath();

                    if (query.StartsWith(PARAMETER_NAME, StringComparison.OrdinalIgnoreCase))
                    {
                        // Decrypts the query string and rewrites the path.  
                        string rawQuery = query.Replace(PARAMETER_NAME, string.Empty);
                        string decryptedQuery = Decrypt(rawQuery);
                        context.RewritePath(path, string.Empty, decryptedQuery);
                    }
                    else if (context.Request.HttpMethod == &quot;GET&quot;)
                    {
                        // Encrypt the query string and redirects to the encrypted URL.  
                        // Remove if you don&#39;t want all query strings to be encrypted automatically.  
                        string encryptedQuery = Encrypt(query);
                        context.Response.Redirect(path + encryptedQuery, false);
                    }
                }
            }
            catch (Exception ex)
            {
                // m_Logger.Error(&quot;An error occurred while parsing the query string in the URL: &quot; + path, ex);  
                context.Response.Redirect(&quot;~/Home.aspx&quot;);
            }

        }

        /// &lt;summary&gt;  
        /// Parses the current URL and extracts the virtual path without query string.  
        /// &lt;/summary&gt;  
        /// &lt;returns&gt;The virtual path of the current URL.&lt;/returns&gt;  
        private static string GetVirtualPath()
        {
            string path = HttpContext.Current.Request.RawUrl;
            path = path.Substring(0, path.IndexOf(&quot;?&quot;));
            path = path.Substring(path.LastIndexOf(&quot;/&quot;) + 1);
            return path;
        }

        /// &lt;summary&gt;  
        /// Parses a URL and returns the query string.  
        /// &lt;/summary&gt;  
        /// &lt;param name=&quot;url&quot;&gt;The URL to parse.&lt;/param&gt;/// &lt;returns&gt;The query string without the question mark.&lt;/returns&gt;  
        private static string ExtractQuery(string url)
        {
            int index = url.IndexOf(&quot;?&quot;) + 1;
            return url.Substring(index);
        }

        #region Encryption/decryption

        /// &lt;summary&gt;  
        /// The salt value used to strengthen the encryption.  
        /// &lt;/summary&gt;  
        private readonly static byte[] SALT = Encoding.ASCII.GetBytes(ENCRYPTION_KEY.Length.ToString());

        /// &lt;summary&gt;  
        /// Encrypts any string using the Rijndael algorithm.  
        /// &lt;/summary&gt;  
        /// &lt;param name=&quot;inputText&quot;&gt;The string to encrypt.&lt;/param&gt;/// &lt;returns&gt;A Base64 encrypted string.&lt;/returns&gt;  
        private static string Encrypt(string inputText)
        {
            RijndaelManaged rijndaelCipher = new RijndaelManaged();
            byte[] plainText = Encoding.Unicode.GetBytes(inputText);
            PasswordDeriveBytes SecretKey = new PasswordDeriveBytes(ENCRYPTION_KEY, SALT);

            using (ICryptoTransform encryptor = rijndaelCipher.CreateEncryptor(SecretKey.GetBytes(32), SecretKey.GetBytes(16)))
            {
                using (MemoryStream memoryStream = new MemoryStream())
                {
                    using (CryptoStream cryptoStream = new CryptoStream(memoryStream, encryptor, CryptoStreamMode.Write))
                    {
                        cryptoStream.Write(plainText, 0, plainText.Length);
                        cryptoStream.FlushFinalBlock();
                        return &quot;?&quot; + PARAMETER_NAME + Convert.ToBase64String(memoryStream.ToArray());
                    }
                }
            }
        }

        /// &lt;summary&gt;  
        /// Decrypts a previously encrypted string.  
        /// &lt;/summary&gt;  
        /// &lt;param name=&quot;inputText&quot;&gt;The encrypted string to decrypt.&lt;/param&gt;/// &lt;returns&gt;A decrypted string.&lt;/returns&gt;  
        private static string Decrypt(string inputText)
        {
            RijndaelManaged rijndaelCipher = new RijndaelManaged();

            byte[] encryptedData = Convert.FromBase64String(inputText);
            PasswordDeriveBytes secretKey = new PasswordDeriveBytes(ENCRYPTION_KEY, SALT);

            using (ICryptoTransform decryptor = rijndaelCipher.CreateDecryptor(secretKey.GetBytes(32), secretKey.GetBytes(16)))
            {
                using (MemoryStream memoryStream = new MemoryStream(encryptedData))
                {
                    using (CryptoStream cryptoStream = new CryptoStream(memoryStream, decryptor, CryptoStreamMode.Read))
                    {
                        byte[] plainText = new byte[encryptedData.Length];
                        int decryptedCount = cryptoStream.Read(plainText, 0, plainText.Length);
                        return Encoding.Unicode.GetString(plainText, 0, decryptedCount);
                    }
                }
            }
        }

        #endregion

    }

&lt;/pre&gt;&lt;br /&gt;
After then in web.config file add this code...&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;&lt;httpmodules&gt;
 &lt;add type=&quot;QueryStringModule&quot; name=&quot;QueryStringModule&quot;/&gt;
&lt;/httpModules&gt;
&lt;/pre&gt;&lt;br /&gt;
Thats it, now get the Querystring on any page in encripted manner,&lt;br /&gt;
For example:&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;LblQuery.Text=Request.QueryString[&quot;id&quot;].ToString();
&lt;/pre&gt;</description><link>http://msdnw.blogspot.com/2010/12/how-to-encrypt-and-decrypt-query-string.html</link><author>noreply@blogger.com (Anand Mani Tiwari)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6570205941698119855.post-3388966625381743876</guid><pubDate>Sat, 04 Dec 2010 04:52:00 +0000</pubDate><atom:updated>2010-12-15T22:49:10.828-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">JavaScript</category><title>Disable Right Click to secure your webpage by JavaScript, ASP.Net</title><description>&lt;pre class=&quot;brush: js&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt; 
&lt;!--
 
 
var message=&quot;Disabled&quot;;
 
///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}
 
function clickNS4(e){
if (document.layers||document.getElementById&amp;&amp;!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}
 
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&amp;&amp;!document.getElementById){
document.onmousedown=clickIE4;
}
 
document.oncontextmenu=new Function(&quot;alert(message);return false&quot;)
 
// --&gt; 
&lt;/script&gt; 

&lt;script type=&quot;text/javascript&quot;&gt; 
function disableSelection(target){
if (typeof target.onselectstart!=&quot;undefined&quot;) //For IE 
 target.onselectstart=function(){return false}
else if (typeof target.style.MozUserSelect!=&quot;undefined&quot;) //For Firefox
 target.style.MozUserSelect=&quot;none&quot;
else //All other route (For Opera)
 target.onmousedown=function(){return false}
target.style.cursor = &quot;default&quot;
}
 
&lt;/script&gt;
&lt;/pre&gt;</description><link>http://msdnw.blogspot.com/2010/12/disable-right-click-to-secure-your.html</link><author>noreply@blogger.com (Anand Mani Tiwari)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6570205941698119855.post-7633808413158674260</guid><pubDate>Sat, 04 Dec 2010 04:43:00 +0000</pubDate><atom:updated>2010-12-15T22:49:34.169-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SQL</category><title>Searching All columns in one table one by one for a particular data in SQL Server</title><description>&lt;pre class=&quot;brush: js&quot;&gt;SELECT 
        * 
FROM 
        testview
WHERE 
        Username like &#39;%&#39; + @search + &#39;%&#39; 
OR 
        Description like &#39;%&#39; + @search + &#39;%&#39; 
OR  
        Title like &#39;%&#39; + @search + &#39;%&#39;
&lt;/pre&gt;</description><link>http://msdnw.blogspot.com/2010/12/searching-all-columns-in-one-table-one.html</link><author>noreply@blogger.com (Anand Mani Tiwari)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6570205941698119855.post-7061708970362513419</guid><pubDate>Sat, 04 Dec 2010 04:36:00 +0000</pubDate><atom:updated>2010-12-15T22:49:50.156-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SQL</category><title>How to add two different columns data in one columns from SQL server and C#</title><description>By using LTRIM();&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;string commnd = &quot;select id,(LTRIM(FirstName)+&#39; &#39;+Ltrim(LastName)) as [Name],Date_of_Birth,Email_id,Phone_no,Postal_Address,imgURL from Candidate_Info where id=&quot; + id;&lt;/Pre&gt;&lt;br /&gt;
Thats all...</description><link>http://msdnw.blogspot.com/2010/12/how-to-add-two-different-columns-data.html</link><author>noreply@blogger.com (Anand Mani Tiwari)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6570205941698119855.post-2736520734083893372</guid><pubDate>Sat, 04 Dec 2010 04:32:00 +0000</pubDate><atom:updated>2010-12-15T22:50:10.050-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ASP.NET(C#)</category><title>How to make corp and thumbnail of any size of image in C#, ASP.NET</title><description>With out loosing clarity of the image you can get it by given two method, In my case I had to upload the image in the server and show them in the gallery...&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;protected void btnUpload_Click(object sender, EventArgs e)
{
// Initialize variables
string sSavePath;
string sThumbExtension;
int intThumbWidth;
int intThumbHeight;

// Set constant values

sSavePath = &quot;uploadedImages/&quot;;
sThumbExtension = &quot;_thumb&quot;;
intThumbWidth = 160;
intThumbHeight = 120;

// If file field is not empty

if (fileUploader.PostedFile != null)
{
// Check file size (must not be 0)

HttpPostedFile myFile = fileUploader.PostedFile;
int nFileLen = myFile.ContentLength;
if (nFileLen == 0)
{
lblOutput.Visible = true;
lblOutput.Text = &quot;No file was uploaded.&quot;;
return;
}

// Check file extension (must be JPG)

if (System.IO.Path.GetExtension(myFile.FileName).ToLower() != &quot;.jpg&quot;)
{
lblOutput.Visible = true;
lblOutput.Text = &quot;The file must have an extension of JPG&quot;;
return;
}

// Read file into a data stream

byte[] myData = new Byte[nFileLen];
myFile.InputStream.Read(myData, 0, nFileLen);

// Make sure a duplicate file does not exist.  If it does, keep on appending an 

// incremental numeric until it is unique

string sFilename = System.IO.Path.GetFileName(myFile.FileName);

int file_append = 0;
while (System.IO.File.Exists(Server.MapPath(sSavePath + sFilename)))
{
file_append++;
sFilename = System.IO.Path.GetFileNameWithoutExtension(myFile.FileName)
+ file_append.ToString() + &quot;.jpg&quot;;
}

// Save the stream to disk

System.IO.FileStream newFile
= new System.IO.FileStream(Server.MapPath(sSavePath + sFilename),
System.IO.FileMode.Create);
newFile.Write(myData, 0, myData.Length);
newFile.Close();

// Check whether the file is really a JPEG by opening it

System.Drawing.Image.GetThumbnailImageAbort myCallBack =
new System.Drawing.Image.GetThumbnailImageAbort(ThumbnailCallback);
Bitmap myBitmap;
try
{
myBitmap = new Bitmap(Server.MapPath(sSavePath + sFilename));

// If jpg file is a jpeg, create a thumbnail filename that is unique.

file_append = 0;
string sThumbFile = System.IO.Path.GetFileNameWithoutExtension(myFile.FileName)
+ sThumbExtension + &quot;.jpg&quot;;
while (System.IO.File.Exists(Server.MapPath(sSavePath + sThumbFile)))
{
file_append++;
sThumbFile = System.IO.Path.GetFileNameWithoutExtension(myFile.FileName) +
file_append.ToString() + sThumbExtension + &quot;.jpg&quot;;
}

// Save thumbnail and output it onto the webpage

System.Drawing.Image myThumbnail
= myBitmap.GetThumbnailImage(intThumbWidth,
intThumbHeight, myCallBack, IntPtr.Zero);
myThumbnail.Save(Server.MapPath(sSavePath + sThumbFile));
filename = sThumbFile;
imgUser.ImageUrl = sSavePath + sThumbFile;
fileURL = sSavePath + sThumbFile;
// Displaying success information
lblOutput.Visible = true;
lblOutput.Text = &quot;File uploaded successfully!&quot;;

// Destroy objects

myThumbnail.Dispose();
myBitmap.Dispose();
}
catch (ArgumentException errArgument)
{
// The file wasn&#39;t a valid jpg file
lblOutput.Visible = true;
lblOutput.Text = &quot;The file wasn&#39;t a valid jpg file.&quot;;
System.IO.File.Delete(Server.MapPath(sSavePath + sFilename));
}
}

}
&lt;/pre&gt;&lt;br /&gt;
Next...&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;public bool ThumbnailCallback()
{
return false;
}
&lt;/pre&gt;&lt;br /&gt;
Thats all...</description><link>http://msdnw.blogspot.com/2010/12/how-to-make-corp-and-thumbnail-of-any.html</link><author>noreply@blogger.com (Anand Mani Tiwari)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6570205941698119855.post-3941965671386681356</guid><pubDate>Sat, 27 Nov 2010 06:22:00 +0000</pubDate><atom:updated>2010-12-15T22:50:46.083-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ASP.NET(C#)</category><category domain="http://www.blogger.com/atom/ns#">C#</category><title>How to Read and Get Data From XML Document in C#</title><description>By this Method we can easily get Data from XML Database. For this first of all create a &quot;ContactsList.xml&quot; XML file and under root section add your recoreds.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;public void GetData()
{
try
{
string path = &quot;ContactsList.xml&quot;;
FileStream fs = new FileStream path,FileMode.Open,FileAccess.Read, FileShare.ReadWrite);
DataSet ds = new DataSet();
ds.ReadXml(fs);
if (ds.Tables.Count != 0)
{
DataTable dt = ds.Tables[0];

int a = dt.Rows.Count;

for (int i = 0; i &lt; a; i++)
{
string[] str1 = new string[4];
str1[0] = dt.Rows[i].ItemArray[0].ToString();


str1[1] = dt.Rows[i].ItemArray[1].ToString();
str1[2] = dt.Rows[i].ItemArray[2].ToString();
int count = Convert.ToInt32(dt.Rows[i].ItemArray[7].ToString());
if (count.Equals(1) || count.Equals(0))
{
str1[3] = dt.Rows[i].ItemArray[3].ToString();
ListViewItem item1 = new ListViewItem(str1);
ldtvw_Contact.Items.Add(item1);
}
else
{
string interests = dt.Rows[i].ItemArray[3].ToString() + &quot;,&quot; + dt.Rows[i].ItemArray[4].ToString() + &quot;,&quot; + dt.Rows[i].ItemArray[5].ToString() + &quot;,&quot; + dt.Rows[i].ItemArray[6].ToString();
str1[3] = interests;
ListViewItem item1 = new ListViewItem(str1);
ldtvw_Contact.Items.Add(item1);
}

}

fs.Close();
}
&lt;/pre&gt;
&lt;br /&gt;
Thats All....</description><link>http://msdnw.blogspot.com/2010/11/how-to-read-and-get-data-from-xml.html</link><author>noreply@blogger.com (Anand Mani Tiwari)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6570205941698119855.post-586544733513578579</guid><pubDate>Fri, 26 Nov 2010 05:29:00 +0000</pubDate><atom:updated>2010-12-15T22:50:46.084-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ASP.NET(C#)</category><title>How to Generate Random String in C#, ASP.NET</title><description>To Generate a Random String is very Tricky and useful stuff to Know as we can use this functionality at the time of Generating Random Password automatically for each User Registering on the website.&lt;br /&gt;
&lt;br /&gt;
I am sure this will help you a lot, here I am writing the Method to Generate the Random String.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;private string RandomString(int size, bool lowerCase)
    {
        StringBuilder builder = new StringBuilder();
        Random random = new Random();
        char ch;
        for (int i = 0; i &lt; size; i++)
        {
            ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65)));
            builder.Append(ch);
        }
        if (lowerCase)
            return builder.ToString().ToLower();
        return builder.ToString();
    }
&lt;/pre&gt;

Now the above code will generate the Random String. If you want to have a Strong Password then password must contains Number.
So lets go to generate Random Numbers:

&lt;pre class=&quot;brush: js&quot;&gt;public string GetRandomNumber()
    {
        StringBuilder strbuild = new StringBuilder();
        strbuild.Append(RandomNumber(1000, 9999));
        return strbuild.ToString();
    }

private int RandomNumber(int min, int max)
    {
        Random random = new Random();
        return random.Next(min, max);
    }

&lt;/pre&gt;
Now you are ready to generate a random password. for that you have to call these methods as given below:

&lt;pre class=&quot;brush: js&quot;&gt;public string GetPassword()
    {
        StringBuilder builder = new StringBuilder();
        builder.Append(RandomString(4, true));
        builder.Append(RandomNumber(1000, 9999));
        builder.Append(RandomString(2, false));
        return builder.ToString();
    }
&lt;/pre&gt;&lt;br /&gt;
That&#39;s All, Please give your comments if the post is helpful.</description><link>http://msdnw.blogspot.com/2010/11/how-to-generate-random-string-in-c.html</link><author>noreply@blogger.com (Anand Mani Tiwari)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6570205941698119855.post-1938623870085375822</guid><pubDate>Mon, 22 Nov 2010 05:49:00 +0000</pubDate><atom:updated>2010-12-15T22:51:14.463-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ASP.NET(C#)</category><title>Freeze GridView Header While Scrolling</title><description>This is very common problem in Web development that we need to freeze the GridView header at the time of scrolling, Here is one simple tips:&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;Step 1 : Create a CSS class as following&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;&amp;lt;br /&amp;gt;.HeaderFreez &amp;lt;br /&amp;gt;{ &amp;lt;br /&amp;gt;position:relative ; &amp;lt;br /&amp;gt;top:expression(this.offsetParent.scrollTop); &amp;lt;br /&amp;gt;z-index: 10; &amp;lt;br /&amp;gt;} &amp;lt;br /&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
Step 2 Set Gridview’s HeaderStyle CssClass as follows&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;CssClass=&quot;HeaderFreez&quot;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;That’s all guys ...&lt;/div&gt;</description><link>http://msdnw.blogspot.com/2010/11/freeze-gridview-header-while-scrolling.html</link><author>noreply@blogger.com (Anand Mani Tiwari)</author><thr:total>4</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6570205941698119855.post-8380493806291405413</guid><pubDate>Mon, 22 Nov 2010 05:47:00 +0000</pubDate><atom:updated>2010-12-15T22:51:34.154-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tips</category><title>How to Save Valuable Code section in your Visual Toolbox</title><description>Very&amp;nbsp;useful&amp;nbsp;for re-Usability of the code...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Step 1: Very Simple Just Copy the Code section and Drop on the Toolbox.&lt;br /&gt;
thats it...&lt;br /&gt;
&lt;br /&gt;
If you wanna give your unique Identification to the code than Give a Name to that by Right clicking and Renaming that.</description><link>http://msdnw.blogspot.com/2010/11/how-to-save-valuable-code-section-in.html</link><author>noreply@blogger.com (Anand Mani Tiwari)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6570205941698119855.post-1512769377756449041</guid><pubDate>Mon, 22 Nov 2010 05:35:00 +0000</pubDate><atom:updated>2010-12-15T22:52:14.018-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ASP.NET(C#)</category><category domain="http://www.blogger.com/atom/ns#">SQL</category><title>Connection Pooling</title><description>&lt;div class=&quot;MsoNormal&quot;&gt;Creating and establishing a connection with a database server is a high resource consuming process and hence by result more time taking. &lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;If any application needs to fire any query against any database server, we need to first establish a connection with the server and then execute the query against that database server.&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;So why we will again and again open and close the connection of Database, for that only connection pooling came in feature.&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;When the first time ADO.Net is stabilizing connection with the database and connection open with the respective credentials the ADO. Net&amp;nbsp; is &amp;nbsp;saving the references for the that connection and while closing the connection ADO.Net is not closing total connection and when another request done for the Database action ADO.Net using that references for the Database process so no Hassel for opening and closing connection again and again, and process is more faster .&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Sample Connection String with Connection Pooling…..&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;initial catalog=Northwind; Data Source=localhost; Connection Timeout=30;
User Id=USER; Password=PASS; Min Pool Size=20; Max Pool Size=200;
 Incr Pool Size=10; Decr Pool Size=5;
&lt;/pre&gt;</description><link>http://msdnw.blogspot.com/2010/11/connection-pooling.html</link><author>noreply@blogger.com (Anand Mani Tiwari)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6570205941698119855.post-8306775849141136247</guid><pubDate>Mon, 22 Nov 2010 04:48:00 +0000</pubDate><atom:updated>2010-12-15T22:52:51.141-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">WindowsApp(C#)</category><title>Delegates:</title><description>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif;&quot;&gt;A delegate is a type-safe object that can point to another method (or possibly multiple methods) in the application, which can be invoked at later time.&lt;/span&gt;</description><link>http://msdnw.blogspot.com/2010/11/delegates.html</link><author>noreply@blogger.com (Anand Mani Tiwari)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6570205941698119855.post-3435493230825821409</guid><pubDate>Mon, 22 Nov 2010 04:47:00 +0000</pubDate><atom:updated>2010-12-15T22:52:02.029-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ASP.NET(C#)</category><title>What Is A Web Service?</title><description>&lt;b&gt;A&lt;/b&gt; Web Service is a program that can be invoked in a distributed web envi ronment. Web Service technologies like SOAP, WSDL, and UDDI are standards to describe, publish, discover, and use Web Services; they define a development model &amp;nbsp;for integrating applications over the web.&lt;br /&gt;
&lt;br /&gt;
Steps to Create a Web Service&lt;br /&gt;
&lt;br /&gt;
1. &amp;nbsp;Create (or use an existing) virtual directory for any folder on your computer.&lt;br /&gt;
2. &amp;nbsp;Create an empty file called “test.asmx” in the folder.&lt;br /&gt;
3. &amp;nbsp;Edit the file and add the &amp;nbsp;following text:&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;&amp;lt;%@ WebService Language=&quot;C#&quot; Class=&quot;MyMath&quot; %&amp;gt;
using System.Web.Services;
public class MyMath
{
&amp;nbsp;&amp;nbsp; &amp;nbsp;[WebMethod]
&amp;nbsp;&amp;nbsp; &amp;nbsp;public int Add(int num1, int num2)
&amp;nbsp;&amp;nbsp; &amp;nbsp;{
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return num1+num2;
&amp;nbsp;&amp;nbsp; &amp;nbsp;}
}&lt;/pre&gt;</description><link>http://msdnw.blogspot.com/2010/11/what-is-web-service.html</link><author>noreply@blogger.com (Anand Mani Tiwari)</author><thr:total>1</thr:total></item></channel></rss>