<?xml version="1.0" encoding="UTF-8" standalone="no"?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0"><channel><title>ASP.Net and Sharepoint Blog</title><description></description><managingEditor>noreply@blogger.com (Mohammed Al-Shafei)</managingEditor><pubDate>Tue, 13 Oct 2026 12:37:46 +0300</pubDate><generator>Blogger http://www.blogger.com</generator><openSearch:totalResults xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">12</openSearch:totalResults><openSearch:startIndex xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">1</openSearch:startIndex><openSearch:itemsPerPage xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">25</openSearch:itemsPerPage><link>http://myaspxblog.blogspot.com/</link><language>en-us</language><itunes:explicit>no</itunes:explicit><itunes:subtitle/><itunes:owner><itunes:email>noreply@blogger.com</itunes:email></itunes:owner><item><title>Maintain Scroll Position after Asynchronous Postback</title><link>http://myaspxblog.blogspot.com/2012/01/maintain-scroll-position-after.html</link><category>AJAX.NET</category><author>noreply@blogger.com (Mohammed Al-Shafei)</author><pubDate>Tue, 10 Jan 2012 15:10:00 +0300</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4023432817833503434.post-7865472333328199161</guid><description>&lt;br /&gt;
&lt;h4 class="BlogPostHeader" style="background-color: white; color: #333333; font-family: Arial, Helvetica; font-size: 20px; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;


&lt;/h4&gt;
&lt;h4 class="BlogPostHeader" style="background-color: white; color: #333333; font-family: Arial, Helvetica; font-size: 20px; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;


&lt;/h4&gt;
&lt;h4 class="BlogPostHeader" style="background-color: white; color: #333333; font-family: Arial, Helvetica; font-size: 20px; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;


&amp;nbsp;&lt;/h4&gt;
&lt;div&gt;
&lt;span style="background-color: white; color: #333333; font-family: Arial, Helvetica; font-size: 14px;"&gt;Do you want to maintain the scroll position&amp;nbsp;of&amp;nbsp;a GridView, Div, Panel, or whatever that is&amp;nbsp;inside of an UpdatePanel after an asynchronous postback?&lt;/span&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style="background-color: white; color: #333333; font-family: Arial, Helvetica; font-size: 14px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="color: #333333; font-family: Arial, Helvetica;"&gt;&lt;span style="font-size: 14px;"&gt;&lt;b&gt;Click &lt;/b&gt;&lt;a href="http://weblogs.asp.net/andrewfrederick/archive/2008/03/27/handling-multiple-asynchronous-postbacks.aspx" target="_blank"&gt;&lt;b&gt;here&lt;/b&gt;&amp;nbsp;&lt;/a&gt;&amp;nbsp;to found the solution&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #333333; font-family: Arial, Helvetica;"&gt;&lt;span style="font-size: 14px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #333333; font-family: Arial, Helvetica;"&gt;&lt;span style="font-size: 14px;"&gt;Thanks to Mr. &lt;a href="http://weblogs.asp.net/andrewfrederick/default.aspx" target="_blank"&gt;&amp;nbsp;Andrew Frederick&lt;/a&gt;, for his solution&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #333333; font-family: Arial, Helvetica;"&gt;&lt;span style="font-size: 14px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #333333; font-family: Arial, Helvetica;"&gt;&lt;span style="font-size: 14px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #333333; font-family: Arial, Helvetica;"&gt;&lt;span style="font-size: 14px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #333333; font-family: Arial, Helvetica;"&gt;&lt;span style="font-size: 14px;"&gt;Thanks,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: #333333; font-family: Arial, Helvetica;"&gt;&lt;span style="font-size: 14px;"&gt;Mohammad AlShafei&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="color: #333333; font-family: Arial, Helvetica;"&gt;&lt;span style="font-size: 14px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="background-color: white; color: #333333; font-family: Arial, Helvetica; font-size: 14px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>My First Android Application</title><link>http://myaspxblog.blogspot.com/2011/11/my-first-android-application.html</link><category>Android Development</category><category>Java Eclipse</category><author>noreply@blogger.com (Mohammed Al-Shafei)</author><pubDate>Fri, 18 Nov 2011 17:54:00 +0300</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4023432817833503434.post-548025044813985076</guid><description>&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Recently I have&amp;nbsp;finished&amp;nbsp;development of my first android application and I have published to market, you can download it from here&amp;nbsp;&lt;a href="https://market.android.com/details?id=com.shafei.updatestatus" target="_blank"&gt;Update Facebook / Twiiter Status&lt;/a&gt;, it was a&amp;nbsp;great&amp;nbsp;experience. the purpose of this post is to give you the&amp;nbsp;prerequisites to start developing your first android application:&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;b&gt;1. Integrated Development&amp;nbsp;Environment&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;most posts on internet is&amp;nbsp;recommend to use &lt;b&gt;Eclipse&lt;/b&gt;, you can download it from &lt;a href="http://www.eclipse.org/downloads/" target="_blank"&gt;here&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="background-color: white; line-height: 16px;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;The "&lt;b&gt;Eclipse Classic&lt;/b&gt;" version is &lt;b&gt;recommended&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;b&gt;2. Installing the SDK&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; line-height: 1.3em; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;The &lt;b&gt;SDK starter &lt;/b&gt;package is &lt;b&gt;not &lt;/b&gt;a full development environment—it includes only the core SDK Tools, which you can use to download the rest of the SDK components (such as the latest Android platform).&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp;get the latest version of the &lt;b&gt;SDK starter package &lt;/b&gt;from &lt;/span&gt;&lt;a href="http://developer.android.com/sdk/index.html" style="font-family: Verdana, sans-serif;" target="_blank"&gt;HERE&lt;/a&gt;&lt;/div&gt;
&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; line-height: 1.3em; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;b&gt;3.Installing the ADT Plugin for Eclipse&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; line-height: 1.3em; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;ADT &lt;/b&gt;is a plugin for the &lt;b&gt;Eclipse IDE&lt;/b&gt;, to install &lt;b&gt;ADT &lt;/b&gt;follow the below steps:&lt;/span&gt;&lt;/div&gt;
&lt;div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;/div&gt;
&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;a&lt;/b&gt;. Start &lt;b&gt;Eclipse&lt;/b&gt;, then select &lt;b&gt;Help &lt;/b&gt;&amp;gt; &lt;b&gt;Install New Software&lt;/b&gt;....&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;b. &lt;/b&gt;Click &lt;b&gt;Add&lt;/b&gt;, in the top-right corner.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;c&lt;/b&gt;. In the &lt;b&gt;Add Repository dialog &lt;/b&gt;that appears, enter "&lt;b&gt;ADT Plugin&lt;/b&gt;" for the &lt;b&gt;Name &lt;/b&gt;and the following &lt;b&gt;URL &lt;/b&gt;for the Location:&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="background-color: #cccccc; line-height: 16px;"&gt;&lt;i&gt;http://dl-ssl.google.com/android/eclipse/&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;d&lt;/b&gt;. Click &lt;b&gt;OK&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;b&gt;4.&amp;nbsp;&amp;nbsp;Adding Platforms and Other Components&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="background-color: white; line-height: 16px;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;The last step in setting up your SDK is using the &lt;b&gt;Android SDK &lt;/b&gt;and &lt;b&gt;AVD Manager &lt;/b&gt;(a tool included in the SDK starter package) to download essential SDK components into your development environment.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; line-height: 1.3em; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;You can launch the &lt;b&gt;Android SDK &lt;/b&gt;and &lt;b&gt;AVD Manager&amp;nbsp;&lt;/b&gt;From within &lt;b&gt;Eclipse&lt;/b&gt;, select&amp;nbsp;&lt;b&gt;Window &lt;/b&gt;&amp;gt; &lt;b&gt;Android SDK and AVD Manager&lt;/b&gt;.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; line-height: 1.3em; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;a.&lt;/b&gt; In the &lt;b&gt;Android SDK&lt;/b&gt; &lt;b&gt;and AVD Manager&lt;/b&gt;, choose&amp;nbsp;&lt;b&gt;Available Packages&amp;nbsp;&lt;/b&gt;in the &lt;b&gt;left panel&lt;/b&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; line-height: 1.3em; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;b&gt;&amp;nbsp; &amp;nbsp; b.&lt;/b&gt; In the right panel, expand the &lt;b&gt;Android Repository &lt;/b&gt;list to display the components available for installation.&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; line-height: 1.3em; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&amp;nbsp; c.&lt;/b&gt; Select &lt;b&gt;at least one platform &lt;/b&gt;to install, and click&amp;nbsp;&lt;b&gt;Install&lt;/b&gt; &lt;b&gt;Selected&lt;/b&gt;. If you aren't sure which platform to install, &lt;b&gt;use the latest version&lt;/b&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;5. Create an Android&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;Virtual Device&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;&amp;nbsp;(AVD)&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;b&gt;AVD &lt;/b&gt;is an optional step you can ignore it and debug and run your application directly to your android phone,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; line-height: 16px;"&gt;but creating &lt;b&gt;AVD &lt;/b&gt;is &amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;recommended&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;/div&gt;
&lt;div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; line-height: 1.3em; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;To create an &lt;b&gt;AVD&lt;/b&gt;:&lt;/span&gt;&lt;/div&gt;
&lt;div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; line-height: 1.3em; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;a. In &lt;b&gt;Eclipse&lt;/b&gt;, select&amp;nbsp;&lt;b&gt;Window &lt;/b&gt;&amp;gt; &lt;b&gt;Android SDK and AVD&lt;/b&gt; &lt;b&gt;Manager&lt;/b&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; line-height: 1.3em; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;b. Select&amp;nbsp;&lt;b&gt;Virtual Devices&amp;nbsp;&lt;/b&gt;in the &lt;b&gt;left panel&lt;/b&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; line-height: 1.3em; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;c. Click&amp;nbsp;&lt;b&gt;New&lt;/b&gt;....&lt;/span&gt;&lt;/div&gt;
&lt;div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; line-height: 1.3em; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;d. The&amp;nbsp;&lt;b&gt;Create &lt;/b&gt;New AVD&amp;nbsp;dialog appears.&lt;/span&gt;&lt;/div&gt;
&lt;div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; line-height: 1.3em; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;e. Type the name of the AVD, such as "my_avd".&lt;/span&gt;&lt;/div&gt;
&lt;div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; line-height: 1.3em; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;f. Choose a &lt;b&gt;target&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; line-height: 1.3em; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;The target is the platform (that is, the version of the Android SDK, such as 2.3.3) you want to run on the emulator. For this tutorial, choose the latest platform that you have installed and ignore the rest of the fields&lt;/span&gt;&lt;/div&gt;
&lt;div style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; line-height: 1.3em; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; g. Click&amp;nbsp;Create &lt;b&gt;AVD&lt;/b&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;Now we have finished the preparing of android development&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;environment&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;now&amp;nbsp;open&amp;nbsp;eclipse and selec&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;t&amp;nbsp;&lt;/span&gt;&lt;span style="line-height: 16px;"&gt;&lt;b&gt;File &lt;/b&gt;&amp;gt; &lt;b&gt;New&lt;/b&gt; &amp;gt; &lt;b&gt;Project&lt;/b&gt;...&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;That is All&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;I hope this&amp;nbsp;article&amp;nbsp;helps you to start develop your first android application&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;b&gt;The main reference in this post:&lt;/b&gt;&lt;br /&gt;
&lt;a href="http://developer.android.com/resources/tutorials/hello-world.html"&gt;http://developer.android.com/resources/tutorials/hello-world.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="color: #444444; font-family: Verdana; line-height: 18px;"&gt;Thanks,&lt;/span&gt;&lt;br /&gt;
&lt;b style="color: #444444; font-family: Verdana; line-height: 18px;"&gt;Mohammed AlShafe'i&lt;/b&gt;&lt;/div&gt;
&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total></item><item><title>How to show the Filter Toolbar always on for DataView</title><link>http://myaspxblog.blogspot.com/2010/04/how-to-show-filter-toolbar-always-on.html</link><category>Sharepoint 2007</category><author>noreply@blogger.com (Mohammed Al-Shafei)</author><pubDate>Mon, 12 Apr 2010 11:59:00 +0300</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4023432817833503434.post-4168675554751410048</guid><description>&lt;table style="font-family: Verdana; font-size: 13px;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Sometimes we need to customize  DataView Webparts (DVWP) in the Sharepoint Designer. there are to many cases, one of these cases is always showing the Filter Toolbar. to do this:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;1. Go to the &amp;lt;xsl:template name=&amp;quot;dvt_1.toolbar&amp;quot;&amp;gt; template&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;2. at the end of this template you find a if statment&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="background-color: #999999; font-family: Georgia; font-size: 12px; font-weight: bold; width: 100%;"&gt;&amp;lt;xsl:if test=&amp;quot;$dvt_adhocmode = 'filter'&amp;quot; ddwrt:cf_ignore=&amp;quot;1&amp;quot;&amp;gt; &amp;lt;/xsl:if&amp;gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;delete this statement and that is all&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;br /&gt;
Thanks,&lt;br /&gt;
&lt;b&gt;Mohammed AlShafe'i&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Ajax second postback not working in Sharepoint in UpdatePanel</title><link>http://myaspxblog.blogspot.com/2010/02/ajax-second-postback-not-working-in.html</link><category>AJAX.NET</category><category>Sharepoint 2007</category><author>noreply@blogger.com (Mohammed Al-Shafei)</author><pubDate>Tue, 23 Feb 2010 09:50:00 +0300</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4023432817833503434.post-6125163761058205106</guid><description>&lt;table style="font-family: Verdana; font-size: 13px;"&gt;&lt;tbody&gt;
&lt;tr&gt;                 &lt;td&gt;We have one problem in work, we spend with that a day without any solution, all we found cause some another problem. This is what help us when the page is not making second postback in update panel when the first postback is fired by element in UpdatePanel and refresh only update panels on the page.&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt;                 &lt;td&gt;&lt;br /&gt;
Taken from&amp;nbsp;&lt;a href="http://sharepoint.microsoft.com/blogs/mike/Lists/Posts/Post.aspx?ID=3"&gt;Mike Ammerlaan's Blog&lt;/a&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt;                 &lt;td&gt;&lt;br /&gt;
Windows SharePoint Services JavaScript has a “form onSubmit wrapper” which is used to override the default form action.  This work is put in place to ensure that certain types of URLs, which may contain double byte characters, will fully work across most postback and asynchronous callback scenarios.  However, if your scenarios do not involve double byte character URLs, you may successful disable this workaround and gain the ability to use ASP.NET AJAX UpdatePanels.&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;br /&gt;
To do this, you may need to register a client startup script which disables this workaround, in addition to resetting the default form action:&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td style="background-color: #999999; font-family: Georgia; font-size: 12px; font-weight: bold; width: 100%;"&gt;&lt;br /&gt;
&amp;lt;script type='text/javascript'&amp;gt;  &lt;br /&gt;
_spOriginalFormAction = document.forms[0].action;  &lt;br /&gt;
_spSuppressFormOnSubmitWrapper=true;  &lt;br /&gt;
&amp;lt;/script&amp;gt; &lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;br /&gt;
This script may be directly embedded in the page, or could be emitted by a control that uses the UpdatePanel. The following is an example of a very simple method which will fix this issue:&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td style="background-color: #999999; font-family: Georgia; font-size: 12px; font-weight: bold; width: 100%;"&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Private Sub EnsureUpdatePanelFixups()&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;If Me.Page.Form IsNot Nothing Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim formOnSubmitAtt As String = Me.Page.Form.Attributes("onsubmit")&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;If formOnSubmitAtt = "return _spFormOnSubmitWrapper();" Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Me.Page.Form.Attributes("onsubmit") = "_spFormOnSubmitWrapper();"&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ScriptManager.RegisterStartupScript(Me, GetType(UpdatePanel), "UpdatePanelFixup", "_spOriginalFormAction = document.forms[0].action; _spSuppressFormOnSubmitWrapper=true;", True)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;End Sub&lt;br /&gt;
&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;br /&gt;
Thanks,&lt;br /&gt;
&lt;b&gt;Mohammed AlShafe'i&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>adding users to sharepoint group  programmatically</title><link>http://myaspxblog.blogspot.com/2010/02/adding-users-to-sharepoint.html</link><category>Sharepoint 2007</category><author>noreply@blogger.com (Mohammed Al-Shafei)</author><pubDate>Wed, 10 Feb 2010 09:45:00 +0300</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4023432817833503434.post-5830543120739875826</guid><description>&lt;table style="font-family: Verdana; font-size: 13px;"&gt;&lt;tbody&gt;
&lt;tr&gt;                 &lt;td&gt;&lt;br /&gt;
When I was working on form authunticated portal site in sharepoint 2007, I need&lt;br /&gt;
to add users to sharepoint group&amp;nbsp;programmatically, all what we need is the following:&lt;/td&gt;             &lt;/tr&gt;
&lt;tr&gt;                 &lt;td style="background-color: #999999; font-family: Georgia; font-size: 12px; font-weight: bold; width: 100%;"&gt;&lt;br /&gt;
Dim membershipUser As MembershipUser&lt;br /&gt;
Dim membershipStatus As MembershipCreateStatus&lt;br /&gt;
membershipUser = Membership.CreateUser( pUsername, pPassword, pEmail, pSecurityQuestion,&lt;br /&gt;
pSecurityAnswer, True,membershipStatus)&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;' after creating user, call &amp;nbsp;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;_addUserToGroup&lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;() method using&lt;i&gt; SPSecurity.RunWithElevatedPrivileges(AddressOf&lt;/i&gt;&amp;nbsp;&amp;nbsp;&lt;i&gt;)&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
SPSecurity.RunWithElevatedPrivileges(AddressOf _addUserToGroup)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Private Sub _addUserToGroup()&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim site As New SPSite("http://localhost:1200")&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim web As SPWeb = site.OpenWeb()&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim spUser As SPUser&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;web.AllowUnsafeUpdates = True&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; ' call&amp;nbsp;EnsureUser method and pass user name with&amp;nbsp;Membership Provider Name&amp;nbsp;&lt;/span&gt;&amp;nbsp;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;like the following row&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;spUser = web.EnsureUser("AspNetSqlMembershipProvider:" + txtUsername.Text)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;web.SiteGroups("myCustomGroupName").AddUser(spUser)&lt;br /&gt;
End Sub&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &lt;/td&gt;             &lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Thats all&lt;/td&gt;             &lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Thanks,&lt;br /&gt;
&lt;b&gt;Mohammad AlShafe'i&lt;/b&gt; &lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt;     &lt;/table&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Error: A file or folder name contains an invalid character</title><link>http://myaspxblog.blogspot.com/2010/01/error-file-or-folder-name-contains.html</link><category>Sharepoint 2007</category><author>noreply@blogger.com (Mohammed Al-Shafei)</author><pubDate>Thu, 7 Jan 2010 14:23:00 +0300</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4023432817833503434.post-405767360134692101</guid><description>&lt;table style="font-family: Verdana; font-size: 13px;"&gt;&lt;tbody&gt;
&lt;tr&gt; &lt;td&gt;When I was trying to deploy a ListDefinition using CTP release of VSeWSS 1.3 for Visual Studio 2008, I got the following error:&lt;br /&gt;
&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td style="background-color: #999999; font-family: Georgia; font-size: 12px; font-weight: bold; width: 100%;"&gt;&amp;nbsp;A file or folder name contains an invalid character&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;br /&gt;
This message means: One or more file contains invalid character, but all my soultion files are not contain any invalid character, so after I search I found the &lt;b&gt;Name &lt;/b&gt;of ListDefinition contains an invalid character on &lt;b&gt;ListDefinition.xml&lt;/b&gt; file, to solve this error just remove this character&lt;br /&gt;
&lt;/td&gt;&lt;td&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td&gt;&lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;br /&gt;
&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlhTzzNrqrHZY-9Y0BoHoIqjlMQryaXl-X5-aZTHtliI41WvOoqVnbwTCr6K3EAG8d1iiHRE1wspV-THjyk8V8MZcClSJxsoeUO-ePSAeUGmg2Vt7T8xf9reJMpxDbHJrP2tfNn2fhdiw/s320/sss.jpg" /&gt;&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;br /&gt;
&lt;b&gt;Note:&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Special character are not allowed in the value of &lt;b&gt;Name&lt;/b&gt; in the &lt;b&gt;ListTemplete&lt;/b&gt; inside the XML File &lt;u&gt;because&lt;/u&gt; when the user trying to deploy the solution. The system will &lt;b&gt;generate a folder &lt;/b&gt;with this value, and you know &lt;u&gt;the speacial characters are not allowed in folder or file name &lt;/u&gt;&lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Thanks,&lt;br /&gt;
&lt;b&gt;Mohammad AlShafe'i&lt;/b&gt; &lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlhTzzNrqrHZY-9Y0BoHoIqjlMQryaXl-X5-aZTHtliI41WvOoqVnbwTCr6K3EAG8d1iiHRE1wspV-THjyk8V8MZcClSJxsoeUO-ePSAeUGmg2Vt7T8xf9reJMpxDbHJrP2tfNn2fhdiw/s72-c/sss.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total></item><item><title>ERROR: Unable to load one or more of the requested types</title><link>http://myaspxblog.blogspot.com/2010/01/error-unable-to-load-one-or-more-of.html</link><category>Sharepoint 2007</category><author>noreply@blogger.com (Mohammed Al-Shafei)</author><pubDate>Thu, 7 Jan 2010 13:20:00 +0300</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4023432817833503434.post-7118766898128671693</guid><description>&lt;table style="font-family: Verdana; font-size: 13px;"&gt;&lt;tbody&gt;
&lt;tr&gt; &lt;td&gt;When I was trying to deploy a web part using CTP release of VSeWSS 1.3 for Visual Studio 2008, I got the following error:&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td style="background-color: #999999; font-family: Georgia; font-size: 12px; font-weight: bold; width: 100%;"&gt;VSeWSS Service Error: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;br /&gt;
&lt;b&gt;The solution:&lt;/b&gt;&lt;br /&gt;
I've found the following steps solving this error, here are the steps:&lt;br /&gt;
&lt;b&gt;1. &lt;/b&gt;Add the All referenced assemblies to the GAC&lt;br /&gt;
&lt;b&gt;2. &lt;/b&gt;Restart IIS &lt;br /&gt;
&lt;b&gt;3. &lt;/b&gt;Clean the project in Visual Studio&lt;br /&gt;
&lt;b&gt;4. &lt;/b&gt;Redeploy your solution again, Then everything will work.&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;br /&gt;
Thanks,&lt;br /&gt;
&lt;b&gt;Mohammad AlShafe'i&lt;/b&gt; &lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Calling an External Page into ModelPopup from GridView</title><link>http://myaspxblog.blogspot.com/2009/12/callin-external-page-into-modelpopup.html</link><category>AJAX.NET</category><category>ASP.NET</category><author>noreply@blogger.com (Mohammed Al-Shafei)</author><pubDate>Thu, 31 Dec 2009 13:36:00 +0300</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4023432817833503434.post-5040313848903205478</guid><description>&lt;table style="font-family: Verdana; font-size: 13px;"&gt;&lt;tbody&gt;
&lt;tr&gt; &lt;td&gt;In this post the ModalPopup extender is used to pop open an external ASPX page inside GridView,&lt;br /&gt;
Here are the steps:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;br /&gt;
&lt;b&gt;1:&lt;/b&gt; Create new &lt;b&gt;ASPX page&lt;/b&gt; and add The following controls // call this page &lt;i&gt;MyPage.aspx&lt;/i&gt;&lt;br /&gt;
&lt;b&gt;a:-&lt;/b&gt; &lt;i&gt;GridView&lt;/i&gt;&lt;b&gt; &lt;/b&gt;to handle data // call is &lt;i&gt;GridView1&lt;/i&gt;&lt;br /&gt;
&lt;b&gt;b:-&lt;/b&gt; &lt;i&gt;Panel&lt;/i&gt; to open the external page inside it // call it &lt;i&gt;pnlEdit&lt;/i&gt;&lt;br /&gt;
&lt;b&gt;c:-&lt;/b&gt; &lt;i&gt;LinkButton&lt;/i&gt; in &lt;u&gt;&lt;i&gt;GridView&lt;/i&gt; &lt;/u&gt;to Open The &lt;i&gt;ModelPoup &lt;/i&gt;// call it &lt;i&gt;lnkEdit&lt;/i&gt;&lt;br /&gt;
&lt;b&gt;d:-&lt;/b&gt; &lt;i&gt;ModalPopupExtender&lt;/i&gt; to popup the Panel  // call it &lt;i&gt;MPEEditPopup&lt;/i&gt;&lt;br /&gt;
&lt;b&gt;e:-&lt;/b&gt; &lt;i&gt;Iframe&lt;/i&gt; to open the external page and make it as server control // call it ifrEditPopup&lt;br /&gt;
&lt;b&gt;f:-&lt;/b&gt; HIDDEN &lt;i&gt;LinkButton&lt;/i&gt; to virtualy open the popup // call it &lt;i&gt;lnkHidden&lt;/i&gt;&lt;br /&gt;
&lt;b&gt;g:- &lt;/b&gt;DONT FORGET to add &lt;b&gt;ScriptManger &lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
Look to the following code which contains all controls we need&lt;br /&gt;
&lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td style="background-color: #999999; font-family: Georgia; font-size: 11px; width: 100%;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;MyPage.aspx&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;asp:ScriptManager ID="ScriptManager1" runat="server"&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/asp:ScriptManager&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; onrowcommand="GridView1_RowCommand"&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Columns&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;asp:BoundField DataField="ID" HeaderText="ID" /&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;asp:BoundField DataField="Description" HeaderText="Description" /&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;asp:TemplateField HeaderText="Edit"&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ItemTemplate&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;asp:LinkButton ID="lnkEdit" CommandName="OpenEditPopup" runat="server"&amp;gt;Edit&amp;lt;/asp:LinkButton&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/ItemTemplate&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/asp:TemplateField&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Columns&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/asp:GridView&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;asp:Panel Style="display: none" CssClass="modalPopup" ID="pnlDetail" runat="server"&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;table cellpadding="0" cellspacing="0"&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td align="right"&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;asp:Button Text="Close Popup" ID="btnClose" runat="server"&amp;nbsp; /&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;iframe id="ifrEditPopup" runat="server" scrolling="no" width="250px" height="140px"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; frameborder="no"&amp;gt;&amp;lt;/iframe&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/asp:Panel&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ajaxToolkit:ModalPopupExtender ID="MPEEditPopup" runat="server" TargetControlID="lnkHidden"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PopupControlID="pnlDetail" CancelControlID="btnClose" BackgroundCssClass="modalBackground"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DropShadow="false" /&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;asp:LinkButton ID="lnkHidden" Style="visibility: hidden" runat="server"&amp;gt;Hidden&amp;lt;/asp:LinkButton&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;br /&gt;
The page design will be like this:&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfY1wdlMkhrcUdsISi5U0qqhWb6WbCOovexWDJ8Pcph4wdH2HCzi-Bmj0aDzM3_DuV7oMtCK0O42CQveSjf_QEyn-qfdLRZd6UbnyHdjJRYqj5z-zAfDchyphenhyphenNcb1ioZPsq3gscB9bm5aS0/s1600-h/1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfY1wdlMkhrcUdsISi5U0qqhWb6WbCOovexWDJ8Pcph4wdH2HCzi-Bmj0aDzM3_DuV7oMtCK0O42CQveSjf_QEyn-qfdLRZd6UbnyHdjJRYqj5z-zAfDchyphenhyphenNcb1ioZPsq3gscB9bm5aS0/s320/1.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;b&gt;2:-&lt;/b&gt; In code-behind add the following code to fill grid with data&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td style="background-color: #999999; font-family: Georgia; padding-left: 10px; width: 100%;"&gt;&lt;b&gt;MyPage.aspx.cs&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;
{&lt;br /&gt;
if (!IsPostBack)&lt;br /&gt;
{&lt;br /&gt;
GridView1.DataSource = LoadDataFromDB(); // This function will retrive data from DB to fill grid;&lt;br /&gt;
GridView1.DataBind();&lt;br /&gt;
}&lt;br /&gt;
// to reset the src attributes for IFrame control&lt;br /&gt;
ifrEditPopup.Attributes["src"] = "";&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;br /&gt;
&lt;b&gt;3:-&lt;/b&gt;Create New Page and call it &lt;b&gt;EditPage.aspx&lt;/b&gt; and write anything in this page e.g: This is EDIT Page&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;br /&gt;
&lt;b&gt;4:-&lt;/b&gt;In code-behind for The first page add &lt;b&gt;OnRowCommand&lt;/b&gt; event to write the code to open the popup, look to the following code&lt;br /&gt;
&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td style="background-color: #999999; font-family: Georgia; padding-left: 10px; width: 100%;"&gt;&lt;b&gt;MyPage.aspx.cs&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)&lt;br /&gt;
{&lt;br /&gt;
if (e.CommandName == "OpenEditPopup")&lt;br /&gt;
{&lt;br /&gt;
// for IFrame control add new &lt;b&gt;src&lt;/b&gt; as new attribute and give it the path for EditPage.aspx&lt;br /&gt;
// what is &lt;b&gt;t&lt;/b&gt; ??? I've added Ticks as Query String just to avoid cookie problem when trying to open the popup again&lt;br /&gt;
ifrEditPopup.Attributes.Add("src", "EditPage.aspx?t=" + DateTime.Now.Ticks);&lt;br /&gt;
// call Show method to open the popup&lt;br /&gt;
MPEEditPopup.Show();&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;br /&gt;
&lt;b&gt;5:-&lt;/b&gt; now run the project, the result will be like this:&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMqQMHemrwofbjyxeiu1AHwauaLVN-91aGOE_mcYQz3EZw5ooPTnPJi0CsY7SMvq0UgRmXcf-YlDBubfaR300MIGQTNkkv0zwFyL2Q-Gnc_fg8pv31OONm-zFrCO9HAgX2Ct_lyEMykxw/s1600-h/2.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMqQMHemrwofbjyxeiu1AHwauaLVN-91aGOE_mcYQz3EZw5ooPTnPJi0CsY7SMvq0UgRmXcf-YlDBubfaR300MIGQTNkkv0zwFyL2Q-Gnc_fg8pv31OONm-zFrCO9HAgX2Ct_lyEMykxw/s320/2.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;u&gt;&lt;b&gt;NOTE&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; we left the &lt;b&gt;src &lt;/b&gt;attribute for &lt;b&gt;IFrame &lt;/b&gt;control &lt;b&gt;empty&lt;/b&gt;, to &lt;b&gt;avoid &lt;/b&gt;loading &lt;b&gt;EditPage.aspx&lt;/b&gt; &lt;u&gt;more than one time &lt;/u&gt;when loading &lt;b&gt;MyPage.aspx&lt;/b&gt;, &lt;b&gt;e.g&lt;/b&gt;: if the GridView contains &lt;b&gt;10 &lt;/b&gt;rows then the system will create &lt;b&gt;10 &lt;/b&gt;Iframe controls and for each control the system will call the EditPage, therefore the best solution is to leave the &lt;b&gt;src &lt;/b&gt;attribute balnk and fill it with the URL in &lt;b&gt;OnRowCommand&lt;/b&gt; event when the user Click on Edit link&lt;br /&gt;
&lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Thanks,&lt;br /&gt;
&lt;b&gt;&lt;a href="http://www.blogger.com/profile/16961878360595982273" style="color: black;"&gt;Mohammad Al-Shafei&lt;/a&gt;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/td&gt;  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfY1wdlMkhrcUdsISi5U0qqhWb6WbCOovexWDJ8Pcph4wdH2HCzi-Bmj0aDzM3_DuV7oMtCK0O42CQveSjf_QEyn-qfdLRZd6UbnyHdjJRYqj5z-zAfDchyphenhyphenNcb1ioZPsq3gscB9bm5aS0/s72-c/1.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Failed to load expression host assembly error in a SharePoint web part</title><link>http://myaspxblog.blogspot.com/2009/12/failed-to-load-expression-host-assembly.html</link><category>Sharepoint 2007</category><author>noreply@blogger.com (Mohammed Al-Shafei)</author><pubDate>Tue, 29 Dec 2009 14:08:00 +0300</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4023432817833503434.post-7477551806284935137</guid><description>&lt;table style="font-family: Verdana; font-size: 13px; padding-left: 10px;"&gt;&lt;tbody&gt;
&lt;tr&gt; &lt;td&gt;&lt;br /&gt;
I was writing a custom Reporting local report(Microsoft Report rdlc) and everything is working fine,but when I placed it in a SharePoint Web Part, I got this error:&lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="background-color: #999999; font-size: 12px; font-family: Georgia; font-weight: bold; padding-left: 10px; width: 100%;"&gt;&lt;br /&gt;
Failed to load expression host assembly. Details: Could not load file or assembly 'expression_host_31f4d73d84764f4b9a7332f3673bdf0b, Version=10.8.30729.1, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Failed to grant permission to execute. (Exception from HRESULT: 0x80131418)&lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;br /&gt;
This was fixed by setting the &lt;b&gt;ExecuteReportInCurrentAppDomain &lt;/b&gt;property like so:&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt;&lt;td style="background-color: #999999; font-family: Georgia; padding-left: 2px; width: 100%;"&gt;reportViewer1.LocalReport.ExecuteReportInCurrentAppDomain&lt;br /&gt;
(System.Reflection.Assembly.GetExecutingAssembly().Evidence);&lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
&lt;b&gt;Mohammed AlShafei&lt;/b&gt;&lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Converting Web User Control to Web Part in Sharepoint 2007</title><link>http://myaspxblog.blogspot.com/2009/12/converting-web-user-control-to-web-part.html</link><category>Sharepoint 2007</category><author>noreply@blogger.com (Mohammed Al-Shafei)</author><pubDate>Sun, 27 Dec 2009 13:55:00 +0300</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4023432817833503434.post-8634812857318045666</guid><description>&lt;table style="font-family: Verdana; font-size: 13px; padding-left: 10px;"&gt;&lt;tbody&gt;
&lt;tr&gt; &lt;td&gt;&lt;br /&gt;
Many of web part have complex design, of-course we can create this web part by using code-behind code. In other words, creating the controls dynamically, Take a look at this sample web part:&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td style="background-color: #999999; font-family: Georgia; padding-left: 10px; width: 100%;"&gt;&lt;br /&gt;
Protected Overloads Overrides Sub CreateChildControls()&lt;br /&gt;
MyBase.CreateChildControls()&lt;br /&gt;
&lt;br /&gt;
Dim btnShowMessage As New Button()&lt;br /&gt;
btnShowMessage.Text = "show Message"&lt;br /&gt;
&lt;br /&gt;
AddHandler btnShowMessage.Click, AddressOf btnShowMessage_Click&lt;br /&gt;
Me.Controls.Add(btnShowMessage)&lt;br /&gt;
End Sub&lt;br /&gt;
&lt;br /&gt;
Private Sub btnShowMessage_Click(ByVal sender As Object, ByVal e As EventArgs)&lt;br /&gt;
Dim lbl1 As New Label()&lt;br /&gt;
lbl1.Text = "Hello Guest"&lt;br /&gt;
&lt;br /&gt;
Me.Controls.Add(lbl1)&lt;br /&gt;
End Sub&lt;br /&gt;
&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;br /&gt;
so if we want to create complex web part (&lt;i&gt;I mean web part contains many controls&lt;/i&gt;) this way will take a lot of time and efforts, so I found another way to create a simple or complex web part, after researching, anyway here are the steps:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;1)&lt;/b&gt; Create your Web User Control. You have the option on how you create it, but in my part, I create it using ASP.NET 2.0 IDE. What I usually did is I create a blank page, then I add a new item which is Web User Control. Take note to uncheck the option which separate your code in a separate file.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;2)&lt;/b&gt; Design your Web User Control (ascx), from its physical design to its logic coding.&lt;br /&gt;
&lt;b&gt;3)&lt;/b&gt; compile the solution&lt;br /&gt;
&lt;b&gt;4) &lt;/b&gt;drag and drop the solution DLL in&lt;b&gt; \windows\assembly&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;5) &lt;/b&gt;browse the &lt;b&gt;DLL &lt;/b&gt;inside the &lt;b&gt;assembly &lt;/b&gt;folder the right click and select &lt;b&gt;properties&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;6) &lt;/b&gt;Copy the Public Key Token its look like&lt;b&gt; &lt;i&gt;e3dc1ba93544f2e9&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;7) &lt;/i&gt;&lt;/b&gt;open &lt;b&gt;ascx &lt;/b&gt;file and insert the following line at the end of &lt;b&gt;Inherits &lt;/b&gt;property.&lt;br /&gt;
&lt;b&gt;&amp;nbsp; , NameSpace, Version=1.0.0.0, Culture=neutral, PublicKeyToken=&lt;/b&gt;&lt;b&gt;&lt;i&gt;e3dc1ba93544f2e9&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;8)&lt;/b&gt; now after pasting the code the new page register tage will be like this&lt;b&gt;&lt;i&gt; &lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b style="background-color: #cccccc;"&gt;&amp;lt;%@ Control Language="vb" AutoEventWireup="false" CodeBehind="MyUserControl.ascx.vb"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Inherits="MyTestSolution.MyUserControl, MyTestSolution, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e3dc1ba93544f2e9" %&amp;gt;&lt;/b&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;3)&lt;/b&gt; Copy the &lt;b&gt;modified ascx &lt;/b&gt;file to this directory:&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c:\inetpub\wwwroot\wss\VirtualDirectories\2222\wpresources&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &lt;u&gt;Where&lt;/u&gt;: &lt;b&gt;2222&lt;/b&gt;: the number of port that your site using&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;wpresources&lt;/b&gt;: you can use any other folder.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;4)&lt;/b&gt; Write the following code for adding your web user control file in your .vb file:&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td style="background-color: #999999; font-family: Georgia; padding-left: 10px; width: 100%;"&gt;&lt;br /&gt;
Protected Overrides Sub CreateChildControls()&lt;br /&gt;
&lt;br /&gt;
MyBase.CreateChildControls()&lt;br /&gt;
dim objUserControl as Control&lt;br /&gt;
objUserControl= Page.LoadControl("~/wpresources/MyUserControl.ascx")&lt;br /&gt;
Me.Controls.Add(objUserControl)&lt;br /&gt;
End Sub&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;br /&gt;
&lt;br /&gt;
With Speacial Thanks to &lt;a href="http://www.blogger.com/profile/17348151060027242776" target="_blank"&gt;Mr. Moutasem Al-awa&lt;/a&gt; for his assistance&lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total></item><item><title>How to change the maximum upload file size in ASP.NET</title><link>http://myaspxblog.blogspot.com/2009/12/how-to-change-maximum-upload-file-size.html</link><category>ASP.NET</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Fri, 25 Dec 2009 19:12:00 +0300</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4023432817833503434.post-7327306064545217126</guid><description>&lt;table style="font-family: Verdana; font-size: 13px; padding-left: 10px;"&gt;&lt;tbody&gt;&lt;tr&gt; &lt;td&gt;&lt;br /&gt;In many Application we need to increase the maximum upload file size in ASP.NET,&lt;br /&gt;to do this just Insert &lt;br /&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #cc0000;"&gt;httpRuntime &lt;/span&gt;&lt;span style="color: red;"&gt;maxRequestLength&lt;/span&gt;="&lt;span style="color: blue;"&gt;XXXX&lt;/span&gt;"  &lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt; within&lt;br /&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #cc0000;"&gt;system.web&lt;/span&gt;&lt;span style="color: purple;"&gt;&amp;gt;&lt;/span&gt; and &lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #cc0000;"&gt;system.web&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;&lt;br /&gt;where &lt;span style="color: blue;"&gt;XXXX &lt;/span&gt;is the file size in KB e.g: &lt;span style="color: red;"&gt;1024 KB = 1 MB   &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The &lt;span style="color: red;"&gt;default &lt;/span&gt;is &lt;span style="color: red;"&gt;4096 &lt;/span&gt;(&lt;span style="color: red;"&gt;= 4 MB&lt;/span&gt;). &lt;br /&gt;and here is a sample:&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td style="background-color: #999999; border: solid 1px #0000; font-family: Georgia; padding-left: 10px; width: 100%;"&gt;&lt;span style="color: blue; font-family: Verdana;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #cc0000;"&gt;system.web&lt;/span&gt;&lt;span style="color: purple;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="font-family: Verdana;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #cc0000;"&gt;httpRuntime&amp;nbsp;&lt;/span&gt;&lt;span style="color: red;"&gt;maxRequestLength&lt;/span&gt;="&lt;span style="color: blue;"&gt;10240&lt;/span&gt;"&amp;nbsp;&lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #cc0000;"&gt;system.web&lt;/span&gt;&lt;span style="color: purple;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: purple; font-family: Verdana;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Thanks,&lt;/b&gt;&lt;br /&gt;&lt;/td&gt;   &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Storing and Retrieving Files from SQL Database Using ASP.NET 2.0</title><link>http://myaspxblog.blogspot.com/2009/12/storing-and-retrieving-files-from-sql.html</link><category>ASP.NET</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Tue, 22 Dec 2009 16:22:00 +0300</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-4023432817833503434.post-5247605436908353260</guid><description>&lt;table style="font-family:Verdana; padding-left:10px; font-size:13px"&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;Most of our application might need to store images, PDFs, Word documents, Excel documents, or other binary data. there are two ways: on the web server's file system, with a reference to the file in the database; or directly in the database itself.&lt;br /&gt;In this Article we will discuss the second way storing directly in the database itself.&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;1. Creating a Database Table to Store Files:&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;We need to create simple table to holds Binary Data, (I will use MS SQL Server 2005).&lt;br /&gt;&lt;br /&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiL_CuUhzx4OvT0s3qtKOePsxtps-TMT2YYStYTyoPu-8bQcEDjgj4YeXUYxErkzqKQaeqkNCdTIREIAfYJ72hhSyQM_Tnp1Bw7wM26FxDFR54nZSIiz4bH5e_66NCn1u4QMovfrEVptzE/s320/1.JPG" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Also we need to Create Stored Procedure to use it to Insert record into UserFile Table, look to the following code:&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="width:100%;font-family:Georgia; padding-left:10px; border:solid 1px #0000; background-color:#999999"&gt;&lt;br /&gt;CREATE PROCEDURE InsertUserFileInfo&lt;br /&gt;( &lt;br /&gt;@FileName nvarchar(400),&lt;br /&gt;@ContentType varchar(100),&lt;br /&gt;@FileLength int,&lt;br /&gt;@FileContent image&lt;br /&gt;)&lt;br /&gt;AS&lt;br /&gt;INSERT INTO UserFile&lt;br /&gt;( &lt;br /&gt;FileName,&lt;br /&gt;ContentType,&lt;br /&gt;FileLength,&lt;br /&gt;FileContent&lt;br /&gt;)&lt;br /&gt;VALUES&lt;br /&gt;(&lt;br /&gt;@FileName,&lt;br /&gt;@ContentType,&lt;br /&gt;@FileLength,&lt;br /&gt;@FileContent&lt;br /&gt;)&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;&lt;b&gt;2. Creating ASP.NET Page to upload file&lt;/b&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;We will add only &lt;b&gt;FileUpload&lt;/b&gt; Control with &lt;b&gt;Button&lt;/b&gt; to upload file, look to the following code:&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="width:100%; font-family:Georgia; padding-left:10px; border:solid 1px #0000; background-color:#999999"&gt;&lt;br /&gt;&lt;b&gt;UploadFile.aspx &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;asp:FileUpload ID="FileUpload1" runat="server" /&amp;gt;&lt;br /&gt;&amp;lt;asp:Button ID="btnUpload" runat="server"&amp;nbsp;Text="Upload" onclick="btnUpload_Click" /&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;&lt;b&gt;3. Adding Code to Upload.aspx Page&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;Once the user has selected a file and posted back the form (by clicking the "Upload" button, for example), the binary contents of the specified file are posted back to the web server. From the server-side code, this binary data is available through the FileUpload control's PostedFile.InputStream property, as the following markup and code illustrates: &lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="width:100%; font-family:Georgia; padding-left:10px; border:solid 1px #0000; background-color:#999999"&gt;&lt;br /&gt;&lt;b&gt;UploadFile.aspx.cs&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;protected void btnUpload_Click(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;    if (FileUpload1.HasFile)&lt;br /&gt;    {&lt;br /&gt;    // string to store allowed file extension &lt;br /&gt;    string strAllowedExtenstion = ".doc, .zip, .rar, .docx, .xls, .xlsx, .pdf, .jpg, .gif, .png";&lt;br /&gt;    // string to get user file extension&lt;br /&gt;    string strFileExtenstion = System.IO.Path.GetExtension(FileUpload1.FileName);&lt;br /&gt;    if (strAllowedExtenstion.IndexOf(strFileExtenstion) &gt; -1)&lt;br /&gt;    {&lt;br /&gt;    // IO Stream to hold uploaded file stream &lt;br /&gt;    System.IO.Stream stream = FileUpload1.PostedFile.InputStream;&lt;br /&gt;&lt;br /&gt;    // array of bytes to hold file stream &lt;br /&gt;    byte[] fileData = new byte[stream.Length];&lt;br /&gt;    stream.Read(fileData, 0, Convert.ToInt32(stream.Length));&lt;br /&gt;    stream.Close();&lt;br /&gt;&lt;br /&gt;    // now call function to store binary data in DB &lt;br /&gt;    _saveDataToDB(fileData, FileUpload1.FileName, _getContentType(strFileExtenstion) ); &lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;    else&lt;br /&gt;    {&lt;br /&gt;    // Not Allowed file type&lt;br /&gt;    }&lt;br /&gt;    }&lt;br /&gt;    else&lt;br /&gt;    {&lt;br /&gt;    // no file selected&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private string _getContentType(string pFileExtension)&lt;br /&gt;{&lt;br /&gt;    switch (pFileExtension)&lt;br /&gt;    {&lt;br /&gt;    case ".doc":&lt;br /&gt;    return "application/vnd.ms-word";&lt;br /&gt;&lt;br /&gt;    case ".docx":&lt;br /&gt;    return "application/vnd.ms-word";&lt;br /&gt;&lt;br /&gt;    case ".xls":&lt;br /&gt;    return "application/vnd.ms-excel";&lt;br /&gt;&lt;br /&gt;    case ".xlsx":&lt;br /&gt;    return "application/vnd.ms-excel";&lt;br /&gt;&lt;br /&gt;    case ".jpg":&lt;br /&gt;    return "image/jpg";&lt;br /&gt;&lt;br /&gt;    case ".png":&lt;br /&gt;    return "image/png";&lt;br /&gt;&lt;br /&gt;    case ".gif":&lt;br /&gt;    return "image/gif";&lt;br /&gt;&lt;br /&gt;    case ".pdf":&lt;br /&gt;    return "application/pdf";&lt;br /&gt;&lt;br /&gt;    case ".rar":&lt;br /&gt;    return "application/rar";&lt;br /&gt;&lt;br /&gt;    case ".zip":&lt;br /&gt;    return "application/zip";&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;    return "";&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;// Store File data into SQL DB using Stored Procedure (InsertUserFileInfo) &lt;br /&gt;private void _saveDataToDB(byte[] pFileData , string pFileName,string pContentType)&lt;br /&gt;{&lt;br /&gt;    using (SqlConnection connection = new SqlConnection(ConnectionString))&lt;br /&gt;    {&lt;br /&gt;    connection.Open();&lt;br /&gt;    using (SqlCommand command = new SqlCommand("InsertUserFileInfo", connection))&lt;br /&gt;    {&lt;br /&gt;    command.CommandType = System.Data.CommandType.StoredProcedure; &lt;br /&gt;    command.Parameters.Add(new SqlParameter("@FileName", pFileName));&lt;br /&gt;    command.Parameters.Add(new SqlParameter("@ContentType", pContentType));&lt;br /&gt;    command.Parameters.Add(new SqlParameter("@FileLength", pFileData.Length));&lt;br /&gt;    command.Parameters.Add(new SqlParameter("@FileContent", pFileData));&lt;br /&gt;&lt;br /&gt;    command.ExecuteNonQuery();&lt;br /&gt;    }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;&lt;b&gt;3. Retrieving File from SQL DB:&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;The first step is creating new page and call it &lt;b&gt;ViewFile.aspx&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The next Step is creating Stored Procedure to retrieve File Data &lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="width:100%; font-family:Georgia; padding-left:10px; border:solid 1px #0000; background-color:#999999"&gt;&lt;br /&gt;CREATE PROCEDURE [dbo].[GetUserFileInfo]&lt;br /&gt;( &lt;br /&gt;@FileID INT&lt;br /&gt;)&lt;br /&gt;AS&lt;br /&gt;&lt;br /&gt;SELECT FileID,&lt;br /&gt;FileName,&lt;br /&gt;ContentType,&lt;br /&gt;FileLength,&lt;br /&gt;FileContent&lt;br /&gt;&lt;br /&gt;FROM UserFile&lt;br /&gt;WHERE (@FileID =FileID)&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;The Final step is adding code to page behind (into ViewFile.aspx.cs), look down: &lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="width:100%; font-family:Georgia; padding-left:10px; border:solid 1px #0000; background-color:#999999"&gt;&lt;br /&gt;&lt;b&gt;ViewFile.aspx.cs&lt;/b&gt;&lt;br /&gt;protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;string pContentType;&lt;br /&gt;Int32 pFileLength;&lt;br /&gt;byte[] pFileContent;&lt;br /&gt;string pFileName;&lt;br /&gt;&lt;br /&gt;_getDataFromDB(ref pFileLength, ref pFileName, ref pFileContent, ref pContentType)&lt;br /&gt;&lt;br /&gt;Response.Clear();&lt;br /&gt;Response.Charset = "utf-8";&lt;br /&gt;Response.Buffer = true;&lt;br /&gt;this.EnableViewState = false;&lt;br /&gt;Response.ContentEncoding = System.Text.Encoding.UTF8;&lt;br /&gt;&lt;br /&gt;Response.AddHeader("Content-Disposition", "attachment;filename=" + pFileName);&lt;br /&gt;Response.BinaryWrite(pFileContent);&lt;br /&gt;Response.ContentType = pContentType;&lt;br /&gt;Response.Flush();&lt;br /&gt;Response.Close();&lt;br /&gt;Response.End();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;private void _getDataFromDB(ref Int32 pFileLength, ref string pFileName, ref byte[] pFileContent, ref string pContentType)&lt;br /&gt;{&lt;br /&gt;using (SqlConnection connection = new SqlConnection(ConnectionString))&lt;br /&gt;{&lt;br /&gt;connection.Open();&lt;br /&gt;using (SqlCommand command = new SqlCommand())&lt;br /&gt;{&lt;br /&gt;command.Connection = connection;&lt;br /&gt;command.CommandType = System.Data.CommandType.StoredProcedure;&lt;br /&gt;command.CommandText = "GetUserFileInfo";&lt;br /&gt;&lt;br /&gt;// FileID from QueryString e.g when calling this page just type ViewFile.aspx?FileID=3 &lt;br /&gt;&lt;br /&gt;// you can use any other way to determine which FileID you want &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;command.Parameters.Add(new SqlParameter("@FileID", Convert.ToInt32(Request.QueryString["FileID"])));&lt;br /&gt;SqlDataReader sqlDataReader = command.ExecuteReader();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;while (sqlDataReader.Read())&lt;br /&gt;{&lt;br /&gt;pContentType = sqlDataReader.GetString(2);&lt;br /&gt;pFileContent = (byte[])sqlDataReader[4]; ;&lt;br /&gt;pFileLength = sqlDataReader.GetInt32(3);&lt;br /&gt;pFileName = sqlDataReader.GetString(1);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;After runuing and calling this page, the following message will appear:&lt;br /&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrQ-BdK5jIo1PExMV04t93omW2yhzl81GOgKNEeWYER1DVgvjwalQwbDzLDrEReNutswT7p0l2uxvMN5nP7Ry5Ry1HNhrzkh8I5ezMUr6-QHp46uznIUSeN0XK7Ylets724ED95owBRsA/s320/Final.JPG" /&gt;&lt;br /&gt;now you can save this file or open it directly &lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;&lt;b&gt;Thanks&lt;/b&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiL_CuUhzx4OvT0s3qtKOePsxtps-TMT2YYStYTyoPu-8bQcEDjgj4YeXUYxErkzqKQaeqkNCdTIREIAfYJ72hhSyQM_Tnp1Bw7wM26FxDFR54nZSIiz4bH5e_66NCn1u4QMovfrEVptzE/s72-c/1.JPG" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item></channel></rss>