<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Rana Faisal Munir&#039;s Blog</title>
	<atom:link href="http://ranafaisal.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://ranafaisal.wordpress.com</link>
	<description>The most important thing in this life is to help others to win. Even if that means slowing down and changing our own race.</description>
	<lastBuildDate>Thu, 19 Jan 2012 19:28:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='ranafaisal.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/c10147e116226e4cac60b000e97454e8?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Rana Faisal Munir&#039;s Blog</title>
		<link>http://ranafaisal.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://ranafaisal.wordpress.com/osd.xml" title="Rana Faisal Munir&#039;s Blog" />
	<atom:link rel='hub' href='http://ranafaisal.wordpress.com/?pushpress=hub'/>
		<item>
		<title>2011 in review</title>
		<link>http://ranafaisal.wordpress.com/2012/01/01/2011-in-review/</link>
		<comments>http://ranafaisal.wordpress.com/2012/01/01/2011-in-review/#comments</comments>
		<pubDate>Sun, 01 Jan 2012 08:30:44 +0000</pubDate>
		<dc:creator>ranafaisal</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ranafaisal.wordpress.com/?p=83</guid>
		<description><![CDATA[The WordPress.com stats helper monkeys prepared a 2011 annual report for this blog. Here&#8217;s an excerpt: Madison Square Garden can seat 20,000 people for a concert. This blog was viewed about 68,000 times in 2011. If it were a concert at Madison Square Garden, it would take about 3 sold-out performances for that many people [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ranafaisal.wordpress.com&amp;blog=2395648&amp;post=83&amp;subd=ranafaisal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The WordPress.com stats helper monkeys prepared a 2011 annual report for this blog.</p>
<div style="background:url('/wp-content/mu-plugins/annual-reports/img/emailteaser.jpg') no-repeat center center;height:300px;"></div>
<p>Here&#8217;s an excerpt:</p>
<blockquote><p>Madison Square Garden can seat 20,000 people for a concert. This blog was viewed about <strong>68,000</strong> times in 2011. If it were a concert at Madison Square Garden, it would take about 3 sold-out performances for that many people to see it.</p></blockquote>
<p><a href="/2011/annual-report/">Click here to see the complete report.</a></p>
<br />Filed under: <a href='http://ranafaisal.wordpress.com/category/uncategorized/'>Uncategorized</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ranafaisal.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ranafaisal.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ranafaisal.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ranafaisal.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ranafaisal.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ranafaisal.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ranafaisal.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ranafaisal.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ranafaisal.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ranafaisal.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ranafaisal.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ranafaisal.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ranafaisal.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ranafaisal.wordpress.com/83/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ranafaisal.wordpress.com&amp;blog=2395648&amp;post=83&amp;subd=ranafaisal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ranafaisal.wordpress.com/2012/01/01/2011-in-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c9d9bec2e4bc85793b0d196238fedc91?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ranafaisal</media:title>
		</media:content>
	</item>
		<item>
		<title>HTTP Error 500, An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode</title>
		<link>http://ranafaisal.wordpress.com/2011/08/06/http-error-500-an-asp-net-setting-has-been-detected-that-does-not-apply-in-integrated-managed-pipeline-mode/</link>
		<comments>http://ranafaisal.wordpress.com/2011/08/06/http-error-500-an-asp-net-setting-has-been-detected-that-does-not-apply-in-integrated-managed-pipeline-mode/#comments</comments>
		<pubDate>Sat, 06 Aug 2011 18:43:15 +0000</pubDate>
		<dc:creator>ranafaisal</dc:creator>
				<category><![CDATA[Asp.Net]]></category>

		<guid isPermaLink="false">http://ranafaisal.wordpress.com/?p=80</guid>
		<description><![CDATA[Hi, After 2.5 years, I again started the development in Asp.NET. I developed a site and deployed it on IIS7. As I uploaded the site and access it from browser, I found an error that was saying that HTTP Error 500.24 &#8211; Internal Server Error An ASP.NET setting has been detected that does not apply [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ranafaisal.wordpress.com&amp;blog=2395648&amp;post=80&amp;subd=ranafaisal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>After 2.5 years, I again started the development in Asp.NET. I developed a site and deployed it on IIS7. As I uploaded the site and access it from browser, I found an error that was saying that</p>
<p><strong>HTTP Error 500.24 &#8211; Internal Server Error</strong></p>
<p><strong>An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode</strong></p>
<p>After some googling, I found the solution of this error. This error needs one line of configuration that should be added in Web.Config file. This is</p>
<p><span style="color:#ff0000;">&lt;system.webServer&gt;</span><br />
<span style="color:#ff0000;">        <strong>&lt;validation validateIntegratedModeConfiguration=&#8221;false&#8221; /&gt;</strong></span></p>
<p><span style="color:#ff0000;">&lt;/system.webServer&gt;</span></p>
<p>Hopefully, this article help you.</p>
<p>&nbsp;</p>
<p>Regards,</p>
<p>Rana Faisal Munir</p>
<br />Filed under: <a href='http://ranafaisal.wordpress.com/category/aspnet/'>Asp.Net</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ranafaisal.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ranafaisal.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ranafaisal.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ranafaisal.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ranafaisal.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ranafaisal.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ranafaisal.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ranafaisal.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ranafaisal.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ranafaisal.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ranafaisal.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ranafaisal.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ranafaisal.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ranafaisal.wordpress.com/80/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ranafaisal.wordpress.com&amp;blog=2395648&amp;post=80&amp;subd=ranafaisal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ranafaisal.wordpress.com/2011/08/06/http-error-500-an-asp-net-setting-has-been-detected-that-does-not-apply-in-integrated-managed-pipeline-mode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c9d9bec2e4bc85793b0d196238fedc91?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ranafaisal</media:title>
		</media:content>
	</item>
		<item>
		<title>Ethical Hacking Practical Tutorials [Part 1]</title>
		<link>http://ranafaisal.wordpress.com/2011/07/11/ethical-hacking-practical-tutorial-part-1/</link>
		<comments>http://ranafaisal.wordpress.com/2011/07/11/ethical-hacking-practical-tutorial-part-1/#comments</comments>
		<pubDate>Mon, 11 Jul 2011 20:57:41 +0000</pubDate>
		<dc:creator>ranafaisal</dc:creator>
				<category><![CDATA[Ethical Hacking]]></category>

		<guid isPermaLink="false">http://ranafaisal.wordpress.com/?p=75</guid>
		<description><![CDATA[Hi, Today, I want to start the writing on the ethical hacking. But before going to further in the Ethical Hacking Course, I introduced myself once again. I am Rana Faisal Munir, working on Semantic based Web Application Firewall at SEECS-NUST, Islamabad as a Web Application Security Researcher. My research work is to analyze the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ranafaisal.wordpress.com&amp;blog=2395648&amp;post=75&amp;subd=ranafaisal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>Today, I want to start the writing on the ethical hacking. But before going to further in the Ethical Hacking Course, I introduced myself once again. I am Rana Faisal Munir, working on Semantic based Web Application Firewall at SEECS-NUST, Islamabad as a Web Application Security Researcher. My research work is to analyze the web application attacks, and how effectively we can detect them.  During my study on the web application attacks, I also practically launched these attacks manually or by using different tools. I also used my skills for penetration testing.</p>
<p>I start this series of tutorial to share my experience with you guys, so that you can used my knowledge to test your site for potential vulnerabilities and how you can fix them to make your site secure.</p>
<p>In this Ethical Hacking course, we will cover the following topics</p>
<ol>
<li>Understanding of Web Application as an Attacker Point of View</li>
<li>Information Gathering</li>
<li>Cross Site Scripting Attack</li>
<ol>
<li>Reflected</li>
<li>Stored</li>
</ol>
<li>SQL Injection Attack</li>
<li>Local and Remote File Inclusion</li>
<li>Shell Uploading</li>
<li>Cross Site Request Forgery Attack</li>
<li>Parameter Manipulation</li>
<li>Session Fixation</li>
<li>Brute Force Attack</li>
<li>AJAX Testing</li>
<li>Use of Intermediate Proxy</li>
<li>Use of Vulnerabilities Scanners</li>
<li>Use of Exploitation Tools [Metasploit]</li>
</ol>
<p>Regards</p>
<p>Rana Faisal Munir</p>
<br />Filed under: <a href='http://ranafaisal.wordpress.com/category/ethical-hacking/'>Ethical Hacking</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ranafaisal.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ranafaisal.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ranafaisal.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ranafaisal.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ranafaisal.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ranafaisal.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ranafaisal.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ranafaisal.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ranafaisal.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ranafaisal.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ranafaisal.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ranafaisal.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ranafaisal.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ranafaisal.wordpress.com/75/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ranafaisal.wordpress.com&amp;blog=2395648&amp;post=75&amp;subd=ranafaisal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ranafaisal.wordpress.com/2011/07/11/ethical-hacking-practical-tutorial-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c9d9bec2e4bc85793b0d196238fedc91?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ranafaisal</media:title>
		</media:content>
	</item>
		<item>
		<title>SEECS Open House</title>
		<link>http://ranafaisal.wordpress.com/2011/06/22/seecs-open-house/</link>
		<comments>http://ranafaisal.wordpress.com/2011/06/22/seecs-open-house/#comments</comments>
		<pubDate>Wed, 22 Jun 2011 12:46:39 +0000</pubDate>
		<dc:creator>ranafaisal</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://ranafaisal.wordpress.com/?p=71</guid>
		<description><![CDATA[Hi, After a long time, Now I again start the writing. I stopped writing because I start MS from NUST. That&#8217;s why I leave the .NET development and start working on Web Application Security as my Research Thesis. Today, I am writing on the SEECS Open House. I visited it and according to my research [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ranafaisal.wordpress.com&amp;blog=2395648&amp;post=71&amp;subd=ranafaisal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>After a long time, Now I again start the writing. I stopped writing because I start MS from NUST. That&#8217;s why I leave the .NET development and start working on Web Application Security as my Research Thesis.</p>
<p>Today, I am writing on the SEECS Open House. I visited it and according to my research interest, visit the different student projects.  I SAW many security related projects, some of them are</p>
<ul>
<li>Web Application Scanner for Web 2.0 Attacks</li>
<li>Detecting Application Layer DDoS</li>
<li>Rootkit Development and Detection</li>
<li>Botnet Developement</li>
</ul>
<p>I liked these projects and appreciate students efforts. But today I want to discuss a project that catch my attention. It is about Botnet, student developed his own BOTNET server and then through a trojan, infect the clients machine. Then he can control all machines from the Server. The trojan hide its process, but the things that I like most, it hides the traffic that he used to communicate with server. User can use any sniffer like wireshark to see the traffic, but he did not sniff the traffic of botnet.  This is uniqueness that student shows in his Final Year Project.</p>
<p>The best industry project of SEECS open house is not related to Security <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> . but I liked the student presentation and their innovative work.</p>
<p>Regards</p>
<p>Rana Faisal Munir</p>
<br />Filed under: <a href='http://ranafaisal.wordpress.com/category/general/'>General</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ranafaisal.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ranafaisal.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ranafaisal.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ranafaisal.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ranafaisal.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ranafaisal.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ranafaisal.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ranafaisal.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ranafaisal.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ranafaisal.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ranafaisal.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ranafaisal.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ranafaisal.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ranafaisal.wordpress.com/71/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ranafaisal.wordpress.com&amp;blog=2395648&amp;post=71&amp;subd=ranafaisal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ranafaisal.wordpress.com/2011/06/22/seecs-open-house/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c9d9bec2e4bc85793b0d196238fedc91?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ranafaisal</media:title>
		</media:content>
	</item>
		<item>
		<title>Disabling browser&#8217;s back functionality on logout from Asp.Net</title>
		<link>http://ranafaisal.wordpress.com/2009/02/20/disabling-browsers-back-functionality-on-logout-from-aspnet/</link>
		<comments>http://ranafaisal.wordpress.com/2009/02/20/disabling-browsers-back-functionality-on-logout-from-aspnet/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 10:07:05 +0000</pubDate>
		<dc:creator>ranafaisal</dc:creator>
				<category><![CDATA[Asp.Net]]></category>
		<category><![CDATA[C#.Net]]></category>
		<category><![CDATA[Disable back button]]></category>
		<category><![CDATA[disable cache for a page]]></category>
		<category><![CDATA[disable the cache]]></category>
		<category><![CDATA[secure the pages to view using back button]]></category>

		<guid isPermaLink="false">http://ranafaisal.wordpress.com/?p=36</guid>
		<description><![CDATA[Hi, Today I come with a pretty cool problem or say requirement that our client demand from us. He want, when a user sign out from our site then he will redirect to home page and if he try the back button then the back page should not opened. Because that page is secure page [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ranafaisal.wordpress.com&amp;blog=2395648&amp;post=36&amp;subd=ranafaisal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>Today I come with a pretty cool problem or say requirement that our client demand from us. He want, when a user sign out from our site then he will redirect to home page and if he try the back button then the back page should not opened. Because that page is secure page and we have to disable the back button.</p>
<p>I search it and found a good solution.</p>
<p>When we request any page from server, browser maintains its cache in local system. When user press back button the cached page opened in front of user.</p>
<p>Its mean we have to disable the cache functionality for our session pages. So for this you have to insert this code into &#8220;<strong>Page_Load</strong>&#8221; event of the session page or to master page that is used for secure pages.</p>
<p><span style="color:#ff0000;">Response.Buffer= true;<br />
Response.ExpiresAbsolute=DateTime.Now.AddDays(-1d);<br />
Response.Expires =-1500;<br />
Response.CacheControl = &#8220;no-cache&#8221;;<br />
if(Session["SessionId"] == null)<br />
{<br />
Response.Redirect (&#8220;Home.aspx&#8221;);<br />
}<br />
}</span></p>
<p>This code just disable the cache for current page and save this page in buffer.</p>
<p>And buffer is maintained in memory so when user logout the buffer will<br />
destroy and no backup copy of that page available to view.</p>
<p>So its mean we successfully disable the back button.</p>
<p>Regards</p>
<p>Rana Faisal Munir</p>
<p><span style="color:#ff0000;"><span style="font-family:Arial;"><span style="font-family:Arial;"><span style="font-family:Arial;"><span style="font-family:Arial;"><span style="font-family:Arial;"><span style="font-family:Arial;"><span style="font-family:Arial;"><span style="font-family:Arial;"><span style="font-family:Arial;"><span style="font-family:Arial;"><span style="font-family:Arial;"><span style="font-family:Arial;"><span style="font-family:Arial;"><span style="font-family:Arial;"><span style="font-family:Arial;"><span style="font-family:Arial;"></p>
<pre style="margin-top:0;"><span style="color:#000000;">
</span></pre>
<p></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></p>
<br />Posted in Asp.Net, C#.Net Tagged: Disable back button, disable cache for a page, disable the cache, secure the pages to view using back button <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ranafaisal.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ranafaisal.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ranafaisal.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ranafaisal.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ranafaisal.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ranafaisal.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ranafaisal.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ranafaisal.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ranafaisal.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ranafaisal.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ranafaisal.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ranafaisal.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ranafaisal.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ranafaisal.wordpress.com/36/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ranafaisal.wordpress.com&amp;blog=2395648&amp;post=36&amp;subd=ranafaisal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ranafaisal.wordpress.com/2009/02/20/disabling-browsers-back-functionality-on-logout-from-aspnet/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c9d9bec2e4bc85793b0d196238fedc91?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ranafaisal</media:title>
		</media:content>
	</item>
		<item>
		<title>Dynamically adding / removing textboxes in ASP.NET Repeater</title>
		<link>http://ranafaisal.wordpress.com/2009/02/17/dynamically-adding-removing-textboxes-in-aspnet-repeater/</link>
		<comments>http://ranafaisal.wordpress.com/2009/02/17/dynamically-adding-removing-textboxes-in-aspnet-repeater/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 09:50:26 +0000</pubDate>
		<dc:creator>ranafaisal</dc:creator>
				<category><![CDATA[Asp.Net]]></category>
		<category><![CDATA[C#.Net]]></category>
		<category><![CDATA[Dynaimically add textboxes]]></category>
		<category><![CDATA[Dynamically add control to repeater]]></category>

		<guid isPermaLink="false">http://ranafaisal.wordpress.com/?p=30</guid>
		<description><![CDATA[Hi, Sorry for delay. This delay because of that I again start the education after 1 year of web development.  But now I again start the development and want to share something new that I did for my BOSS. Requirements: We have to make HR (Human Resource) components for some organization. Our client demanded that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ranafaisal.wordpress.com&amp;blog=2395648&amp;post=30&amp;subd=ranafaisal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>Sorry for delay. This delay because of that I again start the education after 1 year of web development.  But now I again start the development and want to share something new that I did for my BOSS.</p>
<p><strong>Requirements:</strong></p>
<p>We have to make HR (Human Resource) components for some organization. Our client demanded that his client can entered multiple degrees. In start we only have text boxes for only one degree but when user press add another we must add other fields dynamically and maintain the contents of old degrees and change the buttons to remove for them and for new add and empty fields appeared.</p>
<p><strong>Solution:</strong></p>
<p>We have two solutions to solve this problem.</p>
<p>One is to use JavaScript [ But I hate it <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ]</p>
<p>So I use repeater and DataSet to gain the same functionality that our client wanted.</p>
<p>We have a page on which we add repeater</p>
<p><strong>Page Name:</strong> Default.aspx</p>
<p><span style="color:#ff0000;">&lt;%@ Page Language=&#8221;C#&#8221; AutoEventWireup=&#8221;true&#8221; CodeFile=&#8221;Default.aspx.cs&#8221; Inherits=&#8221;_Default&#8221; %&gt;</span></p>
<p><span style="color:#ff0000;">&lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;&gt;</span></p>
<p><span style="color:#ff0000;">&lt;html xmlns=&#8221;http://www.w3.org/1999/xhtml&#8221; &gt;<br />
&lt;head runat=&#8221;server&#8221;&gt;<br />
&lt;title&gt;Untitled Page&lt;/title&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;form id=&#8221;form1&#8243; runat=&#8221;server&#8221;&gt;<br />
&lt;div&gt;<br />
&lt;asp:Repeater ID=&#8221;Repeater1&#8243; runat=&#8221;server&#8221; OnItemCommand=&#8221;Repeater1_ItemCommand&#8221; OnItemDataBound=&#8221;Repeater1_ItemDataBound&#8221;&gt;<br />
&lt;HeaderTemplate&gt;<br />
&lt;table&gt;<br />
&lt;tr&gt;<br />
&lt;th&gt;Book Title&lt;/th&gt;<br />
&lt;th&gt;Book ISBN&lt;/th&gt;<br />
&lt;/tr&gt;</span></p>
<p><span style="color:#ff0000;">&lt;/HeaderTemplate&gt;<br />
&lt;ItemTemplate&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;<br />
&lt;asp:TextBox ID=&#8221;txtBookTitle&#8221; runat=&#8221;server&#8221; Text=&#8217;&lt;%# DataBinder.Eval(Container.DataItem, &#8220;Title&#8221;) %&gt;&#8217;&gt;&lt;/asp:TextBox&gt;<br />
&lt;/td&gt;<br />
&lt;td&gt;<br />
&lt;asp:TextBox ID=&#8221;txtISBN&#8221; runat=&#8221;server&#8221; Text=&#8217;&lt;%# DataBinder.Eval(Container.DataItem, &#8220;Isbn&#8221;) %&gt;&#8217;&gt;&lt;/asp:TextBox&gt;<br />
&lt;/td&gt;<br />
&lt;td&gt;<br />
&lt;asp:Button ID=&#8221;btnAddAnother&#8221; runat=&#8221;server&#8221; Text=&#8217;&lt;%# DataBinder.Eval(Container.DataItem, &#8220;Button&#8221;) %&gt;&#8217; CommandName=&#8217;&lt;%# DataBinder.Eval(Container.DataItem, &#8220;Button&#8221;) %&gt;&#8217; /&gt;<br />
&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;/ItemTemplate&gt;<br />
&lt;FooterTemplate&gt;<br />
&lt;/table&gt;<br />
&lt;/FooterTemplate&gt;<br />
&lt;/asp:Repeater&gt;<br />
&lt;/div&gt;<br />
&lt;/form&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</span></p>
<p>In ITEMTEMPLATE of repeater we add the text boxes and a button, we also set the text for text boxes to maintain their  values. For button set the command and text because I want to change this in &#8220;Remove&#8221; when new one is added.</p>
<p>Now on the backend coding page we have to write this code</p>
<p><strong>Page Name:</strong> Default.aspx.cs</p>
<p><span style="color:#ff0000;">using System;<br />
using System.Data;<br />
using System.Configuration;<br />
using System.Collections;<br />
using System.Web;<br />
using System.Web.Security;<br />
using System.Web.UI;<br />
using System.Web.UI.WebControls;<br />
using System.Web.UI.WebControls.WebParts;<br />
using System.Web.UI.HtmlControls;</span></p>
<p><span style="color:#ff0000;">public partial class _Default : System.Web.UI.Page<br />
{<br />
DataSet dsDummy =  null; //dummy dataset use for repeater<br />
DataTable tbDummy = null; //dummy table for dataset<br />
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
// Intitalization<br />
dsDummy = new DataSet();<br />
tbDummy = new DataTable();<br />
//Only first time of page load<br />
if (!Page.IsPostBack)<br />
{</span></p>
<p><span style="color:#ff0000;">AddColumns();</span></p>
<p><span style="color:#ff0000;">//Add dummy row to table<br />
tbDummy.Rows.Add(&#8220;&#8221;,&#8221;",&#8221;Add&#8221;);</span></p>
<p><span style="color:#ff0000;">BindWithRepeater();<br />
}<br />
}</span></p>
<p><span style="color:#000000;"> On Page load we add our required columns and set the row to empty as u see and then bind this to repeater. So in initially we add only one row so only one row of text boxes is appeared.</span></p>
<p>protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)<span style="color:#ff0000;"><br />
{<br />
int Total = Repeater1.Items.Count; //get total items in repeater<br />
if (e.CommandName == &#8220;Add&#8221;)<br />
{<br />
Total = Total + 1; //increase 1 because of add</span></p>
<p><span style="color:#ff0000;">AddColumns();</span></p>
<p><span style="color:#ff0000;">foreach (RepeaterItem item in Repeater1.Items)<br />
{<br />
//getting the values of user entered fields<br />
string title = ((TextBox)item.FindControl(&#8220;txtBookTitle&#8221;)).Text;<br />
string isbn = ((TextBox)item.FindControl(&#8220;txtISBN&#8221;)).Text;<br />
Button btnAdd = ((Button)item.FindControl(&#8220;btnAddAnother&#8221;));</span></p>
<p><span style="color:#ff0000;">//now change button text to remove, and save user entered values in table<br />
tbDummy.Rows.Add(title, isbn, &#8220;Remove&#8221;);</span></p>
<p><span style="color:#ff0000;">}</span></p>
<p><span style="color:#ff0000;">//Add dummy row, because we need to increase<br />
tbDummy.Rows.Add(&#8220;&#8221;, &#8220;&#8221;, &#8220;Add&#8221;);</span></p>
<p><span style="color:#ff0000;">BindWithRepeater();<br />
}<br />
else if (e.CommandName == &#8220;Remove&#8221;)<br />
{<br />
Total = Total &#8211; 1;<br />
tbDummy.Columns.Add(&#8220;Title&#8221;);<br />
tbDummy.Columns.Add(&#8220;Isbn&#8221;);<br />
tbDummy.Columns.Add(&#8220;Button&#8221;);</span></p>
<p><span style="color:#ff0000;">foreach (RepeaterItem item in Repeater1.Items)<br />
{<br />
Button btnAdd = ((Button)item.FindControl(&#8220;btnAddAnother&#8221;));<br />
if (btnAdd != e.CommandSource) //the current row on which user click will removed<br />
{<br />
string title = ((TextBox)item.FindControl(&#8220;txtBookTitle&#8221;)).Text;<br />
string isbn = ((TextBox)item.FindControl(&#8220;txtISBN&#8221;)).Text;</span></p>
<p><span style="color:#ff0000;">if (btnAdd.Text == &#8220;Remove&#8221;)<br />
{<br />
tbDummy.Rows.Add(title, isbn, &#8220;Remove&#8221;);<br />
}<br />
else<br />
{<br />
tbDummy.Rows.Add(title, isbn, &#8220;Add&#8221;);<br />
}<br />
}</span></p>
<p><span style="color:#ff0000;">}</span></p>
<p><span style="color:#ff0000;">BindWithRepeater();<br />
}<br />
}</span><br />
<span style="color:#000000;"><br />
In ItemCommand, we have to tackle both Add and Remove functionality. So we did this by checking command. And you see when We add the row to table we add the previous entry by getting it from repeater and adding only one for new.</span></p>
<p><span style="color:#ff0000;"><span style="color:#000000;"><br />
Similarly when we remove we have to check that the button that is clicked. So we check this by a condition compare with sender if not equal then we add it in table and just not adding that one on which user click remove. So by doing this we automatically remove the one row.</span><br />
</span></p>
<p><span style="color:#ff0000;"> private void AddColumns()<br />
{<br />
//Add 3 dummy coloumn, this can be increase on our need basis<br />
tbDummy.Columns.Add(&#8220;Title&#8221;);<br />
tbDummy.Columns.Add(&#8220;Isbn&#8221;);<br />
tbDummy.Columns.Add(&#8220;Button&#8221;);<br />
}</span></p>
<p><span style="color:#ff0000;">private void BindWithRepeater()<br />
{<br />
//add this table to dataset<br />
dsDummy.Tables.Add(tbDummy);</span></p>
<p><span style="color:#ff0000;">//bind this dataset to repeater<br />
Repeater1.DataSource = dsDummy;<br />
Repeater1.DataBind();<br />
}<br />
protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e)<br />
{</span></p>
<p><span style="color:#ff0000;">}<br />
}</span></p>
<p>That&#8217;s it. This is not much good programming practice But I think good to do thing quickly under work load and tight deadline.</p>
<p>Now one request, Just Pray for ME <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Regards</p>
<p>Rana Faisal Munir</p>
<br />Posted in Asp.Net, C#.Net Tagged: Dynaimically add textboxes, Dynamically add control to repeater <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ranafaisal.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ranafaisal.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ranafaisal.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ranafaisal.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ranafaisal.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ranafaisal.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ranafaisal.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ranafaisal.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ranafaisal.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ranafaisal.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ranafaisal.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ranafaisal.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ranafaisal.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ranafaisal.wordpress.com/30/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ranafaisal.wordpress.com&amp;blog=2395648&amp;post=30&amp;subd=ranafaisal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ranafaisal.wordpress.com/2009/02/17/dynamically-adding-removing-textboxes-in-aspnet-repeater/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c9d9bec2e4bc85793b0d196238fedc91?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ranafaisal</media:title>
		</media:content>
	</item>
		<item>
		<title>Dynamically add control to placeholder inside updatepanel</title>
		<link>http://ranafaisal.wordpress.com/2008/07/26/dynamically-add-control-to-placeholder-inside-updatepanel/</link>
		<comments>http://ranafaisal.wordpress.com/2008/07/26/dynamically-add-control-to-placeholder-inside-updatepanel/#comments</comments>
		<pubDate>Sat, 26 Jul 2008 11:30:14 +0000</pubDate>
		<dc:creator>ranafaisal</dc:creator>
				<category><![CDATA[Asp.Net]]></category>
		<category><![CDATA[Dynamaially add control to update panel]]></category>
		<category><![CDATA[Dynamically add control to place holder]]></category>
		<category><![CDATA[LinkButton inside UpdatePanel results in full postback]]></category>
		<category><![CDATA[UpdatePanel not triggered]]></category>

		<guid isPermaLink="false">http://ranafaisal.wordpress.com/?p=24</guid>
		<description><![CDATA[Hi, In this post I come a solution of a problem that I face in my last web application. In my application I need to generate linkbutton dynamically and add them in place holder that is inside an updatepanel. But problem is that after adding the control when I click on link button, it give [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ranafaisal.wordpress.com&amp;blog=2395648&amp;post=24&amp;subd=ranafaisal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>In this post I come a solution of a problem that I face in my last web application. In my application I need to generate linkbutton dynamically and add them in place holder that is inside an updatepanel. But problem is that after adding the control when I click on link button, it give me full postback. Mean no ajax is implemented.</p>
<p>I found a very simple solution for this.</p>
<p><strong>Step 1: How To Generate LinkButton Dynamically</strong></p>
<p>Here is code<br />
<span style="color:#339966;">LinkButton lnkAnyName = new LinkButton();</span></p>
<p><span style="color:#339966;">lnkAnyName .Text = &#8220;Any Title&#8221;;</span></p>
<p><span style="color:#339966;">lnkAnyName .Click += new EventHandler(lnkAnyName_Click);</span></p>
<p><span style="color:#339966;"> PlaceHolderName.Controls.Add(lnkAnyName );</span></p>
<p>This code add the link button but when you click on itm it post back the page.</p>
<p><strong>Step 2: Perform LinkButton Action Asynchronously </strong></p>
<p>Here I again write the above code but with one change</p>
<p><span style="color:#339966;"> LinkButton lnkAnyName = new LinkButton();</span></p>
<p><span style="color:#339966;">lnkAnyName .Text = &#8220;Any Title&#8221;;</span></p>
<p><span style="color:#339966;"><br />
</span><span style="color:#339966;"> lnkAnyName .ID= &#8220;Any Unique Id&#8221;; <span style="color:#ff0000;">//This is that we are missing here</span><br />
</span></p>
<p><span style="color:#339966;"><br />
lnkAnyName .Click += new EventHandler(lnkAnyName_Click);<br />
</span></p>
<p><span style="color:#339966;"> PlaceHolderName.Controls.Add(lnkAnyName );</span></p>
<p>Now check your link button, It will not post back. You solve the issue.</p>
<p>Please remember one thing, your place holder must be inside Update Panel. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Thanks</p>
<p>Pray For Me</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/ranafaisal.wordpress.com/24/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/ranafaisal.wordpress.com/24/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ranafaisal.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ranafaisal.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ranafaisal.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ranafaisal.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ranafaisal.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ranafaisal.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ranafaisal.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ranafaisal.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ranafaisal.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ranafaisal.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ranafaisal.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ranafaisal.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ranafaisal.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ranafaisal.wordpress.com/24/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ranafaisal.wordpress.com&amp;blog=2395648&amp;post=24&amp;subd=ranafaisal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ranafaisal.wordpress.com/2008/07/26/dynamically-add-control-to-placeholder-inside-updatepanel/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c9d9bec2e4bc85793b0d196238fedc91?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ranafaisal</media:title>
		</media:content>
	</item>
		<item>
		<title>Create Thumbnail in C#</title>
		<link>http://ranafaisal.wordpress.com/2008/07/11/create-thumbnail-in-c/</link>
		<comments>http://ranafaisal.wordpress.com/2008/07/11/create-thumbnail-in-c/#comments</comments>
		<pubDate>Fri, 11 Jul 2008 11:28:28 +0000</pubDate>
		<dc:creator>ranafaisal</dc:creator>
				<category><![CDATA[Asp.Net]]></category>
		<category><![CDATA[C#.Net]]></category>
		<category><![CDATA[C# Thumbnail]]></category>
		<category><![CDATA[Image Thumbnail]]></category>
		<category><![CDATA[Thumbnail]]></category>

		<guid isPermaLink="false">http://ranafaisal.wordpress.com/?p=22</guid>
		<description><![CDATA[Hi, This is very simple class that I used to generate thumbnail of images. You just pass it file name. It generate the thumbnail from file and store it in thumbnail folder. You can change width and height. And path of original image and thumbnail image. Better way is to store path in web.config file [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ranafaisal.wordpress.com&amp;blog=2395648&amp;post=22&amp;subd=ranafaisal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>This is very simple class that I used to generate thumbnail of images. You just pass it file name. It generate the thumbnail from file and store it in thumbnail folder. You can change width and height. And path of original image and thumbnail image. Better way is to store path in web.config file and access here.</p>
<p><span style="color:#0000ff;">using System;<br />
using System.Data;<br />
using System.Configuration;<br />
using System.Web;<br />
using System.Web.Security;<br />
using System.Web.UI;<br />
using System.Web.UI.WebControls;<br />
using System.Web.UI.WebControls.WebParts;<br />
using System.Web.UI.HtmlControls;<br />
using System.Drawing;</span></p>
<p><span style="color:#008000;">/// &lt;summary&gt;<br />
/// Summary description for Thumbnail<br />
/// &lt;/summary&gt;</span><br />
<span style="color:#ff0000;">public class Thumbnail<br />
{<br />
private int Width = 100;<br />
private int Height = 100;<br />
string ThumbFolderPath = &#8220;~/Contents/Thumb/&#8221;;<br />
string OriginalFolderPath = &#8220;~/Contents/Images/&#8221;;</p>
<p>public Thumbnail()<br />
{<br />
//<br />
// TODO: Add constructor logic here<br />
//<br />
}</p>
<p>public bool GenerateThumbnail(string fileName)<br />
{<br />
try<br />
{<br />
<span style="color:#008000;"> //Get The Image From File</span><br />
System.Drawing.Image OriginalImage = System.Drawing.Image.FromFile(HttpContext.Current.Server.MapPath(OriginalFolderPath + fileName));<br />
//Create ITs Thumbnail<br />
System.Drawing.Image ThumbImage = OriginalImage.GetThumbnailImage(Width, Height, null, new System.IntPtr());<br />
<span style="color:#008000;">//Store It in Thumbnail Folder</span><br />
ThumbImage.Save(HttpContext.Current.Server.MapPath(ThumbFolderPath + fileName));</p>
<p>return true;<br />
}<br />
catch<br />
{<br />
return false;<br />
}<br />
}<br />
}</span></p>
<p>Thanks</p>
<p>Rana Faisal Munir</p>
<p>Asp.Net Developer</p>
<p>Relax Solutions</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/ranafaisal.wordpress.com/22/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/ranafaisal.wordpress.com/22/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ranafaisal.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ranafaisal.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ranafaisal.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ranafaisal.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ranafaisal.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ranafaisal.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ranafaisal.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ranafaisal.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ranafaisal.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ranafaisal.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ranafaisal.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ranafaisal.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ranafaisal.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ranafaisal.wordpress.com/22/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ranafaisal.wordpress.com&amp;blog=2395648&amp;post=22&amp;subd=ranafaisal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ranafaisal.wordpress.com/2008/07/11/create-thumbnail-in-c/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c9d9bec2e4bc85793b0d196238fedc91?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ranafaisal</media:title>
		</media:content>
	</item>
		<item>
		<title>Free Textbox With UpdatePanel</title>
		<link>http://ranafaisal.wordpress.com/2008/07/09/21/</link>
		<comments>http://ranafaisal.wordpress.com/2008/07/09/21/#comments</comments>
		<pubDate>Wed, 09 Jul 2008 14:05:48 +0000</pubDate>
		<dc:creator>ranafaisal</dc:creator>
				<category><![CDATA[Asp.Net]]></category>
		<category><![CDATA[C#.Net]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Asp.Net Ajax Limitation]]></category>
		<category><![CDATA[Free Textbox]]></category>
		<category><![CDATA[Free TextBox With UpdatePanel]]></category>
		<category><![CDATA[UpdatePanel]]></category>

		<guid isPermaLink="false">http://ranafaisal.wordpress.com/?p=21</guid>
		<description><![CDATA[Hi, As we often use Free Textbox control with our web projects. But it show some limitation when we use it with updatepanel. No this limitation removed using this work around of this problem Step1 //Add this on page load if(!Page.IsPostBack) { Page.ClientScript.RegisterClien tScriptInclude(&#8220;FTB-FreeTextBox&#8220;, VirtualPathUtility.MakeRelative(Request.Path, &#8220;~/scripts/FTB-FreeTextBox.js&#8221;)); Page.ClientScript.RegisterClientScriptInclude(&#8220;FTB-Utility&#8221;, VirtualPathUtility.MakeRelative(Request.Path, &#8220;~/scripts/FTB-Utility.js&#8221;)); Page.ClientScript.RegisterClientScriptInclude(&#8220;FTB-Toolbars&#8221;, VirtualPathUtility.MakeRelative(Request.Path, &#8220;~/scripts/FTB-ToolbarItems.js&#8220;)); Page.ClientScript.RegisterClientScriptInclude(&#8220;FTB-ImageGallery&#8221;, VirtualPathUtility.MakeRelative(Request.Path, &#8220;~/scripts/FTB-ImageGallery.js&#8220;)); [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ranafaisal.wordpress.com&amp;blog=2395648&amp;post=21&amp;subd=ranafaisal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hi,<br />
As we often use Free Textbox control with our web projects. But it show some limitation when we use it with updatepanel. No this limitation removed using this work around of this problem</p>
<p><strong>Step1</strong><br />
//Add this on page load<br />
<span style="color:#ff0000;">if(!Page.IsPostBack)<br />
{<br />
Page.ClientScript.RegisterClien</span></p>
<div id="1fm6" class="ArwC7c ckChnd"><span style="color:#ff0000;">tScriptInclude(&#8220;FTB-FreeTextBox</span><span style="color:#ff0000;">&#8220;, VirtualPathUtility.MakeRelative</span><span style="color:#ff0000;">(Request.Path, &#8220;~/scripts/FTB-FreeTextBox.js&#8221;</span><span style="color:#ff0000;">));<br />
Page.ClientScript.RegisterClien</span><span style="color:#ff0000;">tScriptInclude(&#8220;FTB-Utility&#8221;, VirtualPathUtility.MakeRelative</span><span style="color:#ff0000;">(Request.Path, &#8220;~/scripts/FTB-Utility.js&#8221;));<br />
Page.ClientScript.RegisterClien</span><span style="color:#ff0000;">tScriptInclude(&#8220;FTB-Toolbars&#8221;, VirtualPathUtility.MakeRelative</span><span style="color:#ff0000;">(Request.Path, &#8220;~/scripts/FTB-ToolbarItems.js</span><span style="color:#ff0000;">&#8220;));<br />
Page.ClientScript.RegisterClien</span><span style="color:#ff0000;">tScriptInclude(&#8220;FTB-ImageGaller</span><span style="color:#ff0000;">y&#8221;, VirtualPathUtility.MakeRelative</span><span style="color:#ff0000;">(Request.Path, &#8220;~/scripts/FTB-ImageGallery.js</span><span style="color:#ff0000;">&#8220;));<br />
Page.ClientScript.RegisterClien</span><span style="color:#ff0000;">tScriptInclude(&#8220;FTB-Pro&#8221;, VirtualPathUtility.MakeRelative</span><span style="color:#ff0000;">(Request.Path, &#8220;~/scripts/FTB-Pro.js&#8221;));<br />
}</span></p>
<p>and add these two funcions<br />
<strong>Step2</strong><br />
<span style="color:#ff0000;">[Obsolete]<br />
public override void RegisterStartupScript(string key, string script)<br />
{<br />
string newScript = script.Replace(&#8220;FTB_AddEvent</span><span style="color:#ff0000;">(window,&#8217;load&#8217;,function () {&#8220;, &#8220;&#8221;).Replace(&#8220;});&#8221;, &#8220;&#8221;);<br />
ScriptManager.RegisterStartupSc</span><span style="color:#ff0000;">ript(this, typeof(Page), key, newScript, false);<br />
}<br />
public new void RegisterOnSubmitStatement</span><span style="color:#ff0000;">(string key, string script)<br />
{<br />
ScriptManager.RegisterOnSubmitS</span><span style="color:#ff0000;">tatement(this, typeof(Page), key, script);<br />
}<br />
</span></p>
<p>Cheers, Now textbox work very well in update panel.</p></div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/ranafaisal.wordpress.com/21/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/ranafaisal.wordpress.com/21/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ranafaisal.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ranafaisal.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ranafaisal.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ranafaisal.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ranafaisal.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ranafaisal.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ranafaisal.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ranafaisal.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ranafaisal.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ranafaisal.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ranafaisal.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ranafaisal.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ranafaisal.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ranafaisal.wordpress.com/21/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ranafaisal.wordpress.com&amp;blog=2395648&amp;post=21&amp;subd=ranafaisal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ranafaisal.wordpress.com/2008/07/09/21/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c9d9bec2e4bc85793b0d196238fedc91?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ranafaisal</media:title>
		</media:content>
	</item>
		<item>
		<title>URL Rewriting in ASP.NET</title>
		<link>http://ranafaisal.wordpress.com/2008/06/09/url-rewriting-in-aspnet/</link>
		<comments>http://ranafaisal.wordpress.com/2008/06/09/url-rewriting-in-aspnet/#comments</comments>
		<pubDate>Mon, 09 Jun 2008 13:54:24 +0000</pubDate>
		<dc:creator>ranafaisal</dc:creator>
				<category><![CDATA[Asp.Net]]></category>
		<category><![CDATA[Asp.Net URL Rewriting]]></category>

		<guid isPermaLink="false">http://ranafaisal.wordpress.com/?p=19</guid>
		<description><![CDATA[Hi, Today I will present this article about how to rewrite our URL. Mean how to make our URL user friendly or Search like friendly. Suppose you have a video site On which you have category for videos. Let suppose we want to display all videos when user click on a categories link. We have [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ranafaisal.wordpress.com&amp;blog=2395648&amp;post=19&amp;subd=ranafaisal&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>Today I will present this article about how to rewrite our URL. Mean how to make our URL user friendly or Search like friendly.</p>
<p>Suppose you have a video site On which you have category for videos. Let suppose we want to display all videos when user click on a categories link. We have a page DisplayVideo.aspx which accept category id and display all its videos. The url look like http://localhost/MyWeb/DisplayVideo.aspx?CategoryId=1</p>
<p>But it is not user friendly and difficult to remember this url.  So to make this user friendly, may you want like this http://localhost/MyWeb/Category/CatName, To accomplished this we user URL rewriting.</p>
<p>First of all we use an open source URL rewriting engine. This can help us to do this in just 5 minute.</p>
<p>For that we have to follow these steps</p>
<p><strong>1- Download The library</strong></p>
<p>http://www.urlrewriting.net/en/Download.aspx, open this url and download the required dll.</p>
<p><strong>2- Add this in You website bin folder</strong></p>
<p>Now extract the dll and add it in bin folder using Add reference option.</p>
<p><strong>3- Make These changes in web.config files</strong></p>
<p>Add this in &lt;configsections&gt; tag</p>
<p><span style="color:#ff0000;"> &lt;!&#8211;For URL Rewriting Start&#8211;&gt;<br />
&lt;section name=&#8221;urlrewritingnet&#8221; restartOnExternalChanges=&#8221;true&#8221; requirePermission =&#8221;false&#8221; type=&#8221;UrlRewritingNet.Configuration.UrlRewriteSection,UrlRewritingNet.UrlRewriter&#8221;  /&gt;<br />
&lt;!&#8211;For URL Rewriting End&#8211;&gt;</span></p>
<p>In &lt;httpmodule&gt; add this tag</p>
<p><span style="color:#ff0000;">&lt;add name=&#8221;UrlRewriteModule&#8221; type=&#8221;UrlRewritingNet.Web.UrlRewriteModule, UrlRewritingNet.UrlRewriter&#8221; /&gt;</span></p>
<p>Now this is important part of our configuration, here we apply rule to rewrite our url</p>
<p><span style="color:#ff0000;">&lt;!&#8211;For URL Start&#8211;&gt;<br />
&lt;urlrewritingnet rewriteOnlyVirtualUrls=&#8221;true&#8221; contextItemsPrefix=&#8221;QueryString&#8221; defaultPage = &#8220;default.aspx&#8221;   xmlns=&#8221;http://www.urlrewriting.net/schemas/config/2006/07&#8243; &gt;</p>
<p>&lt;rewrites&gt;<br />
&lt;add name=&#8221;RuleForCats&#8221;  virtualUrl=&#8221;~/category/(.*)&#8221;<br />
rewriteUrlParameter=&#8221;ExcludeFromClientQueryString&#8221;<br />
destinationUrl=&#8221;~/DisplayVideo.aspx?categoryName=$1&#8243;<br />
ignoreCase=&#8221;true&#8221; /&gt;<br />
&lt;/rewrites&gt;</p>
<p>&lt;/urlrewritingnet&gt;<br />
&lt;!&#8211;For URL End&#8211;&gt;</span></p>
<p>Now let see what happening here, when user request that page http://localhost/Catgeory/Music</p>
<p>To handle it we write <span style="color:#ff0000;">~/DisplayVideo.aspx?CategoryName=Music</span>, mean now our DisplayVideo.aspx page gets the CategoryName. We programmatically get its id and show all videos.</p>
<p>But now you will see how it is easy. User type this http://localhost/Category/Entertainment and got all videos of Entertainment categories.</p>
<p>Thats it we complete URL Rewriting in just 5 minute.</p>
<p>Need you Pray</p>
<p>Thanks</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/ranafaisal.wordpress.com/19/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/ranafaisal.wordpress.com/19/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ranafaisal.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ranafaisal.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ranafaisal.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ranafaisal.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ranafaisal.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ranafaisal.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ranafaisal.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ranafaisal.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ranafaisal.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ranafaisal.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ranafaisal.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ranafaisal.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ranafaisal.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ranafaisal.wordpress.com/19/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ranafaisal.wordpress.com&amp;blog=2395648&amp;post=19&amp;subd=ranafaisal&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ranafaisal.wordpress.com/2008/06/09/url-rewriting-in-aspnet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c9d9bec2e4bc85793b0d196238fedc91?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ranafaisal</media:title>
		</media:content>
	</item>
	</channel>
</rss>
