<?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>Ashfaq&#039;s programming Blog</title>
	<atom:link href="http://ashfaqasp.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://ashfaqasp.wordpress.com</link>
	<description>Working smarter is important than working harder</description>
	<lastBuildDate>Sat, 12 Nov 2011 05:32:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='ashfaqasp.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Ashfaq&#039;s programming Blog</title>
		<link>http://ashfaqasp.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://ashfaqasp.wordpress.com/osd.xml" title="Ashfaq&#039;s programming Blog" />
	<atom:link rel='hub' href='http://ashfaqasp.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Pass encrypted querystring</title>
		<link>http://ashfaqasp.wordpress.com/2011/11/12/pass-encrypted-querystring/</link>
		<comments>http://ashfaqasp.wordpress.com/2011/11/12/pass-encrypted-querystring/#comments</comments>
		<pubDate>Sat, 12 Nov 2011 05:31:59 +0000</pubDate>
		<dc:creator>Ashfaq</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ashfaqasp.wordpress.com/?p=161</guid>
		<description><![CDATA[You need to download the following files on your project bin folder which will help to generate the encrypted queryString. TSHAK.Components after downloading the file you have to change the .doc extension to .dll extension. WordPress does not allow user to upload certain extension of file. If the file does not work after changing the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ashfaqasp.wordpress.com&amp;blog=10571646&amp;post=161&amp;subd=ashfaqasp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>
You need to download the following files on your project bin folder which will help to generate the encrypted queryString.<br />
<a href='http://ashfaqasp.files.wordpress.com/2011/11/tshak-components.doc'>TSHAK.Components</a></p>
<p>after downloading the file you have to change the .doc extension to .dll extension. WordPress does not allow user to upload certain extension of file. If the file does not work after changing the extension, feel free to contact with me.
</p>
<p>The main page code for redirect will be the following code:<br />
<code><br />
 Byte[] bt = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 8 };<br />
        TSHAK.Components.SecureQueryString qs = new TSHAK.Components.SecureQueryString(bt);<br />
        qs["Myname"] = "John";<br />
        qs["MyAge"] = "5";<br />
        qs["textBoxValue"] = this.txtQuery.Text.Trim();<br />
        Response.Redirect("QueryString2.aspx?data=" + HttpUtility.UrlEncode(qs.ToString()));<br />
</code></p>
<p>To catch the Querystring you have to use the following code, which will extract the exact value from QueryString</p>
<p><code></p>
<pre>

Byte[] bt = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 8 };
        TSHAK.Components.SecureQueryString qs = new TSHAK.Components.SecureQueryString(bt,Request["data"]);

        Response.Write("Orginal :" + Request["data"].ToString());
        Response.Write("");

        Response.Write("My Name" + qs["MyName"].ToString());
        Response.Write("");

        Response.Write("My age" + qs["MyAge"].ToString());
        Response.Write("");
        if (qs["textBoxValue"] != null)
        {
            Response.Write("My Text Box" + qs["textBoxValue"].ToString());
            Response.Write("");
        }
</pre>
<p></code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ashfaqasp.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ashfaqasp.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ashfaqasp.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ashfaqasp.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ashfaqasp.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ashfaqasp.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ashfaqasp.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ashfaqasp.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ashfaqasp.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ashfaqasp.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ashfaqasp.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ashfaqasp.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ashfaqasp.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ashfaqasp.wordpress.com/161/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ashfaqasp.wordpress.com&amp;blog=10571646&amp;post=161&amp;subd=ashfaqasp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ashfaqasp.wordpress.com/2011/11/12/pass-encrypted-querystring/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f57b17934c0813c2428e6f7335020313?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Ashfaq</media:title>
		</media:content>
	</item>
		<item>
		<title>Represent IIS log in nice presentable way</title>
		<link>http://ashfaqasp.wordpress.com/2011/11/12/represent-iis-log-in-nice-presentable-way/</link>
		<comments>http://ashfaqasp.wordpress.com/2011/11/12/represent-iis-log-in-nice-presentable-way/#comments</comments>
		<pubDate>Sat, 12 Nov 2011 05:15:11 +0000</pubDate>
		<dc:creator>Ashfaq</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[iislog]]></category>

		<guid isPermaLink="false">http://ashfaqasp.wordpress.com/?p=250</guid>
		<description><![CDATA[I needed to represent the IIS log in nice, presentable way in short time. I go through few and find Analog is a easy way to do the work. But the UI of analog log view is not the one I was looking for. &#8220;Awstats&#8221; is also a good open source option for presenting iis [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ashfaqasp.wordpress.com&amp;blog=10571646&amp;post=250&amp;subd=ashfaqasp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I needed to represent the IIS log in nice, presentable way in short time. I go through few and find Analog is a easy way to do the work. But the UI of analog log view is not the one I was looking for. &#8220;Awstats&#8221; is also a good open source option for presenting iis logs, but configuring that require time. Finally, I found this site<br />
http://www.iislogs.com/steveschofield/log-analsyis-software-for-iis and found &#8220;SmarterTools&#8221; has the fastest solution for my work. Although, for some degree of use you have to pay certain amount of money, But in you require it to use in a single server&#8230;you probably don&#8217;t have to worry about paying (see the payment section before download). The setup of this is easy and they have awesome UI. I can also access the log from web <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . So if you need to analyse your visitor&#8217;s data quick and nice way&#8230;you can think about giving this nice tool a try. It will take maximum 1 hour to download and setup your site for IIS logging.In addition to more than 30 reports that they have already for you, you can make your own custom reports within a minute <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . Click on the link below, to know more about this tool:<br />
</p>
<p><a href="http://www.smartertools.com/smarterstats/web-analytics-seo-software.aspx" title="Web Log Analysis">IIS Web Log Analysis</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ashfaqasp.wordpress.com/250/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ashfaqasp.wordpress.com/250/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ashfaqasp.wordpress.com/250/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ashfaqasp.wordpress.com/250/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ashfaqasp.wordpress.com/250/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ashfaqasp.wordpress.com/250/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ashfaqasp.wordpress.com/250/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ashfaqasp.wordpress.com/250/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ashfaqasp.wordpress.com/250/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ashfaqasp.wordpress.com/250/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ashfaqasp.wordpress.com/250/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ashfaqasp.wordpress.com/250/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ashfaqasp.wordpress.com/250/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ashfaqasp.wordpress.com/250/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ashfaqasp.wordpress.com&amp;blog=10571646&amp;post=250&amp;subd=ashfaqasp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ashfaqasp.wordpress.com/2011/11/12/represent-iis-log-in-nice-presentable-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f57b17934c0813c2428e6f7335020313?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Ashfaq</media:title>
		</media:content>
	</item>
		<item>
		<title>Forcing client browser to refresh js and css file</title>
		<link>http://ashfaqasp.wordpress.com/2011/11/12/forcing-client-browser-to-refresh-js-and-css-file/</link>
		<comments>http://ashfaqasp.wordpress.com/2011/11/12/forcing-client-browser-to-refresh-js-and-css-file/#comments</comments>
		<pubDate>Sat, 12 Nov 2011 05:12:19 +0000</pubDate>
		<dc:creator>Ashfaq</dc:creator>
				<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://ashfaqasp.wordpress.com/?p=253</guid>
		<description><![CDATA[Forcing a refresh But how do you tell a web browser to grab a new version of the CSS script after you make an update to it? Yes you could rename the CSS file each time you update it, but that is silly. Not only would you need to ensure you update all of the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ashfaqasp.wordpress.com&amp;blog=10571646&amp;post=253&amp;subd=ashfaqasp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Forcing a refresh</p>
<p>But how do you tell a web browser to grab a new version of the CSS script after you make an update to it?  Yes you could rename the CSS file each time you update it, but that is silly.  Not only would you need to ensure you update all of the references to the script in your html, but it just isn&#8217;t necessary.  Simply add a querystring element to the file name in the html reference like so:</p>
<p>&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;lightbox.css?v=2&quot; media=&quot;all&quot; /&gt;</p>
<p>Here I added a &#8216;?v=2&#8242; string to the end of the file name but it can be a datestamp or whatever you want basically.  This is the equivalent to changing the the file name, without the need to change the physical file name. The web browser just interprets it as this script (the lightbox.css in this case) as needing to process the v=2 you are passing through the querystring.  Since your CSS isn&#8217;t actually doing anything with the query values the script doesn&#8217;t care if the querystring is present.  The only thing that matters is the browser thinks something is different.</p>
<p>So for instance, each time you update a .css or .js script you could change the querystring to increment like v=3, v=4, etc.  This also allows you to update the scripts you have on your production website and see the changes (by performing a shift+reload on your browser) while silently keeping the changes from showing up for your other visitors until you change or add the querystring value; since most browsers will cache the CSS file your site visitors would not notice the change unless until you update the querystring.</p>
<p>reference: http://www.unc.edu/~pgale/information-technology/blog/4</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ashfaqasp.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ashfaqasp.wordpress.com/253/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ashfaqasp.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ashfaqasp.wordpress.com/253/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ashfaqasp.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ashfaqasp.wordpress.com/253/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ashfaqasp.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ashfaqasp.wordpress.com/253/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ashfaqasp.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ashfaqasp.wordpress.com/253/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ashfaqasp.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ashfaqasp.wordpress.com/253/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ashfaqasp.wordpress.com/253/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ashfaqasp.wordpress.com/253/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ashfaqasp.wordpress.com&amp;blog=10571646&amp;post=253&amp;subd=ashfaqasp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ashfaqasp.wordpress.com/2011/11/12/forcing-client-browser-to-refresh-js-and-css-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f57b17934c0813c2428e6f7335020313?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Ashfaq</media:title>
		</media:content>
	</item>
		<item>
		<title>Configuring ELMAH on IIS7</title>
		<link>http://ashfaqasp.wordpress.com/2011/08/23/configuring-elmah-on-iis7/</link>
		<comments>http://ashfaqasp.wordpress.com/2011/08/23/configuring-elmah-on-iis7/#comments</comments>
		<pubDate>Tue, 23 Aug 2011 05:58:53 +0000</pubDate>
		<dc:creator>Ashfaq</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[ELMAH]]></category>
		<category><![CDATA[IIS7]]></category>

		<guid isPermaLink="false">http://ashfaqasp.wordpress.com/?p=230</guid>
		<description><![CDATA[To configure elmah on iis7, read this post first: http://code.google.com/p/elmah/wiki/DotNetSlackersArticle If setting does not work&#8230; copy and paste these lines in right place &#60;system.web&#62; &#60;httpHandlers&#62; &#60;add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" /&#62; &#60;/httpHandlers&#62; &#60;httpModules&#62; &#60;add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah"/&#62; &#60;add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" /&#62; &#60;add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" /&#62; &#60;/httpModules&#62; &#60;/system.web&#62; &#60;system.webServer&#62; &#60;modules runAllManagedModulesForAllRequests="true"&#62; &#60;add name="ErrorLog" type="Elmah.ErrorLogModule, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ashfaqasp.wordpress.com&amp;blog=10571646&amp;post=230&amp;subd=ashfaqasp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>To configure elmah on iis7, read this post first:<br />
</p>
<p>http://code.google.com/p/elmah/wiki/DotNetSlackersArticle</p>
<p>
If setting does not work&#8230; copy and paste these lines in right place<br />
</p>
<p><code><br />
<span class="sc1">&lt;system.web&gt;</span><span class="sc0"><br />
  </span><span class="sc1">&lt;httpHandlers&gt;</span><span class="sc0"><br />
    </span><span class="sc1">&lt;add</span><span class="sc8"> </span><span class="sc3">verb</span><span class="sc8">=</span><span class="sc6">"POST,GET,HEAD"</span><span class="sc8"> </span><span class="sc3">path</span><span class="sc8">=</span><span class="sc6">"elmah.axd"</span><span class="sc8"> </span><span class="sc3">type</span><span class="sc8">=</span><span class="sc6">"Elmah.ErrorLogPageFactory, Elmah"</span><span class="sc8"> </span><span class="sc11">/&gt;</span><span class="sc0"><br />
  </span><span class="sc1">&lt;/httpHandlers&gt;</span><span class="sc0"><br />
  </span><span class="sc1">&lt;httpModules&gt;</span><span class="sc0"><br />
    </span><span class="sc1">&lt;add</span><span class="sc8"> </span><span class="sc3">name</span><span class="sc8">=</span><span class="sc6">"ErrorLog"</span><span class="sc8"> </span><span class="sc3">type</span><span class="sc8">=</span><span class="sc6">"Elmah.ErrorLogModule, Elmah"</span><span class="sc11">/&gt;</span><span class="sc0"><br />
    </span><span class="sc1">&lt;add</span><span class="sc8"> </span><span class="sc3">name</span><span class="sc8">=</span><span class="sc6">"ErrorMail"</span><span class="sc8"> </span><span class="sc3">type</span><span class="sc8">=</span><span class="sc6">"Elmah.ErrorMailModule, Elmah"</span><span class="sc8"> </span><span class="sc11">/&gt;</span><span class="sc0"><br />
    </span><span class="sc1">&lt;add</span><span class="sc8"> </span><span class="sc3">name</span><span class="sc8">=</span><span class="sc6">"ErrorFilter"</span><span class="sc8"> </span><span class="sc3">type</span><span class="sc8">=</span><span class="sc6">"Elmah.ErrorFilterModule, Elmah"</span><span class="sc8"> </span><span class="sc11">/&gt;</span><span class="sc0"><br />
  </span><span class="sc1">&lt;/httpModules&gt;</span><span class="sc0"><br />
</span><span class="sc1">&lt;/system.web&gt;</span><span class="sc0"><br />
</span><span class="sc1">&lt;system.webServer&gt;</span><span class="sc0"><br />
  </span><span class="sc1">&lt;modules</span><span class="sc8"> </span><span class="sc3">runAllManagedModulesForAllRequests</span><span class="sc8">=</span><span class="sc6">"true"</span><span class="sc1">&gt;</span><span class="sc0"><br />
    </span><span class="sc1">&lt;add</span><span class="sc8"> </span><span class="sc3">name</span><span class="sc8">=</span><span class="sc6">"ErrorLog"</span><span class="sc8"> </span><span class="sc3">type</span><span class="sc8">=</span><span class="sc6">"Elmah.ErrorLogModule, Elmah"</span><span class="sc11">/&gt;</span><span class="sc0"><br />
    </span><span class="sc1">&lt;add</span><span class="sc8"> </span><span class="sc3">name</span><span class="sc8">=</span><span class="sc6">"ErrorMail"</span><span class="sc8"> </span><span class="sc3">type</span><span class="sc8">=</span><span class="sc6">"Elmah.ErrorMailModule, Elmah"</span><span class="sc8"> </span><span class="sc11">/&gt;</span><span class="sc0"><br />
    </span><span class="sc1">&lt;add</span><span class="sc8"> </span><span class="sc3">name</span><span class="sc8">=</span><span class="sc6">"ErrorFilter"</span><span class="sc8"> </span><span class="sc3">type</span><span class="sc8">=</span><span class="sc6">"Elmah.ErrorFilterModule, Elmah"</span><span class="sc8"> </span><span class="sc11">/&gt;</span><span class="sc0"><br />
  </span><span class="sc1">&lt;/modules&gt;</span><span class="sc0"><br />
  </span><span class="sc1">&lt;handlers&gt;</span><span class="sc0"><br />
    </span><span class="sc1">&lt;add</span><span class="sc8"> </span><span class="sc3">name</span><span class="sc8">=</span><span class="sc6">"Elmah"</span><span class="sc8"> </span><span class="sc3">verb</span><span class="sc8">=</span><span class="sc6">"POST,GET,HEAD"</span><span class="sc8"> </span><span class="sc3">path</span><span class="sc8">=</span><span class="sc6">"elmah.axd"</span><span class="sc8"> </span><span class="sc3">type</span><span class="sc8">=</span><span class="sc6">"Elmah.ErrorLogPageFactory, Elmah"</span><span class="sc8"> </span><span class="sc11">/&gt;</span><span class="sc0"><br />
  </span><span class="sc1">&lt;/handlers&gt;</span><span class="sc0"><br />
</span><span class="sc1">&lt;system.webServer&gt;</span><span class="sc0"><br />
</span></p>
<p></code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ashfaqasp.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ashfaqasp.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ashfaqasp.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ashfaqasp.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ashfaqasp.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ashfaqasp.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ashfaqasp.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ashfaqasp.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ashfaqasp.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ashfaqasp.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ashfaqasp.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ashfaqasp.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ashfaqasp.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ashfaqasp.wordpress.com/230/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ashfaqasp.wordpress.com&amp;blog=10571646&amp;post=230&amp;subd=ashfaqasp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ashfaqasp.wordpress.com/2011/08/23/configuring-elmah-on-iis7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f57b17934c0813c2428e6f7335020313?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Ashfaq</media:title>
		</media:content>
	</item>
		<item>
		<title>Looping through all control in one page</title>
		<link>http://ashfaqasp.wordpress.com/2011/08/06/looping-through-all-control-in-one-page/</link>
		<comments>http://ashfaqasp.wordpress.com/2011/08/06/looping-through-all-control-in-one-page/#comments</comments>
		<pubDate>Sat, 06 Aug 2011 06:48:30 +0000</pubDate>
		<dc:creator>Ashfaq</dc:creator>
				<category><![CDATA[ASP.NET]]></category>

		<guid isPermaLink="false">http://ashfaqasp.wordpress.com/?p=224</guid>
		<description><![CDATA[This code will help you to loop through all control and child control in one page. To call the Following function you can use something like SetTextBoxBackColor(this.Page,Color.Yellow) in your code behind. private void SetTextBoxBackColor(Control Page, Color clr) { foreach (Control ctrl in Page.Controls) { if (ctrl is TextBox) { ((TextBox)(ctrl)).BackColor = clr; } else { [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ashfaqasp.wordpress.com&amp;blog=10571646&amp;post=224&amp;subd=ashfaqasp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This code will help you to loop through all control and child control in one page. To call the Following function you can use something like SetTextBoxBackColor(this.Page,Color.Yellow) in your code behind.</p>
<p><code></p>
<pre>
 private void SetTextBoxBackColor(Control Page, Color clr)
    {
        foreach (Control ctrl in Page.Controls)
        {
            if (ctrl is TextBox)
            {
                ((TextBox)(ctrl)).BackColor = clr;
            }
            else
            {
                if (ctrl.Controls.Count &gt; 0)
                {
                    SetTextBoxBackColor(ctrl, clr);
                }
            }
        }
    }
</pre>
<p></code></p>
<p>Reference:</p>
<p>http://steveorr.net/faq/controltreerecursion.aspx</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ashfaqasp.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ashfaqasp.wordpress.com/224/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ashfaqasp.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ashfaqasp.wordpress.com/224/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ashfaqasp.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ashfaqasp.wordpress.com/224/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ashfaqasp.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ashfaqasp.wordpress.com/224/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ashfaqasp.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ashfaqasp.wordpress.com/224/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ashfaqasp.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ashfaqasp.wordpress.com/224/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ashfaqasp.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ashfaqasp.wordpress.com/224/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ashfaqasp.wordpress.com&amp;blog=10571646&amp;post=224&amp;subd=ashfaqasp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ashfaqasp.wordpress.com/2011/08/06/looping-through-all-control-in-one-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f57b17934c0813c2428e6f7335020313?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Ashfaq</media:title>
		</media:content>
	</item>
		<item>
		<title>Request format is invalid: application/json; charset=utf-8</title>
		<link>http://ashfaqasp.wordpress.com/2011/06/16/request-format-is-invalid-applicationjson-charsetutf-8/</link>
		<comments>http://ashfaqasp.wordpress.com/2011/06/16/request-format-is-invalid-applicationjson-charsetutf-8/#comments</comments>
		<pubDate>Thu, 16 Jun 2011 09:00:02 +0000</pubDate>
		<dc:creator>Ashfaq</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[json]]></category>

		<guid isPermaLink="false">http://ashfaqasp.wordpress.com/?p=221</guid>
		<description><![CDATA[System.InvalidOperationException: Request format is invalid: application/json; charset=utf-8. at System.Web.Services.Protocols.HttpServerProtocol.ReadParameters() at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest() it seems the server rejects application/json; charset=utf-8 as content type. Today I faced the above problem, when I migrated my asp.net 3.5 application to asp.net 4.0 application. My web.config was simple and I copied the web.config content from a new asp.net 4.0 template. I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ashfaqasp.wordpress.com&amp;blog=10571646&amp;post=221&amp;subd=ashfaqasp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>System.InvalidOperationException: Request format is invalid: application/json; charset=utf-8.<br />
   at System.Web.Services.Protocols.HttpServerProtocol.ReadParameters()<br />
   at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()</p>
<p>it seems the server rejects application/json; charset=utf-8 as content type.</p>
<p>Today I faced the above problem, when I migrated my asp.net 3.5 application to asp.net 4.0 application. My web.config was simple and I copied the web.config content from a new asp.net 4.0 template. I searched for this solution and didn&#8217;t find good post to solve my issue. Finally, I have to change my web.config to solve the issue. If you ever face this problem all you have to do is, add the following line under &lt;system.webServer &gt; &lt; handlers&gt;</p>
<p><code></p>
<p>&lt;add name=&quot;ScriptHandlerFactory&quot; verb=&quot;*&quot; path=&quot;*.asmx&quot; preCondition=&quot;integratedMode&quot; type=&quot;System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot; /&gt;<br />
&lt;add name=&quot;ScriptHandlerFactoryAppServices&quot; verb=&quot;*&quot; path=&quot;*_AppService.axd&quot; preCondition=&quot;integratedMode&quot; type=&quot;System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot; /&gt;</p>
<p></code></p>
<p>Happy Coding<br />
Ashfaq</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ashfaqasp.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ashfaqasp.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ashfaqasp.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ashfaqasp.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ashfaqasp.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ashfaqasp.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ashfaqasp.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ashfaqasp.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ashfaqasp.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ashfaqasp.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ashfaqasp.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ashfaqasp.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ashfaqasp.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ashfaqasp.wordpress.com/221/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ashfaqasp.wordpress.com&amp;blog=10571646&amp;post=221&amp;subd=ashfaqasp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ashfaqasp.wordpress.com/2011/06/16/request-format-is-invalid-applicationjson-charsetutf-8/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f57b17934c0813c2428e6f7335020313?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Ashfaq</media:title>
		</media:content>
	</item>
		<item>
		<title>Integrate Bangla in ASP.NET website</title>
		<link>http://ashfaqasp.wordpress.com/2011/04/30/integrate-bangla-in-asp-net-website/</link>
		<comments>http://ashfaqasp.wordpress.com/2011/04/30/integrate-bangla-in-asp-net-website/#comments</comments>
		<pubDate>Sat, 30 Apr 2011 08:52:19 +0000</pubDate>
		<dc:creator>Ashfaq</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Bangla]]></category>
		<category><![CDATA[bn-BD]]></category>
		<category><![CDATA[bn-IN]]></category>
		<category><![CDATA[Localization]]></category>

		<guid isPermaLink="false">http://ashfaqasp.wordpress.com/?p=208</guid>
		<description><![CDATA[I know this is a very simple task for a lot of people. But I had been looking for the easiest way to do this task for long. Youtube helped me to finding the easiest way to this task. So I am not gonna write a lot of text. I will just paste the you [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ashfaqasp.wordpress.com&amp;blog=10571646&amp;post=208&amp;subd=ashfaqasp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I know this is a very simple task for a lot of people. But I had been looking for the easiest way to do this task for long. Youtube helped me to finding the easiest way to this task. So I am not gonna write a lot of text. I will just paste the you tube link. And then few lines of code which will provide the nice way to change from english to bangla(Both Way). Watch the youtube video first:<br />
<a title="Integrate Localization in ASP.NET" href="http://www.youtube.com/watch?v=peNf0ydTV_4" target="_blank">Localization in asp.net </a></p>
<p>My IIS/VS2008 didn&#8217;t have bn-BD, so I worked with bn-IN culture. There are way to use bn_BD in iis 5.1, but it is easy on IIS-7. I am not going details on that.</p>
<p>Suppose you have file name &#8220;Contact.aspx&#8221;, so you have to have Contact.aspx.resx and Contact.aspx.bn-IN.resx in App_Localresources folder.</p>
<p>I have a dropdown in my .aspx page which has en-US for english and bn-IN for Bangla, changing the dropdown will call IntializeCulture function. If you have set up your browser according to instruction from youtube. You will be able to see bangla. I am sure using this loginc you will be able to change your page as per your requirement.</p>
<pre>  protected override void InitializeCulture()
    {
        if (Request.Form["DropDownList1"] != null)
        {

            string selectedLanguage = Request.Form["DropDownList1"];
            Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(selectedLanguage);
            Thread.CurrentThread.CurrentUICulture = new CultureInfo(selectedLanguage);
        }
        base.InitializeCulture();
    }
</pre>
<p>
Change to .rar after download(Right click to download): <a href='http://ashfaqasp.files.wordpress.com/2011/04/bangla.pdf'>Bangla Solution File</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ashfaqasp.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ashfaqasp.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ashfaqasp.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ashfaqasp.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ashfaqasp.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ashfaqasp.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ashfaqasp.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ashfaqasp.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ashfaqasp.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ashfaqasp.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ashfaqasp.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ashfaqasp.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ashfaqasp.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ashfaqasp.wordpress.com/208/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ashfaqasp.wordpress.com&amp;blog=10571646&amp;post=208&amp;subd=ashfaqasp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ashfaqasp.wordpress.com/2011/04/30/integrate-bangla-in-asp-net-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f57b17934c0813c2428e6f7335020313?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Ashfaq</media:title>
		</media:content>
	</item>
		<item>
		<title>Delete all foreign key refernce for a Table using one T-SQL statement</title>
		<link>http://ashfaqasp.wordpress.com/2011/04/13/delete-all-foreign-key-refernce-for-a-table-using-one-t-sql-statement/</link>
		<comments>http://ashfaqasp.wordpress.com/2011/04/13/delete-all-foreign-key-refernce-for-a-table-using-one-t-sql-statement/#comments</comments>
		<pubDate>Wed, 13 Apr 2011 08:58:50 +0000</pubDate>
		<dc:creator>Ashfaq</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[T-SQL]]></category>

		<guid isPermaLink="false">http://ashfaqasp.wordpress.com/?p=204</guid>
		<description><![CDATA[I was looking for a t-sql query which will delete all foreign key reference for a Table. My table has referenced by 13 different table. I needed to Truncate the Table named Table_A. Suppose I was Truncating Table_A, which was referenced by 13 table. So I ran the T-SQL query first to list all reference [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ashfaqasp.wordpress.com&amp;blog=10571646&amp;post=204&amp;subd=ashfaqasp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I was looking for a t-sql query which will delete all foreign key reference for a Table. My table has referenced by 13 different table. I needed to Truncate the Table named Table_A. Suppose I was Truncating Table_A, which was referenced by 13 table. So I ran the T-SQL query first to list all reference for Table_A. Then I used the 2nd Query which would delete all reference from Table_A. Once the foreign key reference has been removed from the table, You can easily run a Truncate command to restart the index of Primary column. After Truncate, I used the list generated by first query to re-establish the reference.<br />
<br />
Here is the first Query which will list all the reference that is used in your Database or for a Specific Table.</p>
<p><code><br />
SELECT RC.CONSTRAINT_NAME FK_Name<br />
, KF.TABLE_SCHEMA FK_Schema<br />
, KF.TABLE_NAME FK_Table<br />
, KF.COLUMN_NAME FK_Column<br />
, RC.UNIQUE_CONSTRAINT_NAME PK_Name<br />
, KP.TABLE_SCHEMA PK_Schema<br />
, KP.TABLE_NAME PK_Table<br />
, KP.COLUMN_NAME PK_Column<br />
, RC.MATCH_OPTION MatchOption<br />
, RC.UPDATE_RULE UpdateRule<br />
, RC.DELETE_RULE DeleteRule<br />
FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS RC<br />
JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE KF ON RC.CONSTRAINT_NAME = KF.CONSTRAINT_NAME<br />
JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE KP ON RC.UNIQUE_CONSTRAINT_NAME = KP.CONSTRAINT_NAME<br />
Where KP.TABLE_NAME ='Table_A'<br />
</code><br />
<br />
Then I used  the second query to delete reference from Table_A<br />
<br />
<code></p>
<pre>
DECLARE @database nvarchar(50)
DECLARE @table nvarchar(50)
set @database = 'DBNAME'
set @table = 'TABLE_A'
declare @schema nvarchar(128), @tbl nvarchar(128), @constraint nvarchar(128)
DECLARE @sql nvarchar(255)
declare cur cursor fast_forward for
select distinct cu.constraint_schema, cu.table_name, cu.constraint_name
from information_schema.table_constraints tc
join information_schema.referential_constraints rc on rc.unique_constraint_name = tc.constraint_name
join information_schema.constraint_column_usage cu on cu.constraint_name = rc.constraint_name
where tc.constraint_catalog = @database and tc.table_name = @table
open cur
fetch next from cur into @schema, @tbl, @constraint
while @@fetch_status  -1
begin
select @sql = 'ALTER TABLE ' + @schema + '.' + @tbl + ' DROP CONSTRAINT ' + @constraint
exec sp_executesql @sql
fetch next from cur into @schema, @tbl, @constraint
end
close cur
deallocate cur 
</pre>
<p></code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ashfaqasp.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ashfaqasp.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ashfaqasp.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ashfaqasp.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ashfaqasp.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ashfaqasp.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ashfaqasp.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ashfaqasp.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ashfaqasp.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ashfaqasp.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ashfaqasp.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ashfaqasp.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ashfaqasp.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ashfaqasp.wordpress.com/204/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ashfaqasp.wordpress.com&amp;blog=10571646&amp;post=204&amp;subd=ashfaqasp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ashfaqasp.wordpress.com/2011/04/13/delete-all-foreign-key-refernce-for-a-table-using-one-t-sql-statement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f57b17934c0813c2428e6f7335020313?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Ashfaq</media:title>
		</media:content>
	</item>
		<item>
		<title>T-SQL For Folder Path</title>
		<link>http://ashfaqasp.wordpress.com/2010/08/17/t-sql-for-folder-path/</link>
		<comments>http://ashfaqasp.wordpress.com/2010/08/17/t-sql-for-folder-path/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 16:55:08 +0000</pubDate>
		<dc:creator>Ashfaq</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[Recursion]]></category>
		<category><![CDATA[T-SQL]]></category>

		<guid isPermaLink="false">http://ashfaqasp.wordpress.com/?p=119</guid>
		<description><![CDATA[This is a excellent query to find out out Folder Path, or Subordinate under Manager using SQL Temporary table concept. It can save lot of hard T-SQL query work if needed. WITH RecFolder AS ( SELECT FolderID, [FolderName], ParentID, CAST(([FolderName]) AS VARCHAR(1000)) AS "Path", CAST((FolderID) AS VARCHAR(1000)) AS "PathID" FROM DOC_TB_PrmDocFolder WHERE ParentId IS NULL [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ashfaqasp.wordpress.com&amp;blog=10571646&amp;post=119&amp;subd=ashfaqasp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is a excellent query to find out out Folder Path, or Subordinate under Manager using SQL Temporary table concept. It can save lot of hard T-SQL query work if needed.</p>
<p><code></p>
<pre>

WITH  RecFolder
        AS (
            SELECT  FolderID, [FolderName], ParentID,
            CAST(([FolderName]) AS VARCHAR(1000)) AS "Path",  CAST((FolderID) AS VARCHAR(1000)) AS "PathID"
            FROM    DOC_TB_PrmDocFolder
            WHERE   ParentId IS NULL
            UNION ALL
                      --recursive member
            SELECT  t.FolderID, t.[FolderName], t.ParentID,
            CAST((a.path + '/' + t.FolderName) AS VARCHAR(1000)) AS "Path",
            CAST((isnull(a.PathID,'') + '/' + convert(varchar,t.FolderID) ) AS VARCHAR(1000)) AS "PathID"
            FROM    DOC_TB_PrmDocFolder AS t
            JOIN RecFolder AS a
            ON t.ParentId = a.FolderID
        )
        SELECT * FROM RecFolder Where ParentID is not null
</pre>
<p></code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ashfaqasp.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ashfaqasp.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ashfaqasp.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ashfaqasp.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ashfaqasp.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ashfaqasp.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ashfaqasp.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ashfaqasp.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ashfaqasp.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ashfaqasp.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ashfaqasp.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ashfaqasp.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ashfaqasp.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ashfaqasp.wordpress.com/119/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ashfaqasp.wordpress.com&amp;blog=10571646&amp;post=119&amp;subd=ashfaqasp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ashfaqasp.wordpress.com/2010/08/17/t-sql-for-folder-path/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f57b17934c0813c2428e6f7335020313?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Ashfaq</media:title>
		</media:content>
	</item>
		<item>
		<title>Class that easily encrypt/decrypt string</title>
		<link>http://ashfaqasp.wordpress.com/2010/08/17/class-that-easily-encryptdecrypt-string/</link>
		<comments>http://ashfaqasp.wordpress.com/2010/08/17/class-that-easily-encryptdecrypt-string/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 16:48:08 +0000</pubDate>
		<dc:creator>Ashfaq</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[decrypt]]></category>
		<category><![CDATA[encrypt]]></category>

		<guid isPermaLink="false">http://ashfaqasp.wordpress.com/?p=100</guid>
		<description><![CDATA[The following class is used to encrypt and decrypt a string. It is useful in lot of cases and should be put in a separate class in the system so that user can easily reference the class and do desired work. using System.Web.Security; using System.Security.Cryptography; using System.Text; using Microsoft.Win32; public class Crypt { string myKey; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ashfaqasp.wordpress.com&amp;blog=10571646&amp;post=100&amp;subd=ashfaqasp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The following class is used to encrypt and decrypt a string. It is useful in lot of cases and should be put in a separate class in the system so that user can easily reference the class and do desired work.</p>
<p><code></p>
<pre>
using System.Web.Security;
using System.Security.Cryptography;
using System.Text;
using Microsoft.Win32;

public class Crypt
{

string myKey;
TripleDESCryptoServiceProvider cryptDES3 = new TripleDESCryptoServiceProvider();
MD5CryptoServiceProvider cryptMD5Hash = new MD5CryptoServiceProvider();

public Crypt()
{

myKey = "somekeyhere";
}

private string Decrypt(string myString)
{
cryptDES3.Key = cryptMD5Hash.ComputeHash(ASCIIEncoding.ASCII.GetBytes(myKey));
cryptDES3.Mode = CipherMode.ECB;
ICryptoTransform desdencrypt = cryptDES3.CreateDecryptor();
byte[] buff = Convert.FromBase64String(myString);
return ASCIIEncoding.ASCII.GetString(desdencrypt.TransformFinalBlock(buff, 0, buff.Length));
}

private string Encrypt(string myString)
{
cryptDES3.Key = cryptMD5Hash.ComputeHash(ASCIIEncoding.ASCII.GetBytes(myKey));
cryptDES3.Mode = CipherMode.ECB;
ICryptoTransform desdencrypt = cryptDES3.CreateEncryptor();
var MyASCIIEncoding = new ASCIIEncoding();
byte[] buff = ASCIIEncoding.ASCII.GetBytes(testo);
return Convert.ToBase64String(desdencrypt.TransformFinalBlock(buff, 0, buff.Length));
}

}
</pre>
<p></code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ashfaqasp.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ashfaqasp.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ashfaqasp.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ashfaqasp.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ashfaqasp.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ashfaqasp.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ashfaqasp.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ashfaqasp.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ashfaqasp.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ashfaqasp.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ashfaqasp.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ashfaqasp.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ashfaqasp.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ashfaqasp.wordpress.com/100/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ashfaqasp.wordpress.com&amp;blog=10571646&amp;post=100&amp;subd=ashfaqasp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ashfaqasp.wordpress.com/2010/08/17/class-that-easily-encryptdecrypt-string/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f57b17934c0813c2428e6f7335020313?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Ashfaq</media:title>
		</media:content>
	</item>
	</channel>
</rss>
