<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Learn ASP.NET programming,search engine optimization and web developement for biginners. &#187; ASP.NET programming</title>
	<atom:link href="http://speakasp.net/blog/index.php/category/web-developing/asp-net-programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://speakasp.net/blog</link>
	<description>ASP.net ,search engine optimization tutorials,code examples and explanations.</description>
	<lastBuildDate>Wed, 11 Nov 2009 15:40:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Asp.net Single &amp; multible files delete</title>
		<link>http://speakasp.net/blog/index.php/web-developing/asp-net-single-multible-files-delete/</link>
		<comments>http://speakasp.net/blog/index.php/web-developing/asp-net-single-multible-files-delete/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 17:29:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ASP.NET programming]]></category>
		<category><![CDATA[web developing]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[file operations]]></category>
		<category><![CDATA[vb.net]]></category>

		<guid isPermaLink="false">http://speakasp.net/blog/?p=89</guid>
		<description><![CDATA[Article about file deleting from the server in asp.net &#038; vb the article explaining two scenarios one for deleting single file and the other for deleting multiple files that are belong to the same category, the code explained clearly to be understood to the absolute beginner.  [...]]]></description>
			<content:encoded><![CDATA[<p>Deleting files from server is a common process that web developers perform  every day. Thanks to the .net framework the process is fairly easy when you  delete single file. Things go little  complicated when you try to  delete selected multiple files from a server folder.</p>
<p>We will use an example here of a scenario that you have a media library web  site where the lessons is categorized. . We design the database to contain two  tables the first “categories” and the other is “lessons”. The lessons table  contains a field called “mp3filelocation” that contains the url of the mp3 of the lesson. The “categories” and the “lessons” is related in a one to many  relation. You should set the “delete role” in the relation properties window of  the vwd data base diagram to “cascade” . This means when you delete a category  all the related lessons will be deleted automatically from the data base but you  have to delete the mp3file  from it’s directory from the code behind page.</p>
<p>In our scenario the website admin should have the option of deleting a single  lesson also to delete a category with all the related lessons.</p>
<h2>Deleting single file:</h2>
<p>In the “lesson_delete” page we need to delete the mp3  related to the  lesson we are deleting. To accomplish this we will put the code to delete the  related file in the “SqlDataSource1_Deleted” event handler. we will simply add a  databound asp.net label that is bounded to mp3fileurl database field then in the  code behind take the file path and delete it.</p>
<p><span style="text-decoration: underline;"><strong>code example:</strong></span></p>
<blockquote><p>Dim LABELfileurl As Label = DirectCast(FormView2.FindControl(&#8220;mp3nameLabel&#8221;),  Label)<br />
Dim filenamemp3 As String = LABELfileurl.Text<br />
If  e.AffectedRows &gt; 0 Then<br />
If filenamemp3.Length &gt;  3<br />
Try<br />
File.Delete(Server.MapPath(&#8220;~/lessonsmp3/&#8221; &amp;  LABELfileurl.Text))<br />
Catch<br />
End  Try<br />
End If<br />
End If</p></blockquote>
<p><strong><span style="text-decoration: underline;">Code explanation:</span></strong></p>
<p>1-we used “formview2.findcontrol” function to find the asp.net label we  want  inside the formview(notice form view is naming container so you cant  access the control inside it directly like usual ).</p>
<p>2-we used “directcast” because “findcontrol” function return an undefined  control so to define the returning object as a label we use “directcast”  function.</p>
<p>3-then we store the mp3file name in a variable .</p>
<p>4-check if the data base row successfully removed using “e.affectedrows&gt;0”</p>
<p>5-then check if there is a mp3file related to the removed lessons.</p>
<p>6-then use the “file.delete” to delete the mp3file this method accept the  physical path of the file to delete it we use “server.mappath” to return the  physical path .</p>
<p>7-and you finished.</p>
<h2>Multiple files deleting:</h2>
<p>Thing will be a little complicated here in our scenario we have a group of  mp3 files located in a directory called “lessonsmp3” in the category delete page  we should remove the files related to this category after removing the  selected category row from the database</p>
<p><span style="text-decoration: underline;"><strong>here is the code example</strong></span></p>
<blockquote><p>If e.AffectedRows &gt; 0 Then</p>
<p>Dim categoryid As String =  categoryddl.SelectedValue.ToString()<br />
Dim file() As  FileInfo<br />
Dim i As Integer<br />
Dim searchfor As String</p>
<p>Dim directory As New  DirectoryInfo(Server.MapPath(&#8220;~/lessonsmp3/&#8221;))<br />
searchfor= categoryid  &amp; &#8220;*&#8221; &amp; &#8220;.mp3&#8243;<br />
file = directory.GetFiles(searchfor)</p>
<p>If file.Length &gt; 0 Then<br />
For i = 0 To  file.Length &#8211; 1<br />
file(i).Delete()<br />
Next<br />
End If</p>
<p>End If</p></blockquote>
<p><strong><span style="text-decoration: underline;">code explanation:</span></strong></p>
<p>1-First we create a variable to carry the id of the category we want  to remove “categoryid”.</p>
<p>2-then we instantiate an array of file info type object. This will give us  the ability to loop through large number of files and delete or edit each file  alone.</p>
<p>3-we define the “i” integer type variable to act as a loop counter.</p>
<p>4-then we define a string variable “searchfor” which will carry the search  criteria of the mp3files we want to delete. Notice that we designed the lesson  insert page to add the category id in front of the uploaded file name to ease  the process of multiple file deleting all we have to do is to search for the  category id of the category we need to remove in the start of any file name if  we found the id of category we want to remove we delete the file else leave the  file inplace.</p>
<p>5-then we define a “directoryinfo” type variable that point to the directory  that contains the files that we want to delete from. Notice we used  “server.mappath” to get the physical path of the directory from the virtual path  which is”~/lessonsmp3/”.</p>
<p>6-then we set the search parameters as we mentioned before. the file should  contains the category id in the start of it’s name and mp3 type.</p>
<p>7.then we load the files that present in the selected directory into the  “file” array we created before.</p>
<p>8-then check if the array contains files by checking it’s length to be more  than zero.</p>
<p>9-then we loop through the array checking if the mp3file have the criteria we  set before if the  file belong to the category we want to remove we delete the  file also using”file(i).delete()” method.</p>
<p>10-continue looping to the last file in the array and you are finished.</p>



Share and Enjoy:


	<a rel="nofollow" id="print"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-single-multible-files-delete%2F&amp;partner=sociable" title="Print"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow" id="digg"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-single-multible-files-delete%2F&amp;title=Asp.net%20Single%20%26%20multible%20files%20delete&amp;bodytext=Article%20about%20file%20deleting%20from%20the%20server%20in%20asp.net%20%26%20vb%20the%20article%20explaining%20two%20scenarios%20one%20for%20deleting%20single%20file%20and%20the%20other%20for%20deleting%20multiple%20files%20that%20are%20belong%20to%20the%20same%20category%2C%20the%20code%20explained%20clearly%20to%20be%20understood%20to%20the%20absolute%20beginner.%20%20%20" title="Digg"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow" id="sphinn"  href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-single-multible-files-delete%2F" title="Sphinn"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow" id="del.icio.us"  href="http://delicious.com/post?url=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-single-multible-files-delete%2F&amp;title=Asp.net%20Single%20%26%20multible%20files%20delete&amp;notes=Article%20about%20file%20deleting%20from%20the%20server%20in%20asp.net%20%26%20vb%20the%20article%20explaining%20two%20scenarios%20one%20for%20deleting%20single%20file%20and%20the%20other%20for%20deleting%20multiple%20files%20that%20are%20belong%20to%20the%20same%20category%2C%20the%20code%20explained%20clearly%20to%20be%20understood%20to%20the%20absolute%20beginner.%20%20%20" title="del.icio.us"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" id="facebook"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-single-multible-files-delete%2F&amp;t=Asp.net%20Single%20%26%20multible%20files%20delete" title="Facebook"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow" id="mixx"  href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-single-multible-files-delete%2F&amp;title=Asp.net%20Single%20%26%20multible%20files%20delete" title="Mixx"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a>
	<a rel="nofollow" id="google"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-single-multible-files-delete%2F&amp;title=Asp.net%20Single%20%26%20multible%20files%20delete&amp;annotation=Article%20about%20file%20deleting%20from%20the%20server%20in%20asp.net%20%26%20vb%20the%20article%20explaining%20two%20scenarios%20one%20for%20deleting%20single%20file%20and%20the%20other%20for%20deleting%20multiple%20files%20that%20are%20belong%20to%20the%20same%20category%2C%20the%20code%20explained%20clearly%20to%20be%20understood%20to%20the%20absolute%20beginner.%20%20%20" title="Google Bookmarks"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a  id="blogplay"  href="http://blogplay.com" title="Blogplay"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/blogplay.png" title="Blogplay" alt="Blogplay" class="sociable-hovers" /></a>
	<a rel="nofollow" id="dotnetkicks"  href="http://www.dotnetkicks.com/kick/?url=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-single-multible-files-delete%2F&amp;title=Asp.net%20Single%20%26%20multible%20files%20delete" title="DotNetKicks"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/dotnetkicks.png" title="DotNetKicks" alt="DotNetKicks" class="sociable-hovers" /></a>
	<a rel="nofollow" id="yahoo!bookmarks"  href="http://bookmarks.yahoo.com/toolbar/savebm?u=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-single-multible-files-delete%2F&amp;t=Asp.net%20Single%20%26%20multible%20files%20delete&opener=bm&amp;ei=UTF-8&amp;d=Article%20about%20file%20deleting%20from%20the%20server%20in%20asp.net%20%26%20vb%20the%20article%20explaining%20two%20scenarios%20one%20for%20deleting%20single%20file%20and%20the%20other%20for%20deleting%20multiple%20files%20that%20are%20belong%20to%20the%20same%20category%2C%20the%20code%20explained%20clearly%20to%20be%20understood%20to%20the%20absolute%20beginner.%20%20%20" title="Yahoo! Bookmarks"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/yahoomyweb.png" title="Yahoo! Bookmarks" alt="Yahoo! Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow" id="linkedin"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-single-multible-files-delete%2F&amp;title=Asp.net%20Single%20%26%20multible%20files%20delete&amp;source=Learn+ASP.NET+programming%2Csearch+engine+optimization+and+web+developement+for+biginners.+ASP.net+%2Csearch+engine+optimization+tutorials%2Ccode+examples+and+explanations.&amp;summary=Article%20about%20file%20deleting%20from%20the%20server%20in%20asp.net%20%26%20vb%20the%20article%20explaining%20two%20scenarios%20one%20for%20deleting%20single%20file%20and%20the%20other%20for%20deleting%20multiple%20files%20that%20are%20belong%20to%20the%20same%20category%2C%20the%20code%20explained%20clearly%20to%20be%20understood%20to%20the%20absolute%20beginner.%20%20%20" title="LinkedIn"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow" id="live"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-single-multible-files-delete%2F&amp;title=Asp.net%20Single%20%26%20multible%20files%20delete" title="Live"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow" id="myspace"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-single-multible-files-delete%2F&amp;t=Asp.net%20Single%20%26%20multible%20files%20delete" title="MySpace"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow" id="technorati"  href="http://technorati.com/faves?add=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-single-multible-files-delete%2F" title="Technorati"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow" id="twitter"  href="http://twitter.com/home?status=Asp.net%20Single%20%26%20multible%20files%20delete%20-%20http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-single-multible-files-delete%2F" title="Twitter"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://speakasp.net/blog/index.php/web-developing/asp-net-single-multible-files-delete/feed/</wfw:commentRss>
		<slash:comments>4595</slash:comments>
		</item>
		<item>
		<title>Generating search engine optimized page title and meta tags in asp.net.</title>
		<link>http://speakasp.net/blog/index.php/web-developing/generating-search-engine-optimized-meta-tags-page-title-asp-net/</link>
		<comments>http://speakasp.net/blog/index.php/web-developing/generating-search-engine-optimized-meta-tags-page-title-asp-net/#comments</comments>
		<pubDate>Sun, 25 Oct 2009 11:32:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ASP.NET programming]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[web developing]]></category>
		<category><![CDATA[discription meta tag]]></category>
		<category><![CDATA[keyword positioning]]></category>
		<category><![CDATA[page title]]></category>
		<category><![CDATA[search engine optimization]]></category>

		<guid isPermaLink="false">http://speakasp.net/blog/?p=85</guid>
		<description><![CDATA[The importance of search engine optimized page title and meta tags: May be you will need to read about seo in general from here before you start <p>As a asp.net developer it is very important  when you start to build a web site to make it search engine friendly as possible to get the maximum number of free traffic. One of the most important requirement for any webpage to be [...]]]></description>
			<content:encoded><![CDATA[<h2>The importance of search engine optimized page title and meta tags:</h2>
<address><strong><a title="SEO KEYWORDS POSITIONING" href="http://speakasp.net/blog/index.php/web-developing/seo/seo-tips-keywords-positioning/">May be you will need to read about seo in general from here before you start</a></strong></address>
<p>As a asp.net developer it is very important  when you start to build a web site to make it search  engine friendly as possible to get the maximum number of free traffic. One of  the most important requirement for any webpage to be search engine friendly is  to have a unique, unrepeated and very closely related  page title and meta tags.  Search engine is giving a a great importance to the text present in the page  title and think it the best way to discover what the page is about , also search  engine use your description meta tag( if you used it properly ) to write the  page description that appear below the page title in the search result.</p>
<p>When you have a unique description meta tag that is very related to your page  content the search engine will use it but if the description meta tag is not  unique too short or not related to the page the search engine will choose other  text from the page and use it as a description for your page. That automatically  chosen text won’t be sexy for the people to click at  which can affect you  traffic badly. Also if the page title is repeated or not related to the page you  will rank very low for your targeted keywords because there will be other  competitive  pages with a better page titles .</p>
<h2>Page titles and meta tags generation in asp.net :</h2>
<p>As an asp.net developer you should learn how to generate and control page  titles and meta tags dynamically.</p>
<p>For any physical asp.net page that has only one version like the “contact us”  page or “about the company” page there will be no problem  you just will set the  page title and the meta tags statically like if you are preparing a simple html  page.Just find the title attribute in the page declaration part of the asp.net  aspx page(usually the first line in page ), and set the title property to the  value you want and for the meta tags you just add it to the head part of the  page like thgis</p>
<p>&lt;META NAME=&#8221;description&#8221; CONTENT=&#8221;your page description&#8221;/&gt;</p>
<p>But the problem is in the asp.net pages that  display a different row from  the data base every time based on the query string value or something. Also the  pages that display contents based on the user country or language.</p>
<p>As i want this article to be easy to understand for the beginner asp.net  developer i will explain a very basic example here. We have a scenario that we  want to make a details page that display the details of a single product  selected on the base of the query string field called “productid”. Sure we will  need to generate page title and meta tags dynamically because search engine will  see “/productdetails.aspx?productid=1” and “/productdetails.aspx?productid=2” as  a totally different pages that must have different page titles, also suppose  that the first page is displaying a football and the other page displaying a  diving equipment so the page title have to be generated every time the asp.net  page load  to be related to the product displayed and rank high when someone  search for the  diving eq. for example.</p>
<p>so time for coding</p>
<h3>Generating page title and meta tags dynamically explained  vb.net code example:</h3>
<p>To fulfill the requirement of the scenario described  above  we will add a  three fields to the data base “pagetitle”,”descriptionmeta ” and “keyeordmeta”  to store the page title and  meta tags for each product these fields should be  filled by the seo specialist.</p>
<p>We can make it easier by using product name as the page title and the product  description as the page meta description  but i prefer separating what is for  humans from what is for search engines because each has it’s  rules.</p>
<p>Prepare a page containing  form view the form view will display one row from  the products table on the base of the query string passed with the url.</p>
<p>add two data bound asp.net labels to the asp.net formview with  ID’s  “ptitlelbl”, “mdisclbl”  the first id data bounded to the data base field  that hold the page title and the other is bounded to the meta description  field.</p>
<p>and here is the code behind</p>
<p><strong>Page title:</strong></p>
<p><strong>in the page load event add the following code</strong></p>
<blockquote><p>Dim ptitle As String<br />
ptitle =  DirectCast(FormView1.FindControl(&#8220;ptitlelbl&#8221;), Label).Text<br />
If  String.IsNullOrEmpty(ptitle) Then</p>
<p>Else</p>
<p>Page.Title = &#8221; any thing you want to append&#8221; &amp;  ptitle<br />
End If</p></blockquote>
<p>and you done just be sure that there is <strong>no</strong> static page title  tag anywhere (page declaration section, header section of the aspx file or in  the master page) not to have unexpected results.</p>
<p>1-we declared a variable to hold the title.</p>
<p>2-we used “formview1.findcontrol” function to find the asp.net label we  want  inside the formview(notice form view is naming container so you cant  access the control inside it directly like usual ).</p>
<p>3-we check first if the variable is not empty to prevent the ugly looking  exception.</p>
<p>4-we used “directcast” because “findcontrol” function return an undefined  control so to define the returning object as a label we use “directcast”  function.</p>
<p>5-then we set the “title” property of the “page” object to the value we  extracted from the data base and append to it any text we want(may be product  category for example) .</p>
<p><strong>Meta tags(description ex. ):</strong></p>
<p><strong>also in the page load event add the following vb.net code</strong></p>
<blockquote><p>Dim ptitle As String<br />
disctext =  DirectCast(FormView1.FindControl(&#8220;mdisclbl&#8221;), Label).Text<br />
If  String.IsNullOrEmpty(disctext) Then</p>
<p>Else</p>
<p>Dim headsection As HtmlHead = CType(Me.Header,  HtmlHead)<br />
Dim discmetatag As HtmlMeta = New  HtmlMeta()<br />
discmetatag.Name = &#8220;Description&#8221;<br />
discmetatag.Content = &#8220;any thing you want to append ,&#8221;  &amp; disctext<br />
headsection.Controls.Add(discmetatag)<br />
End If</p></blockquote>
<p>here the code is similar to the code above  except:</p>
<p>1-first we create an instance of our page head section.</p>
<p>2-next we defined a new html meta object.</p>
<p>3-we set its name proberity to “description”(or keyword if you want)</p>
<p>4-then set its content to the text we extracted from the data base.</p>
<p>5-finally we add the meta tag object we created to our page header section</p>
<p>and you are done</p>
<h2>some useful tips in generating asp.net page title and description meta  tags:</h2>
<p>1-it is sometimes important to add different countries or cities to the page  title and meta tags because people usually search for service that is  located close to them.For example if you have a car rent website may be you  should dynamically generate many instances of your  pages  each one is targeted  to different cities in your country.believe me it is great tip you should try it  if you are making a website that offer a local service.</p>
<p>2-put the most important text in your page in a h1 tag. in our case above it  will make a great difference to put the product name asp.net  label in a h1 tag  and may be making it bold text also.</p>
<p>3-it is far better to have only h1 tag in each page not more this will keep  your page targeted.</p>
<p><a title="SEO KEYWORDS SELECTION" href="http://speakasp.net/blog/index.php/web-developing/seo/seo-tips-keyword-selection/">IF YOU WANT TO KNOW HOW TO SELECT YOUR KEY WORDS READ THIS</a></p>
<p>happppy coding and alot of money.</p>
<p>dr A. galal</p>
<p>asp.net developer and seo specialist.</p>
<p>dr.agalal@speakasp.net</p>



Share and Enjoy:


	<a rel="nofollow" id="print"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fgenerating-search-engine-optimized-meta-tags-page-title-asp-net%2F&amp;partner=sociable" title="Print"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow" id="digg"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fgenerating-search-engine-optimized-meta-tags-page-title-asp-net%2F&amp;title=Generating%20search%20engine%20optimized%20page%20title%20and%20meta%20tags%20in%20asp.net.%20&amp;bodytext=The%20importance%20of%20search%20engine%20optimized%20page%20title%20and%20meta%20tags%3A%0D%0AMay%20be%20you%20will%20need%20to%20read%20about%20seo%20in%20general%20from%20here%20before%20you%20startAs%20a%20asp.net%20developer%20it%20is%20very%20important%C2%A0%20when%20you%20start%20to%20build%20a%20web%20site%20to%20make%20it%20search%20%20engin" title="Digg"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow" id="sphinn"  href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fgenerating-search-engine-optimized-meta-tags-page-title-asp-net%2F" title="Sphinn"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow" id="del.icio.us"  href="http://delicious.com/post?url=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fgenerating-search-engine-optimized-meta-tags-page-title-asp-net%2F&amp;title=Generating%20search%20engine%20optimized%20page%20title%20and%20meta%20tags%20in%20asp.net.%20&amp;notes=The%20importance%20of%20search%20engine%20optimized%20page%20title%20and%20meta%20tags%3A%0D%0AMay%20be%20you%20will%20need%20to%20read%20about%20seo%20in%20general%20from%20here%20before%20you%20startAs%20a%20asp.net%20developer%20it%20is%20very%20important%C2%A0%20when%20you%20start%20to%20build%20a%20web%20site%20to%20make%20it%20search%20%20engin" title="del.icio.us"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" id="facebook"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fgenerating-search-engine-optimized-meta-tags-page-title-asp-net%2F&amp;t=Generating%20search%20engine%20optimized%20page%20title%20and%20meta%20tags%20in%20asp.net.%20" title="Facebook"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow" id="mixx"  href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fgenerating-search-engine-optimized-meta-tags-page-title-asp-net%2F&amp;title=Generating%20search%20engine%20optimized%20page%20title%20and%20meta%20tags%20in%20asp.net.%20" title="Mixx"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a>
	<a rel="nofollow" id="google"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fgenerating-search-engine-optimized-meta-tags-page-title-asp-net%2F&amp;title=Generating%20search%20engine%20optimized%20page%20title%20and%20meta%20tags%20in%20asp.net.%20&amp;annotation=The%20importance%20of%20search%20engine%20optimized%20page%20title%20and%20meta%20tags%3A%0D%0AMay%20be%20you%20will%20need%20to%20read%20about%20seo%20in%20general%20from%20here%20before%20you%20startAs%20a%20asp.net%20developer%20it%20is%20very%20important%C2%A0%20when%20you%20start%20to%20build%20a%20web%20site%20to%20make%20it%20search%20%20engin" title="Google Bookmarks"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a  id="blogplay"  href="http://blogplay.com" title="Blogplay"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/blogplay.png" title="Blogplay" alt="Blogplay" class="sociable-hovers" /></a>
	<a rel="nofollow" id="dotnetkicks"  href="http://www.dotnetkicks.com/kick/?url=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fgenerating-search-engine-optimized-meta-tags-page-title-asp-net%2F&amp;title=Generating%20search%20engine%20optimized%20page%20title%20and%20meta%20tags%20in%20asp.net.%20" title="DotNetKicks"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/dotnetkicks.png" title="DotNetKicks" alt="DotNetKicks" class="sociable-hovers" /></a>
	<a rel="nofollow" id="yahoo!bookmarks"  href="http://bookmarks.yahoo.com/toolbar/savebm?u=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fgenerating-search-engine-optimized-meta-tags-page-title-asp-net%2F&amp;t=Generating%20search%20engine%20optimized%20page%20title%20and%20meta%20tags%20in%20asp.net.%20&opener=bm&amp;ei=UTF-8&amp;d=The%20importance%20of%20search%20engine%20optimized%20page%20title%20and%20meta%20tags%3A%0D%0AMay%20be%20you%20will%20need%20to%20read%20about%20seo%20in%20general%20from%20here%20before%20you%20startAs%20a%20asp.net%20developer%20it%20is%20very%20important%C2%A0%20when%20you%20start%20to%20build%20a%20web%20site%20to%20make%20it%20search%20%20engin" title="Yahoo! Bookmarks"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/yahoomyweb.png" title="Yahoo! Bookmarks" alt="Yahoo! Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow" id="linkedin"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fgenerating-search-engine-optimized-meta-tags-page-title-asp-net%2F&amp;title=Generating%20search%20engine%20optimized%20page%20title%20and%20meta%20tags%20in%20asp.net.%20&amp;source=Learn+ASP.NET+programming%2Csearch+engine+optimization+and+web+developement+for+biginners.+ASP.net+%2Csearch+engine+optimization+tutorials%2Ccode+examples+and+explanations.&amp;summary=The%20importance%20of%20search%20engine%20optimized%20page%20title%20and%20meta%20tags%3A%0D%0AMay%20be%20you%20will%20need%20to%20read%20about%20seo%20in%20general%20from%20here%20before%20you%20startAs%20a%20asp.net%20developer%20it%20is%20very%20important%C2%A0%20when%20you%20start%20to%20build%20a%20web%20site%20to%20make%20it%20search%20%20engin" title="LinkedIn"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow" id="live"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fgenerating-search-engine-optimized-meta-tags-page-title-asp-net%2F&amp;title=Generating%20search%20engine%20optimized%20page%20title%20and%20meta%20tags%20in%20asp.net.%20" title="Live"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow" id="myspace"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fgenerating-search-engine-optimized-meta-tags-page-title-asp-net%2F&amp;t=Generating%20search%20engine%20optimized%20page%20title%20and%20meta%20tags%20in%20asp.net.%20" title="MySpace"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow" id="technorati"  href="http://technorati.com/faves?add=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fgenerating-search-engine-optimized-meta-tags-page-title-asp-net%2F" title="Technorati"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow" id="twitter"  href="http://twitter.com/home?status=Generating%20search%20engine%20optimized%20page%20title%20and%20meta%20tags%20in%20asp.net.%20%20-%20http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fgenerating-search-engine-optimized-meta-tags-page-title-asp-net%2F" title="Twitter"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://speakasp.net/blog/index.php/web-developing/generating-search-engine-optimized-meta-tags-page-title-asp-net/feed/</wfw:commentRss>
		<slash:comments>3243</slash:comments>
		</item>
		<item>
		<title>ASP.NET ajax modal popup</title>
		<link>http://speakasp.net/blog/index.php/web-developing/asp-net-ajax-modal-popup/</link>
		<comments>http://speakasp.net/blog/index.php/web-developing/asp-net-ajax-modal-popup/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 18:27:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ASP.NET programming]]></category>
		<category><![CDATA[web developing]]></category>
		<category><![CDATA[greybox]]></category>
		<category><![CDATA[modal popup]]></category>
		<category><![CDATA[modal popup extender]]></category>
		<category><![CDATA[orangoo grey box]]></category>

		<guid isPermaLink="false">http://speakasp.net/blog/?p=61</guid>
		<description><![CDATA[<p>popup windows usage is one of the every day tasks for any web developer. The problem of the normal html simple popups that it is usually blocked by the browser of the client also it is not attractive specially if you are developing a web site that need to be very attractive. So in such cases you will need ajax popup instead.</p> <p>I searched the web allot in the end i can [...]]]></description>
			<content:encoded><![CDATA[<p>popup windows  usage is one of the every day tasks for any web developer. The problem of the normal html simple popups that it is usually blocked by the browser of the client also it is not attractive specially if you are developing a web site that need to be very attractive. So in such cases you will need ajax popup instead.</p>
<p>I searched the web allot in the end i can say that the best options you have as a asp.net developer are</p>
<p>1-The modal popup extender which is part of the free  asp.net ajax controls tool kit.</p>
<p>2-The  free greybox modal popup form orangoo labs.</p>
<p>so i will concentrate on comparison between the two options after trying them for a long time</p>
<h2><strong>grey box vs modal popup extender:</strong></h2>
<p>i will not concentrate  on the usage of the two techniques because this will be a very lengthy explanation instead i will mention an example on each one and a comparison between them .But both have a very good documentation and step by step setup in the manufacturer web sites</p>
<p>you can find full explanation of the modal popup extender at codeplex.com and <a href="http://www.asp.net/AJAX/AjaxControlToolkit/Samples/ModalPopup/ModalPopup.aspx" target="_blank">www.asp.net</a> website also have a very good example of using this control.</p>
<p>The other option (orangoo grey box) is also explained in details <a href="http://orangoo.com/labs/GreyBox/Documentation/" target="_blank">here</a>.</p>
<h2>Greybox concept :</h2>
<p>Simply when you click on the link  the greybox script take the target of any normal a link and open the target page in a good looking modal popup( this link can be generated dynamically to make a master details scenario  ) peace of cake.</p>
<h2>Modal popup extender concept:</h2>
<p>The process is more complicated here (it is Microsoft funded project lol ) . Here you have to put the contents of the popup you want to open in an asp.net panel and the modal popup extender control taking care of hiding this panel when the page load  and and showing the panel when the user click the trigger button  with all of it&#8217;s contents as a popup.Notice  that the popup here is part of the main page not a separate physical page like  greybox  and from here come the problems i think that using ajax controls toolkit on the page modifying the page life cycle some how. So you start to have unexpected problems regarding data binding  and logic modification during  page events which need great effort in debugging till the page work like expected.</p>
<h2>Greybox  asp.net  installation  and usage:</h2>
<p>Suppose you have a  product catalog(master ) and when the user press on the product image a popup is opened containing the product details(details). Using the grey box in this situation will be very easy you will be surprised by the fast results.</p>
<p>1- <strong>Add an asp.net listview control to the main page containing the list of products </strong>links with each link linking to the product details page by changing the query string  value to the wanted ID&#8217;s (like ~/productdetails.aspx?productid=1)</p>
<p>2-<strong>Create the productdetails page </strong>with a formview control on the page that will display the product details . Remember to configure the sql data  source to  select one record based on the query string parameter passed from the  products list page(make the diameters of the form view 400 * 400 pixels because this will be the diameter of the popup)</p>
<p>3-<strong>copy the greybox folder to your root directory</strong></p>
<p>4-Append following to your header section (in between &lt;header&gt;&#8230;&lt;/header&gt;).</p>
<p>GB_ROOT_DIR is the URL where static files are located:</p>
<p>&lt;script type=&#8221;text/javascript&#8221;&gt;</p>
<p>var GB_ROOT_DIR = &#8220;http://mydomain.com/greybox/&#8221;;</p>
<p>&lt;/script&gt;</p>
<p><span style="text-decoration: underline;">GB_ROOT_DIR should be absolute.</span></p>
<p><strong>5-Append also following scripts and one stylesheet:</strong></p>
<p>&lt;script type=&#8221;text/javascript&#8221; src=&#8221;greybox/AJS.js&#8221;&gt;&lt;/script&gt;</p>
<p>&lt;script type=&#8221;text/javascript&#8221; src=&#8221;greybox/AJS_fx.js&#8221;&gt;&lt;/script&gt;</p>
<p>&lt;script type=&#8221;text/javascript&#8221; src=&#8221;greybox/gb_scripts.js&#8221;&gt;&lt;/script&gt;</p>
<p>&lt;link href=&#8221;greybox/gb_styles.css&#8221; rel=&#8221;stylesheet&#8221; type=&#8221;text/css&#8221; /&gt;</p>
<p>AJS_fx.js is optional, it&#8217;s used for effects. If you don&#8217;t wish effects, then don&#8217;t include AJS_fx.js in your header section.</p>
<p>6-<strong>add a  &#8220;rel=&#8221;gb_page[500, 500]&#8221; attribute to the hyperlink </strong>data bound control inside the main page.this will make the link open the page in the popup window not a normal window</p>
<p>the listview must look like</p>
<p>&lt;/ItemTemplate&gt;</p>
<p>&lt;AlternatingItemTemplate&gt;</p>
<p>&lt;td runat=&#8221;server&#8221; style=&#8221;"&gt;</p>
<p>prodid:</p>
<p>&lt;asp:Label ID=&#8221;prodidLabel&#8221;</p>
<p>runat=&#8221;server&#8221;</p>
<p>Text=&#8217;&lt;%# Eval(&#8220;prodid&#8221;) %&gt;&#8217; /&gt;</p>
<p>&lt;br /&gt;</p>
<p>&lt;/td&gt;</p>
<p>&lt;/AlternatingItemTemplate&gt;</p>
<p>and you are finished when you click on any link the product details will open in a popup window.</p>
<h2>Modal popup control extender setting up and usage:</h2>
<p><strong>1-First you should prepare vwd for asp.net ajax controls toolkit learn how from here</strong></p>
<p><strong>2-As we mentioned before modal popup control extender is not opining a different physical page inside the modal popup instead it just will display the contents of the asp.net panel you select and display it using ajax as a layer over the same window. Here we will use another example (the one i already have on my pc)suppose we hade a list of categories and when the user click on an category image the popup will open containing a grid with each row have a product image and a link .so will make a asp.net page named products.aspx. The page will contain a categories datalist(the example that i have on my pc was before the great listview control) containing a list image buttons (notice not links but button to act as a trigger for the modal popup extender)</strong></p>
<p>the item template code should look like this:</p>
<p>&lt;ItemTemplate&gt;</p>
<p>&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;</p>
<p>&lt;asp:ImageButton ID=&#8221;ImageButton1&#8243; runat=&#8221;server&#8221; CausesValidation=&#8221;False&#8221; CommandName=&#8221;select&#8221;</p>
<p>ImageUrl=&#8217;&lt;%# Eval(&#8220;categorylogostring&#8221;) %&gt;&#8217; Height=&#8221;95px&#8221; Width=&#8221;95px&#8221; ImageAlign=&#8221;Middle&#8221; /&gt;</p>
<p>&amp;nbsp; &amp;nbsp;</p>
<p>&lt;/ItemTemplate&gt;</p>
<p><strong>2-Then we have to add a panel containing the grid view that will present the products:</strong></p>
<p>&lt;asp:Panel ID=&#8221;Panel1&#8243;  runat=&#8221;server&#8221; Height=&#8221;30px&#8221; ScrollBars=&#8221;Auto&#8221;  Style=&#8221;border-left-color: #ff3333;</p>
<p>border-bottom-color: #ff3333; border-top-style: groove; border-top-color: #ff3333; padding:20px;</p>
<p>border-right-style: groove; border-left-style: groove; background-color: black;</p>
<p>border-right-color: #ff3333; border-bottom-style: groove&#8221; Width=&#8221;50px&#8221; &gt;</p>
<p>&lt;asp:GridView ID=&#8221;GridView1&#8243; runat=&#8221;server&#8221; AutoGenerateColumns=&#8221;False&#8221; DataKeyNames=&#8221;linkid&#8221;</p>
<p>DataSourceID=&#8221;ObjectDataSource1&#8243; Style=&#8221;color: #ff0000&#8243; EmptyDataText=&#8221;No available links in this category &#8221;</p>
<p>ShowHeader=&#8221;False&#8221; Width=&#8221;440px&#8221; BorderColor=&#8221;Black&#8221; BorderStyle=&#8221;None&#8221; BackColor=&#8221;Black&#8221; PageSize=&#8221;100&#8243;&gt;</p>
<p>&lt;Columns&gt;</p>
<p>&lt;asp:HyperLinkField DataNavigateUrlFields=&#8221;linkstring&#8221; DataNavigateUrlFormatString=&#8221;http://{0}&#8221;</p>
<p>DataTextField=&#8221;linkstring&#8221;&gt;</p>
<p>&lt;ItemStyle BackColor=&#8221;Black&#8221; BorderColor=&#8221;Black&#8221; BorderStyle=&#8221;None&#8221; ForeColor=&#8221;Red&#8221; /&gt;</p>
<p>&lt;/asp:HyperLinkField&gt;</p>
<p>&lt;asp:ImageField DataImageUrlField=&#8221;linklogostring&#8221; DataImageUrlFormatString=&#8221;~/pictures/linkslogos/{0}&#8221;&gt;</p>
<p>&lt;ControlStyle Height=&#8221;50px&#8221; /&gt;</p>
<p>&lt;ItemStyle BackColor=&#8221;Black&#8221; BorderColor=&#8221;Black&#8221; BorderStyle=&#8221;None&#8221; /&gt;</p>
<p>&lt;/asp:ImageField&gt;</p>
<p>&lt;/Columns&gt;</p>
<p>&lt;/asp:GridView&gt;</p>
<p>&lt;br /&gt;</p>
<p>&lt;asp:Button ID=&#8221;ok&#8221; runat=&#8221;server&#8221; Text=&#8221;ok&#8221; /&gt;&lt;/asp:Panel&gt;</p>
<p><strong>3-we will add a button inside the previous panel  that will act as a close button to close the popup.</strong></p>
<p>&lt;asp:Button ID=&#8221;ok&#8221; runat=&#8221;server&#8221; Text=&#8221;ok&#8221; /&gt;</p>
<p><strong>4-then add the modal popup extender control inside the same panel.</strong></p>
<p>&lt;ajaxToolkit:ModalPopupExtender ID=&#8221;PopupControlExtender1&#8243; runat=&#8221;server&#8221;</p>
<p>PopupControlID=&#8221;panel1&#8243; TargetControlID=&#8221;Button1&#8243; DropShadow=&#8221;false&#8221;</p>
<p>CancelControlID=&#8221;ok&#8221; &gt;</p>
<p>&lt;/ajaxToolkit:ModalPopupExtender&gt;</p>
<p>popupcontrolid is the panel that you want to appear as a popup</p>
<p>targetcontrolid supposed to be the the id of the control that trigger of the popup notice that we will not use it  here you can make it hidden because we will show the poup dynamically from the code behind page using the selected index changed of the categories list as a trigger.</p>
<p>dropshadow use this if you want the main page to darken after the popup open.</p>
<p>cancelcontrolid is id of the button to close the popup.</p>
<p>5-<strong>Then rap the panel that will act as a popup with all it’s contents in an asp.net  ajax update panel and configure it to be triggered by the selected index changed</strong> event of the categories datalist. so when the user press the image button inside the datalist the button trigger the selected index changed event which is assigned as a asynchronous post back event because we added it as a trigger to the update panel so the page won’t refresh and the popup appear on the page.</p>
<p>here is the code of the poup  panel  inside the update panel</p>
<p>&lt;ajax1:UpdatePanel ID=&#8221;UpdatePanel1&#8243; runat=&#8221;server&#8221; ChildrenAsTriggers=&#8221;False&#8221; UpdateMode=&#8221;Conditional&#8221;&gt;</p>
<p>&lt;ContentTemplate&gt;</p>
<p>&lt;asp:Panel ID=&#8221;Panel1&#8243;  runat=&#8221;server&#8221; Height=&#8221;30px&#8221; ScrollBars=&#8221;Auto&#8221;  Style=&#8221;border-left-color: #ff3333;</p>
<p>border-bottom-color: #ff3333; border-top-style: groove; border-top-color: #ff3333; padding:20px;</p>
<p>border-right-style: groove; border-left-style: groove; background-color: black;</p>
<p>border-right-color: #ff3333; border-bottom-style: groove&#8221; Width=&#8221;50px&#8221; &gt;</p>
<p>&amp;nbsp;</p>
<p>&lt;asp:Button ID=&#8221;Button1&#8243; runat=&#8221;server&#8221; BorderStyle=&#8221;None&#8221; Style=&#8221;background-color: #000000&#8243;</p>
<p>Text=&#8221;Button&#8221; /&gt;</p>
<p>&lt;ajaxToolkit:ModalPopupExtender ID=&#8221;PopupControlExtender1&#8243; runat=&#8221;server&#8221;</p>
<p>PopupControlID=&#8221;panel1&#8243; TargetControlID=&#8221;Button1&#8243; DropShadow=&#8221;false&#8221;</p>
<p>BehaviorID=&#8221;mdlPopupFadeIn&#8221;   CancelControlID=&#8221;ok&#8221; &gt;</p>
<p>&lt;/ajaxToolkit:ModalPopupExtender&gt;</p>
<p>&lt;asp:GridView ID=&#8221;GridView1&#8243; runat=&#8221;server&#8221; AutoGenerateColumns=&#8221;False&#8221; DataKeyNames=&#8221;linkid&#8221;</p>
<p>DataSourceID=&#8221;ObjectDataSource1&#8243; Style=&#8221;color: #ff0000&#8243;</p>
<p>EmptyDataText=&#8221;No available links in this category &#8221; ShowHeader=&#8221;False&#8221; Width=&#8221;440px&#8221; BorderColor=&#8221;Black&#8221;</p>
<p>BorderStyle=&#8221;None&#8221; BackColor=&#8221;Black&#8221; PageSize=&#8221;100&#8243;&gt;</p>
<p>&lt;Columns&gt;</p>
<p>&lt;asp:HyperLinkField DataNavigateUrlFields=&#8221;linkstring&#8221; DataNavigateUrlFormatString=&#8221;http://{0}&#8221;</p>
<p>DataTextField=&#8221;linkstring&#8221;&gt;</p>
<p>&lt;ItemStyle BackColor=&#8221;Black&#8221; BorderColor=&#8221;Black&#8221; BorderStyle=&#8221;None&#8221; ForeColor=&#8221;Red&#8221; /&gt;</p>
<p>&lt;/asp:HyperLinkField&gt;</p>
<p>&lt;asp:ImageField DataImageUrlField=&#8221;linklogostring&#8221; DataImageUrlFormatString=&#8221;~/pictures/linkslogos/{0}&#8221;&gt;</p>
<p>&lt;ControlStyle Height=&#8221;50px&#8221; /&gt;</p>
<p>&lt;ItemStyle BackColor=&#8221;Black&#8221; BorderColor=&#8221;Black&#8221; BorderStyle=&#8221;None&#8221; /&gt;</p>
<p>&lt;/asp:ImageField&gt;</p>
<p>&lt;/Columns&gt;</p>
<p>&lt;/asp:GridView&gt;</p>
<p>&lt;/ContentTemplate&gt;</p>
<p>&lt;Triggers&gt;</p>
<p>&lt;ajax1:AsyncPostBackTrigger ControlID=&#8221;DataList2&#8243; EventName=&#8221;SelectedIndexChanged&#8221; /&gt;</p>
<p>&lt;/Triggers&gt;</p>
<p>&lt;/ajax1:UpdatePanel&gt;</p>
<p>6-<strong>last thing we have to add the following code behind to rebind the data base update the update panel and show the popup dynamically.</strong></p>
<p>Protected Sub DataList2_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)</p>
<p>Handles DataList2.SelectedIndexChanged</p>
<p>&#8216; set it to true so it will render</p>
<p>Me.GridView1.Visible = True</p>
<p>&#8216; force databinding</p>
<p>Me.GridView1.DataBind()</p>
<p>&#8216; update the contents in the detail panel</p>
<p>Me.UpdatePanel1.Update()</p>
<p>&#8216; show the modal popup</p>
<p>Me.PopupControlExtender1.Show()</p>
<p>End Sub</p>
<p>oooooooooohhhhhhhhhhhh long exhausting hard to debug code when you compare it with the greybox  but remember it is also fully customizable even if you don’t know anything about javascript. you can control the borders of the popup, the way to close it,,even  animating the popup while opining and closing.</p>
<h2>gerybox performance :</h2>
<p>The performance here  is just so great the full source code of the greybox is about 22kb .it’s browser  compatibility is good it just didn’t work for me with ie6</p>
<p>but overall the performance is so great.</p>
<h2>Modal popup control extender performance:</h2>
<p>Modal popup extender is part of the asp.net ajax controls toolkit  .Using this controls in any  page require uploading many resources file to the visitors computer this files can reach 300kb. so when the user open the page for the first time he have to wait for these files to be saved. sure it is cached to the users computer and won’t need to be downloaded again but if the user has a bad connection speed he may go and don’t comeback again thinking that the website have something wrong.</p>
<p>but with even a medium dsl connection speed no problems and the page will load quite easily.</p>
<h2>Customization of greybox:</h2>
<p>I tried to change any thing in the great greybox because i am not the javascript man and i don’t think it is easy to customize greybox .use it out of the box or leave it.</p>
<h2>customizing modal popup extender:</h2>
<p>it is the strong point of usong modal popup control extender you can control almost every thing even animating the popup any way you want change borders buttons shapes every thing. and the good thing that you change every thing  using a normal asp.net vb.net code without any need to learn javascript.</p>
<p><span style="text-decoration: underline;">The over all result :</span></p>
<p><span style="text-decoration: underline;"><br />
</span></p>
<p><span style="text-decoration: underline;">you have to use greybox whenever possible for the sake of easy installation, less or no coding also superior performance.</span></p>
<p><span style="text-decoration: underline;"><br />
</span></p>
<p><span style="text-decoration: underline;">but when you need to have full control over every thing and customizing the scenario to a very special needs use the modal popup extender specially if you are not the JavaScript guy because you will deal with a very normal asp.net control.</span></p>



Share and Enjoy:


	<a rel="nofollow" id="print"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-ajax-modal-popup%2F&amp;partner=sociable" title="Print"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow" id="digg"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-ajax-modal-popup%2F&amp;title=ASP.NET%20ajax%20modal%20popup&amp;bodytext=popup%20windows%20%C2%A0usage%20is%20one%20of%20the%20every%20day%20tasks%20for%20any%20web%20developer.%20The%20problem%20of%20the%20normal%20html%20simple%20popups%20that%20it%20is%20usually%20blocked%20by%20the%20browser%20of%20the%20client%20also%20it%20is%20not%20attractive%C2%A0specially%20if%20you%20are%20developing%20a%20web%20site%20that" title="Digg"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow" id="sphinn"  href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-ajax-modal-popup%2F" title="Sphinn"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow" id="del.icio.us"  href="http://delicious.com/post?url=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-ajax-modal-popup%2F&amp;title=ASP.NET%20ajax%20modal%20popup&amp;notes=popup%20windows%20%C2%A0usage%20is%20one%20of%20the%20every%20day%20tasks%20for%20any%20web%20developer.%20The%20problem%20of%20the%20normal%20html%20simple%20popups%20that%20it%20is%20usually%20blocked%20by%20the%20browser%20of%20the%20client%20also%20it%20is%20not%20attractive%C2%A0specially%20if%20you%20are%20developing%20a%20web%20site%20that" title="del.icio.us"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" id="facebook"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-ajax-modal-popup%2F&amp;t=ASP.NET%20ajax%20modal%20popup" title="Facebook"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow" id="mixx"  href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-ajax-modal-popup%2F&amp;title=ASP.NET%20ajax%20modal%20popup" title="Mixx"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a>
	<a rel="nofollow" id="google"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-ajax-modal-popup%2F&amp;title=ASP.NET%20ajax%20modal%20popup&amp;annotation=popup%20windows%20%C2%A0usage%20is%20one%20of%20the%20every%20day%20tasks%20for%20any%20web%20developer.%20The%20problem%20of%20the%20normal%20html%20simple%20popups%20that%20it%20is%20usually%20blocked%20by%20the%20browser%20of%20the%20client%20also%20it%20is%20not%20attractive%C2%A0specially%20if%20you%20are%20developing%20a%20web%20site%20that" title="Google Bookmarks"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a  id="blogplay"  href="http://blogplay.com" title="Blogplay"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/blogplay.png" title="Blogplay" alt="Blogplay" class="sociable-hovers" /></a>
	<a rel="nofollow" id="dotnetkicks"  href="http://www.dotnetkicks.com/kick/?url=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-ajax-modal-popup%2F&amp;title=ASP.NET%20ajax%20modal%20popup" title="DotNetKicks"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/dotnetkicks.png" title="DotNetKicks" alt="DotNetKicks" class="sociable-hovers" /></a>
	<a rel="nofollow" id="yahoo!bookmarks"  href="http://bookmarks.yahoo.com/toolbar/savebm?u=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-ajax-modal-popup%2F&amp;t=ASP.NET%20ajax%20modal%20popup&opener=bm&amp;ei=UTF-8&amp;d=popup%20windows%20%C2%A0usage%20is%20one%20of%20the%20every%20day%20tasks%20for%20any%20web%20developer.%20The%20problem%20of%20the%20normal%20html%20simple%20popups%20that%20it%20is%20usually%20blocked%20by%20the%20browser%20of%20the%20client%20also%20it%20is%20not%20attractive%C2%A0specially%20if%20you%20are%20developing%20a%20web%20site%20that" title="Yahoo! Bookmarks"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/yahoomyweb.png" title="Yahoo! Bookmarks" alt="Yahoo! Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow" id="linkedin"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-ajax-modal-popup%2F&amp;title=ASP.NET%20ajax%20modal%20popup&amp;source=Learn+ASP.NET+programming%2Csearch+engine+optimization+and+web+developement+for+biginners.+ASP.net+%2Csearch+engine+optimization+tutorials%2Ccode+examples+and+explanations.&amp;summary=popup%20windows%20%C2%A0usage%20is%20one%20of%20the%20every%20day%20tasks%20for%20any%20web%20developer.%20The%20problem%20of%20the%20normal%20html%20simple%20popups%20that%20it%20is%20usually%20blocked%20by%20the%20browser%20of%20the%20client%20also%20it%20is%20not%20attractive%C2%A0specially%20if%20you%20are%20developing%20a%20web%20site%20that" title="LinkedIn"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow" id="live"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-ajax-modal-popup%2F&amp;title=ASP.NET%20ajax%20modal%20popup" title="Live"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow" id="myspace"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-ajax-modal-popup%2F&amp;t=ASP.NET%20ajax%20modal%20popup" title="MySpace"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow" id="technorati"  href="http://technorati.com/faves?add=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-ajax-modal-popup%2F" title="Technorati"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow" id="twitter"  href="http://twitter.com/home?status=ASP.NET%20ajax%20modal%20popup%20-%20http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-ajax-modal-popup%2F" title="Twitter"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://speakasp.net/blog/index.php/web-developing/asp-net-ajax-modal-popup/feed/</wfw:commentRss>
		<slash:comments>7256</slash:comments>
		</item>
		<item>
		<title>asp.net image upload, resize and save.</title>
		<link>http://speakasp.net/blog/index.php/web-developing/asp-net-programming/asp-net-image-upload/</link>
		<comments>http://speakasp.net/blog/index.php/web-developing/asp-net-programming/asp-net-image-upload/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 22:59:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ASP.NET programming]]></category>
		<category><![CDATA[form view image upload]]></category>
		<category><![CDATA[image thumbnail creation]]></category>
		<category><![CDATA[image upload]]></category>
		<category><![CDATA[save image to data base]]></category>

		<guid isPermaLink="false">http://speakasp.net/blog/?p=13</guid>
		<description><![CDATA[<p>Every day users upload millions of images to web sites allover the world. So image uploading is an every day task for any ASP.NET developer. Handling uploaded images is an easy task which we will discuss in this article. We will follow my sweet philosophy in programming which is trying to minimize the code writing as possible and try to do every thing in the declarative easy way and the result code [...]]]></description>
			<content:encoded><![CDATA[<p>Every day users upload millions of images to web sites allover the world. So image uploading is an every day task for any ASP.NET developer. Handling uploaded images is an easy task which we will discuss in this article. We will follow my sweet philosophy in programming which is trying to minimize the code writing as possible and try to do every thing in the declarative easy way and the result code should work well for small to medium websites.</p>
<h2>Handling image upload in asp.net :</h2>
<p>we will imagine that we are preparing an asp.net website where the  user can submit  his name, address, phone number and sure  his image to be stored on our data base , What is the steps to accomplish the task?</p>
<ul>
<li>First we have the add new user page:</li>
</ul>
<p>1-Sending the image from the client browser to our server (Sure the file should be validated for type and size to avoid security and performance problems).</p>
<p>2-Storing the record that contains the employee information the database (access database in our case) including the image path that we choose. (We will explain later that the image path has to be renamed).</p>
<p>3-Resize the image or create thumbnail from the image if needed.</p>
<p>4-Saving the customized image to the folder we specify on the server with the same new file path that we stored in the data base record, So we can call it again to be presented on data bound asp.net image control .If the name of the uploaded image on the file system was different from that we stored on the database the image won’t be found and will leave an ugly red x mark on the final data presentation page.</p>
<p>5-Inform the employee if the image uploading and data recording is finished or there are problems.</p>
<ul>
<li>Then we have the update page where the user can update his profile info:</li>
</ul>
<p>Which have the general requirement like previous plus that we have to check if the user want to change his profile image. If the user want to change the image he will choose another image then we have to upload the new  image, update the data base with the new name, save the new image to the images folder then delete the old image not to waste disk space.</p>
<ul>
<li>then we have the delete user page:</li>
</ul>
<p>from this page the site admin can delete any user from the data page then after delete the code should search for the deleted user image and delete it also</p>
<h2>ASP.NET upload image code highlights:</h2>
<p>As I want even the beginner asp.net developers to be able to use this code to handle uploaded images. I will describe some important points before starting the step by step tutorial</p>
<ul>
<li>Insert page code highlights :</li>
</ul>
<p>All the images uploaded by employees will be stored in the same folder on the server. Imagine that an employee uploaded an image named (mypicture.png) then after an hour another employee uploaded another image with the same name also (mypicture.png) what will happen?? The server will simply replace the old image with the new one. Then when the first employee opens his profile page he will find another person’s image presented as his image. Sure he will feel that the person who coded this site is drunk or trying to be funny.So how we will solve this problem?1-First we will declare 2 page level string variables to store the new image file path also the thumbnail image file path (we used page level variables here because it can retain it’s same value between different staged of page life cycle so the image path that will be stored to the data base will still the same when we save the images to the server). 2-store to these variables some unique string value that very hard to be repeated like logged employee id which can’t be repeated or the current time millisecond + second + minute , the purpose of this step is to be sure that each image will have a unique file name that can’t repeated .</p>
<p>Dim filenamelarge As String = &#8220;~/employeeimg/&#8221; &amp; DateTime.Now.Millisecond.ToString &amp; DateTime.Now.Second.ToString &amp; DateTime.Now.Minute.ToString</p>
<p>Dim filenamethumb As String = &#8220;~/employeeimg/&#8221; &amp; &#8220;thumb&#8221; &amp; DateTime.Now.Millisecond.ToString &amp; DateTime.Now.Second.ToString &amp; DateTime.Now.Minute.ToString</p>
<p>JUST BE SURE TO PUT THIS CODE JUST UNDER THIS LINE</p>
<p>Inherits System.Web.UI.Page</p>
<p>AND BEFORE ANY EVENT HANDLER SO THE VARIABLE CAN BE ACCESSABLE FROM ANY EVENT HANDLER</p>
<p>3-on formview item inserting event handler read the uploaded image file path that contains the image extension from the image upload control then add it to the page level variables after the unique value we generated above, we are doing so to make the images file path readable to humans for any purpose also to add the image extension from the uploaded image.</p>
<p>Dim fileuploader1 As FileUpload =DirectCast(FormView1.FindControl(&#8220;fileUpload1&#8243;), FileUpload)</p>
<p>If fileuploader1.HasFile Then</p>
<p>filenamelarge = filenamelarge  &amp; (fileuploader1.FileName)</p>
<p>filenamethumb = filenamethumb &amp; (fileuploader1.FileName)</p>
<p>Else</p>
<p>filenamelarge1 = &#8220;&#8221;</p>
<p>filenamesmall1 = &#8220;&#8221;</p>
<p>End If</p>
<p>Here we first find our fileupload1 control that located inside the formview using the findcontrol function then we then we cast it to a file upload type variable so we can access its proprieties Then we check if the employee chooses a file to upload if yes we change auto generated filename by adding the uploaded image filename.4-on the formview item inserting event handler we will inject the new image path we generated and the thumbnail image file path as an access data source parameters values to be stored to the data base with the rest of data.</p>
<p>Dim myaccesdatasource As SqlDataSource = addproduct</p>
<p>mysqldatasource.InsertParameters(&#8220;image&#8221;).DefaultValue = filenamelarge</p>
<p>mysqldatasource.InsertParameters(&#8220;thumbnail&#8221;).DefaultValue = filenamethumb</p>
<p>where image and thumbnail are the columns names of where we want to store the uploaded image and thumbnail  image filepath</p>
<p>5- On the item inserted event handler of the formview we will resize the image, create thumbnail and finally save it to the folder we want with the same names that stored to the data base. There are too many classes available on the internet to resize the images and create thumbnails from the uploaded images. I will work here with a very good class from the( ASP.NET 2.0 instant results) book from Wrox you can buy the book , it is really great book or just download the code for free including this imageresize class from Wrox website. I won’t write it here because I don’t want to violate the copyrights of the book authors.The class accepts three arguments the first is the name of the original file, the second is the name you want to give to the new resized image, the third one is the final image size in pixels.  imageresizer.ResizeImage(Server.MapPath(filenamelarge), _                        Server.MapPath(filenamethumb), 100) This code snippet take the original image file path create thumbnail and save it with the new filenamethumb valueAlso if we want to resize the uploaded image we just pass the filenamelarge and resize it and save it with its image file path and the server just replace the original uploaded image with the new resized version as both have the same exact filename.Like this  imageresizer.ResizeImage(Server.MapPath(filenamelarge), _                        Server.MapPath(filenamelarge), 500)The resized images with this class have acceptable quailty and much more less file size but if you need a higher quality of the resized image you should consider bying a third party image resizing softwere.</p>
<ul>
<li>The update page code highlights:</li>
</ul>
<p>All the code snippest that we used in the add new record page will be used plus checking if a new image is uploaded from the employee to update the data base and delete the old originial image ant old thumbnail then save the new image and generated thumbnail.We will employee the file.delete function to delete the old image and thumbnail after reading their file paths from databound controls inside the asp.net formview . This function accept the full physical path of the file we want to delete(like d:/websites/ourwebsite/wwwroot/employeesimages/employee1.png) and delete it for us. Now we have a trouble we don,t know the physical path of the uploaded saved image on the server, we know only the relative path of these images to our application root (like ~/employeesimages/employee1.png). We will solve this by using the server.mappath function wich convert the relative file path to physical file path that can be used in file operations.     File.Delete(Server.MapPath(oldimageurl))</p>
<ul>
<li> Delete employee page:</li>
</ul>
<p>We will simply delete the image and thumbnail using the same file.delete function in the gridview rowdeleting event handler after getting image and thumbnail file paths from data bound literal controls inside the asp.net gridview item template.</p>
<h2>ASP.NET image upload tutorial:</h2>
<p>We will work here with vwd 2008 sp1, .net framework v 3.5 but the steps should work for all vs or vwd versions from 2005 or above and also can work on .net framework 0.2  Now we will start to create our demo website from scratch step by step also the full demo will be available to download. 1. Create new wesite named image_upload : from the vwd 2008 file menu &gt;&gt; newwebsite &gt;&gt; from vwd templates choose asp.net website and the language to vb.net &gt;&gt; change the name and location like you want2. Create new sql data base : from the vwd website menu choose add new item &gt;&gt; from the templates choose sql server data base &gt;&gt; name it “imageuploaddata” &gt;&gt;  then click ok to add the new data base to your app_data folder.3. Create the  data table : from the vwd solution explorer window expand the app_data folder node you supposed to find the  “imageuploaddata “ data base you added  &gt;&gt;  then double click on the data base to open the vwd database explorer window &gt;&gt;  from the vwd database explorer window expand “imageuploaddata “  node  &gt;&gt; then right click on the tables node and choose add new table4. Design the “imageupload_emptable” table :  for priefcy we will create the table with only four columns  empid, empname ,empiamge and empthumb &gt;&gt; In the desiger insert the table names as After creating the table rows select the “empid” column and press  the small golden key on the upper left side of vwd window to set the empid column as a primary key of the table &gt;&gt; then in the column properties section on the table designer find the “identity specification” node and extend it &gt;&gt; then we have to set the primary key cloumn as an autoincremented field for example 1,2,3,4 to give unique value for each record to do so find the (is identity) properity set it to yes and leave the seed and increment unchanged &gt;&gt; then close the table designer tap &gt;&gt; choose yes to save the changes &gt; &gt; name the new table “imageupload_emptable” then click ok5- create an empty folder named “empimages” to store the uploaded images to5. Create the “image_upload_insert.aspx” page : From the website menu choose “add new item” &gt;&gt; from the vwd templated choose “webform” name the page “image_upload_insert.aspx” then click okDesigning the asp.net image upload insert page:</p>
<ul>
<li>Designing  the image_upload_insert.aspx:</li>
</ul>
<p>Creating the sqldatasource:Open the “image_upload_insert.aspx”  page if it is not opened then switch to the design view  &gt;&gt; from the toolbox drag “sqldatasource” contol and drop it to the page.This will be respnsible for the connection between the data base and the formview that we will add later &gt;&gt;  From the task menu (the small arrow on the right of the sqldatasource)  choose “configure data source”  &gt;&gt;  you will be asked to choose the data connection , Just chose the “imageuploaddata.mdf “ from the list and click next &gt;&gt; you will be asked if you want to save this connection to you web.config file so you can use it any time , name It “image_upload_conec” and click next &gt;&gt; then from the next window choose the “imageupload_emptable” table we created before check on the four fields we created before empid empname empimage empthumb &gt;&gt; then click on the advanced button and check on create delete update and delete button  &gt;&gt; then click next &gt;&gt; on the next window click finishThe designer will add this code to your page</p>
<p>asp:SqlDataSource runat=&#8221;server&#8221;</p>
<p>ConnectionString=&#8221;"</p>
<p>DeleteCommand=&#8221;DELETE FROM [imageupload_emptable] WHERE [empid] = @empid&#8221;</p>
<p>InsertCommand=&#8221;INSERT INTO [imageupload_emptable] ([empname], [empimage], [empthumb]) VALUES (@empname, @empimage, @empthumb)&#8221;</p>
<p>SelectCommand=&#8221;SELECT [empid], [empname], [empimage], [empthumb] FROM [imageupload_emptable]&#8221;</p>
<p>UpdateCommand=&#8221;UPDATE [imageupload_emptable] SET [empname] = @empname, [empimage] = @empimage, [empthumb] = @empthumb WHERE [empid] = @empid&#8221;&gt;</p>
<p>Notice the connection string we choosed above and then the sql comannds for the CRUD (create update and delete) operations  then the parameters section ,also note that the designer didn’t mentioned the empid in the insert sql command and the insert parameters why?? Because it is an autoincrenebted field wich will be added automatically by the data base.</p>
<p>Creating the image upload form view <img src='http://speakasp.net/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> rag a formview from the toolbox to the page &gt;&gt; from its task menu choose the sql data source we created above “image_upload_insert_datasource” &gt;&gt; then press “refresh schema ” to generate the item, insert and update templates of the formview automatically based on the sqldatasource fields,We will customize these templates to fulfil our needs but as a beginners it is a good start to have part of the work done by the vwd &gt;&gt; from the task menu choose the edit templates button &gt;&gt; then from the generated ddl  choose to diplay ”insert item template” &gt;&gt; we will find the formview insert item template look like this  Now we have to customize it because infront of the empimage and empthumb  there are two textboxes the vwd added this text boxes because it finds that these fields accept string values in the sqldatasource parameters ,the vwd don’t know that we will need to upload images and save the images names  to these fields in the data base &gt;&gt; we will remove the text boxes infront of empimage and empthumb &gt;&gt; and also remove the empthumb text itself because the user will upload only one image from the empimage field and the thumbnail will be generated and named dynamically &gt;&gt; aslo we will remove the cancel button because it will be an insert only page &gt;&gt; now drag fileupload control from the toolbox and drop it inside the formview insert template beside the empimage text chane its id to “image_upload_fileuploader”  &gt;&gt; then from the task menu choose “end template editing”  &gt;&gt;  last thing wich is very important  from the formview properties window find the “default mode” and change it to “insert”, this will make the formview open when the page load in the insert mode not the default read only mode &gt;&gt; now we have no more work to be done here</p>
<ul>
<li>here is the full codebehind page:<br />
<hr />&#8216;first declare the page level variables to store the image and thumbnail file path between<br />
&#8216;item inserting and item inserted events of the fromview to make sure that the file path<br />
&#8216;that is stored to the data base is the same that will be used as a filename for the uploaded image&#8217;we add the millisecond second and minute in the begining of image and thumbnail files names to be<br />
&#8216;sure that there won&#8217;t be duplicate files<br />
Dim image_namelarge As String = &#8220;~/empimages/&#8221; &amp; _<br />
DateTime.Now.Millisecond.ToString &amp; DateTime.Now.Second.ToString &amp; DateTime.Now.Minute.ToString<br />
Dim image_namethumb As String = &#8220;~/empimages/&#8221; &amp; &#8220;thumb&#8221; &amp; _<br />
DateTime.Now.Millisecond.ToString &amp; DateTime.Now.Second.ToString &amp; DateTime.Now.Minute.ToString</p>
<hr />protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LoadEnd Sub</p>
<hr />Protected Sub FormView1_ItemInserting(ByVal sender As Object, _<br />
ByVal e As System.Web.UI.WebControls.FormViewInsertEventArgs) _<br />
Handles FormView1.ItemInserting&#8217;Here we first find our fileupload1 control that located inside the formview using the<br />
&#8216;findcontrol function then we then we cast it to a file upload type variable so we can access<br />
&#8216;its(proprieties)<br />
Dim fileuploader As FileUpload = DirectCast(FormView1.FindControl(&#8220;image_upload_fileuploader&#8221;) _<br />
, FileUpload)<br />
&#8216;then check if the user want to upload an image<br />
If fileuploader.HasFile Then<br />
&#8216;now we add the uploaded image extension to the autogenerated name<br />
image_namelarge = image_namelarge + Path.GetExtension(fileuploader.FileName)<br />
image_namethumb = image_namethumb + Path.GetExtension(fileuploader.FileName)<br />
Else<br />
&#8216;or store empty vlaue if the user didn&#8217;t uploaded any images<br />
image_namelarge = &#8220;&#8221;<br />
image_namethumb = &#8220;&#8221;<br />
End If  &#8216; we inject the thumnail file path and the image file path as a parameters default values<br />
&#8216; of our data sourceimage_upload_insert_datasource.InsertParameters(&#8220;empimage&#8221;).DefaultValue = image_namelarge<br />
image_upload_insert_datasource.InsertParameters(&#8220;empthumb&#8221;).DefaultValue = image_namethumb<br />
End Sub</p>
<hr />Protected Sub FormView1_ItemInserted(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.FormViewInsertedEventArgs) Handles FormView1.ItemInserted<br />
&#8216;remember that the page level variables still have the last version of file paths used in<br />
&#8216;item inserting event above.<br />
&#8216;we can still use it here&#8217;Here we first find our fileupload1 control that located inside the formview using the<br />
&#8216;findcontrol function then we then we cast it to a file upload type variable so we can access<br />
&#8216;its(proprieties)<br />
Dim fileuploader As FileUpload = DirectCast(FormView1.FindControl(&#8220;image_upload_fileuploader&#8221;), _<br />
FileUpload)<br />
&#8216;check if the database insert is done by checking number of affected rows<br />
If e.AffectedRows &gt; 0 Then<br />
&#8216;then check if the file uploader has file<br />
If fileuploader.HasFile Then<br />
&#8216;save the original image using the file upload save as method<br />
&#8216;also converting relative path to physical path using server.mappath function<br />
fileuploader.SaveAs(Server.MapPath(image_namelarge))<br />
Try&#8217; Now resize the original image and overwrite the originalwith the resized<br />
imageresizer.ResizeImage(Server.MapPath(image_namelarge), _<br />
Server.MapPath(image_namethumb), 100)<br />
&#8216;then create thumbnail and save it also<br />
imageresizer.ResizeImage(Server.MapPath(image_namelarge), _<br />
Server.MapPath(image_namelarge), 500)<br />
Catch<br />
End TryEnd If&#8217;if every thing is ok hide the formview<br />
FormView1.Visible = False<br />
&#8216;inform the user that insert is done<br />
Panel2.Visible = True<br />
Label1.Text = &#8220;insert is done &#8221;<br />
Else<br />
&#8216;if a problem happened also hide the form view<br />
FormView1.Visible = False<br />
&#8216;and inform the user to come back later ,sure not a good error handling<br />
&#8216;but error handling is not the issue here<br />
Panel2.Visible = True<br />
Label1.Text = &#8220;sorry, an error happend please try again later&#8221;End If<br />
End Sub</p>
<hr />Protected Sub LinkButton2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LinkButton2.Click<br />
&#8216;if the user need to add another item we will just make the formview visible again<br />
&#8216;and data bind it to clear the text box.<br />
Panel2.Visible = False</p>
<p>FormView1.Visible = True<br />
FormView1.DataBind()end subend class</li>
<li>
<h3>i will cotinue the update and delete pages in a few days</h3>
</li>
</ul>
<p>dr AHMED GALAL</p>
<p>ASP.NET FREELANCE DEVELOPER</p>
<p>dr.agalal@speakasp.net</p>



Share and Enjoy:


	<a rel="nofollow" id="print"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-programming%2Fasp-net-image-upload%2F&amp;partner=sociable" title="Print"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow" id="digg"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-programming%2Fasp-net-image-upload%2F&amp;title=asp.net%20image%20upload%2C%20resize%20and%20save.&amp;bodytext=Every%20day%20users%20upload%20millions%20of%C2%A0images%20to%20web%20sites%20allover%20the%20world.%20So%20image%20uploading%20is%20an%20every%20day%20task%20for%20any%20ASP.NET%20developer.%20Handling%20uploaded%20images%20is%20an%20easy%20task%20which%20we%20will%C2%A0discuss%20in%20this%20article.%20We%20will%20follow%20my%20sweet%20phi" title="Digg"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow" id="sphinn"  href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-programming%2Fasp-net-image-upload%2F" title="Sphinn"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow" id="del.icio.us"  href="http://delicious.com/post?url=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-programming%2Fasp-net-image-upload%2F&amp;title=asp.net%20image%20upload%2C%20resize%20and%20save.&amp;notes=Every%20day%20users%20upload%20millions%20of%C2%A0images%20to%20web%20sites%20allover%20the%20world.%20So%20image%20uploading%20is%20an%20every%20day%20task%20for%20any%20ASP.NET%20developer.%20Handling%20uploaded%20images%20is%20an%20easy%20task%20which%20we%20will%C2%A0discuss%20in%20this%20article.%20We%20will%20follow%20my%20sweet%20phi" title="del.icio.us"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" id="facebook"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-programming%2Fasp-net-image-upload%2F&amp;t=asp.net%20image%20upload%2C%20resize%20and%20save." title="Facebook"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow" id="mixx"  href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-programming%2Fasp-net-image-upload%2F&amp;title=asp.net%20image%20upload%2C%20resize%20and%20save." title="Mixx"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a>
	<a rel="nofollow" id="google"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-programming%2Fasp-net-image-upload%2F&amp;title=asp.net%20image%20upload%2C%20resize%20and%20save.&amp;annotation=Every%20day%20users%20upload%20millions%20of%C2%A0images%20to%20web%20sites%20allover%20the%20world.%20So%20image%20uploading%20is%20an%20every%20day%20task%20for%20any%20ASP.NET%20developer.%20Handling%20uploaded%20images%20is%20an%20easy%20task%20which%20we%20will%C2%A0discuss%20in%20this%20article.%20We%20will%20follow%20my%20sweet%20phi" title="Google Bookmarks"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a  id="blogplay"  href="http://blogplay.com" title="Blogplay"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/blogplay.png" title="Blogplay" alt="Blogplay" class="sociable-hovers" /></a>
	<a rel="nofollow" id="dotnetkicks"  href="http://www.dotnetkicks.com/kick/?url=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-programming%2Fasp-net-image-upload%2F&amp;title=asp.net%20image%20upload%2C%20resize%20and%20save." title="DotNetKicks"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/dotnetkicks.png" title="DotNetKicks" alt="DotNetKicks" class="sociable-hovers" /></a>
	<a rel="nofollow" id="yahoo!bookmarks"  href="http://bookmarks.yahoo.com/toolbar/savebm?u=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-programming%2Fasp-net-image-upload%2F&amp;t=asp.net%20image%20upload%2C%20resize%20and%20save.&opener=bm&amp;ei=UTF-8&amp;d=Every%20day%20users%20upload%20millions%20of%C2%A0images%20to%20web%20sites%20allover%20the%20world.%20So%20image%20uploading%20is%20an%20every%20day%20task%20for%20any%20ASP.NET%20developer.%20Handling%20uploaded%20images%20is%20an%20easy%20task%20which%20we%20will%C2%A0discuss%20in%20this%20article.%20We%20will%20follow%20my%20sweet%20phi" title="Yahoo! Bookmarks"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/yahoomyweb.png" title="Yahoo! Bookmarks" alt="Yahoo! Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow" id="linkedin"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-programming%2Fasp-net-image-upload%2F&amp;title=asp.net%20image%20upload%2C%20resize%20and%20save.&amp;source=Learn+ASP.NET+programming%2Csearch+engine+optimization+and+web+developement+for+biginners.+ASP.net+%2Csearch+engine+optimization+tutorials%2Ccode+examples+and+explanations.&amp;summary=Every%20day%20users%20upload%20millions%20of%C2%A0images%20to%20web%20sites%20allover%20the%20world.%20So%20image%20uploading%20is%20an%20every%20day%20task%20for%20any%20ASP.NET%20developer.%20Handling%20uploaded%20images%20is%20an%20easy%20task%20which%20we%20will%C2%A0discuss%20in%20this%20article.%20We%20will%20follow%20my%20sweet%20phi" title="LinkedIn"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow" id="live"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-programming%2Fasp-net-image-upload%2F&amp;title=asp.net%20image%20upload%2C%20resize%20and%20save." title="Live"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow" id="myspace"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-programming%2Fasp-net-image-upload%2F&amp;t=asp.net%20image%20upload%2C%20resize%20and%20save." title="MySpace"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow" id="technorati"  href="http://technorati.com/faves?add=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-programming%2Fasp-net-image-upload%2F" title="Technorati"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow" id="twitter"  href="http://twitter.com/home?status=asp.net%20image%20upload%2C%20resize%20and%20save.%20-%20http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fasp-net-programming%2Fasp-net-image-upload%2F" title="Twitter"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://speakasp.net/blog/index.php/web-developing/asp-net-programming/asp-net-image-upload/feed/</wfw:commentRss>
		<slash:comments>4772</slash:comments>
		</item>
		<item>
		<title>Asp.net search engine optimization -part1: Introduction</title>
		<link>http://speakasp.net/blog/index.php/web-developing/seo/asp-net-search-engine-optimization-seo-part1-introduction/</link>
		<comments>http://speakasp.net/blog/index.php/web-developing/seo/asp-net-search-engine-optimization-seo-part1-introduction/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 22:48:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ASP.NET programming]]></category>
		<category><![CDATA[seo]]></category>

		<guid isPermaLink="false">http://speakasp.net/blog/?p=10</guid>
		<description><![CDATA[<p>You will need first to read some basic SEO overview form here</p> <p>Making a searching engines friendly website is a must for any asp.net developer who want to make a professional money making website .searching engines if treated properly and put in mind through the phases of website creation can drive huge, free and continuous traffic to your website (some studies say “ about 70% of internet traffic is delivered [...]]]></description>
			<content:encoded><![CDATA[<p>You will need first to read some basic SEO overview form here</p>
<p>Making a searching engines friendly website is a must for any asp.net developer who want to make a professional money making website .searching engines if treated properly and put in mind through the phases of website creation can drive huge, free and continuous traffic to your website (some studies say “ about 70% of internet traffic is delivered via searching engines”).</p>
<p>In these series of articles I will illustrate an easy step by step plan that will help a beginner asp.net developer to deliver a Search engine optimization friendly website with very little and simple asp.net code .This plan should be enough for small websites but large enterprise websites will need a much more sophisticated techniques so this articles is targeted to beginner asp.net developers .Higher level developers can find a useful trick here or there but the main audience I target here is beginners and medium level asp.net developers.</p>
<p>Are you curious about Islam and prophet Mohamed (may allah&#8217;s blessings and peace be upon him)??Read from here in your mother language.</p>
<p>What you need to know??</p>
<p>1-basic knowledge of asp.net vb , or asp.net c# (I am not comfortable enough with c# so I will use online tool that can transfer vb.net to c# till I find some c# guy translate it in a good way).</p>
<p>2-basic knowledge of search engine optimization in general: although we will discuss search engine optimization general rules in brief</p>
<p>here</p>
<p>we will not dive deep in this issue because our main concern here in this articles is the asp.net code customization to fulfill search engine optimization requirement but not search engine optimization itself (may be I will prepare another series of articles to explain what I know about search engine optimization).</p>
<p>Equipments:</p>
<p>Visual web developer (VWD) 2005 or 2008 or visual studio( VS ) 2005 or 2008 express or any other paid version.(You can download vwd 2008 express edition free from here ).</p>
<p>*I used vwd 2008 express edition to write the code in this articles but it should apply for any version of the above.</p>
<p>Asp.net search engine optimization technique for small websites broad lines:</p>
<p>First read general seo tips to get general idea about seo</p>
<p>1-setting asp.net page meta tags ( description and keywords tags),page title dynamically based on values from data base,data bound controls or any other string value .</p>
<p>2-adjusting site navigation system to expose every page to searching engines spiders. Also examine and customize the default asp.net paging functionality of the data controls like gridview ,datalist ,listview and repeater.</p>
<p>3-Overview of some advanced techniques.</p>
<p>come after 2 days to read the first article in the series and start play.</p>
<p>DR Ahmed Galal</p>
<p>Egyptian ASP.NET developer</p>
<p>dr.agalal@speakasp.net</p>



Share and Enjoy:


	<a rel="nofollow" id="print"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fseo%2Fasp-net-search-engine-optimization-seo-part1-introduction%2F&amp;partner=sociable" title="Print"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow" id="digg"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fseo%2Fasp-net-search-engine-optimization-seo-part1-introduction%2F&amp;title=Asp.net%20search%20engine%20optimization%20-part1%3A%20Introduction%20&amp;bodytext=You%20will%20need%20first%20to%20read%20some%20basic%20SEO%20overview%20form%20here%0D%0A%0D%0AMaking%20a%20searching%20engines%20friendly%20website%20is%20a%20must%20for%20any%20asp.net%20developer%20who%20want%20to%20make%20a%20professional%20money%20making%20website%20.searching%20engines%20if%20treated%20properly%20and%20put%20in%20mi" title="Digg"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow" id="sphinn"  href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fseo%2Fasp-net-search-engine-optimization-seo-part1-introduction%2F" title="Sphinn"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow" id="del.icio.us"  href="http://delicious.com/post?url=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fseo%2Fasp-net-search-engine-optimization-seo-part1-introduction%2F&amp;title=Asp.net%20search%20engine%20optimization%20-part1%3A%20Introduction%20&amp;notes=You%20will%20need%20first%20to%20read%20some%20basic%20SEO%20overview%20form%20here%0D%0A%0D%0AMaking%20a%20searching%20engines%20friendly%20website%20is%20a%20must%20for%20any%20asp.net%20developer%20who%20want%20to%20make%20a%20professional%20money%20making%20website%20.searching%20engines%20if%20treated%20properly%20and%20put%20in%20mi" title="del.icio.us"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" id="facebook"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fseo%2Fasp-net-search-engine-optimization-seo-part1-introduction%2F&amp;t=Asp.net%20search%20engine%20optimization%20-part1%3A%20Introduction%20" title="Facebook"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow" id="mixx"  href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fseo%2Fasp-net-search-engine-optimization-seo-part1-introduction%2F&amp;title=Asp.net%20search%20engine%20optimization%20-part1%3A%20Introduction%20" title="Mixx"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a>
	<a rel="nofollow" id="google"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fseo%2Fasp-net-search-engine-optimization-seo-part1-introduction%2F&amp;title=Asp.net%20search%20engine%20optimization%20-part1%3A%20Introduction%20&amp;annotation=You%20will%20need%20first%20to%20read%20some%20basic%20SEO%20overview%20form%20here%0D%0A%0D%0AMaking%20a%20searching%20engines%20friendly%20website%20is%20a%20must%20for%20any%20asp.net%20developer%20who%20want%20to%20make%20a%20professional%20money%20making%20website%20.searching%20engines%20if%20treated%20properly%20and%20put%20in%20mi" title="Google Bookmarks"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a  id="blogplay"  href="http://blogplay.com" title="Blogplay"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/blogplay.png" title="Blogplay" alt="Blogplay" class="sociable-hovers" /></a>
	<a rel="nofollow" id="dotnetkicks"  href="http://www.dotnetkicks.com/kick/?url=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fseo%2Fasp-net-search-engine-optimization-seo-part1-introduction%2F&amp;title=Asp.net%20search%20engine%20optimization%20-part1%3A%20Introduction%20" title="DotNetKicks"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/dotnetkicks.png" title="DotNetKicks" alt="DotNetKicks" class="sociable-hovers" /></a>
	<a rel="nofollow" id="yahoo!bookmarks"  href="http://bookmarks.yahoo.com/toolbar/savebm?u=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fseo%2Fasp-net-search-engine-optimization-seo-part1-introduction%2F&amp;t=Asp.net%20search%20engine%20optimization%20-part1%3A%20Introduction%20&opener=bm&amp;ei=UTF-8&amp;d=You%20will%20need%20first%20to%20read%20some%20basic%20SEO%20overview%20form%20here%0D%0A%0D%0AMaking%20a%20searching%20engines%20friendly%20website%20is%20a%20must%20for%20any%20asp.net%20developer%20who%20want%20to%20make%20a%20professional%20money%20making%20website%20.searching%20engines%20if%20treated%20properly%20and%20put%20in%20mi" title="Yahoo! Bookmarks"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/yahoomyweb.png" title="Yahoo! Bookmarks" alt="Yahoo! Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow" id="linkedin"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fseo%2Fasp-net-search-engine-optimization-seo-part1-introduction%2F&amp;title=Asp.net%20search%20engine%20optimization%20-part1%3A%20Introduction%20&amp;source=Learn+ASP.NET+programming%2Csearch+engine+optimization+and+web+developement+for+biginners.+ASP.net+%2Csearch+engine+optimization+tutorials%2Ccode+examples+and+explanations.&amp;summary=You%20will%20need%20first%20to%20read%20some%20basic%20SEO%20overview%20form%20here%0D%0A%0D%0AMaking%20a%20searching%20engines%20friendly%20website%20is%20a%20must%20for%20any%20asp.net%20developer%20who%20want%20to%20make%20a%20professional%20money%20making%20website%20.searching%20engines%20if%20treated%20properly%20and%20put%20in%20mi" title="LinkedIn"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow" id="live"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fseo%2Fasp-net-search-engine-optimization-seo-part1-introduction%2F&amp;title=Asp.net%20search%20engine%20optimization%20-part1%3A%20Introduction%20" title="Live"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow" id="myspace"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fseo%2Fasp-net-search-engine-optimization-seo-part1-introduction%2F&amp;t=Asp.net%20search%20engine%20optimization%20-part1%3A%20Introduction%20" title="MySpace"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow" id="technorati"  href="http://technorati.com/faves?add=http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fseo%2Fasp-net-search-engine-optimization-seo-part1-introduction%2F" title="Technorati"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow" id="twitter"  href="http://twitter.com/home?status=Asp.net%20search%20engine%20optimization%20-part1%3A%20Introduction%20%20-%20http%3A%2F%2Fspeakasp.net%2Fblog%2Findex.php%2Fweb-developing%2Fseo%2Fasp-net-search-engine-optimization-seo-part1-introduction%2F" title="Twitter"><img src="http://speakasp.net/blog/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://speakasp.net/blog/index.php/web-developing/seo/asp-net-search-engine-optimization-seo-part1-introduction/feed/</wfw:commentRss>
		<slash:comments>4579</slash:comments>
		</item>
	</channel>
</rss>

