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

<channel>
	<title>DevtheWeb.NET &#187; asp.net</title>
	<atom:link href="http://www.devtheweb.net/blog/tag/asp-net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.devtheweb.net/blog</link>
	<description></description>
	<lastBuildDate>Tue, 06 Dec 2011 19:25:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Does asp.net login control encrypt password field?</title>
		<link>http://www.devtheweb.net/blog/2010/02/27/does-asp-net-login-control-encrypt-password-field/</link>
		<comments>http://www.devtheweb.net/blog/2010/02/27/does-asp-net-login-control-encrypt-password-field/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 12:20:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[asp.net]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.devtheweb.net/blog/?p=1102</guid>
		<description><![CDATA[The asp.net login control is often used when we build an asp.net website with asp.net authentication providers. But when we think about the security, it&#8217;s good to know that when the security is important, you cannot rely on it in the HTTP protocol. The reason is that all the fields of the asp.net login control [...]]]></description>
			<content:encoded><![CDATA[<p>The asp.net login control is often used when we build an asp.net website with asp.net authentication providers. But when we think about the security, it&#8217;s good to know that when the security is important, you cannot rely on it in the HTTP protocol. The reason is that all the fields of the asp.net login control are sent as a plain text over HTTP.</p>
<p>Per MSDN:</p>
<blockquote><p>By default, the ASP.NET login controls work in plain text over HTTP. If you are concerned about security, use HTTPS with SSL encryption.</p></blockquote>
<p>The solution is to allow login access only via HTTPS.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devtheweb.net/blog/2010/02/27/does-asp-net-login-control-encrypt-password-field/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple Rotating Ad Script in ASP.NET</title>
		<link>http://www.devtheweb.net/blog/2010/02/19/simple-rotating-ad-script-in-asp-net/</link>
		<comments>http://www.devtheweb.net/blog/2010/02/19/simple-rotating-ad-script-in-asp-net/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 08:34:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[asp.net]]></category>

		<guid isPermaLink="false">http://www.devtheweb.net/blog/?p=901</guid>
		<description><![CDATA[In the home page, you can see &#8216;Your Ad Here&#8217; image. If you go to another page, you&#8217;ll see another &#8216;Your Ad Here&#8217; image. Here&#8217;s an example of rotating ad banners that you can use in your asp.net website: 1. You&#8217;ll need a folder in you web server with all the image ads in it. [...]]]></description>
			<content:encoded><![CDATA[<p>In the <a href="http://www.devtheweb.net">home page</a>, you can see &#8216;Your Ad Here&#8217; image. If you go to another page, you&#8217;ll see another &#8216;Your Ad Here&#8217; image. Here&#8217;s an example of rotating ad banners that you can use in your asp.net website:</p>
<p>1. You&#8217;ll need a folder in you web server with all the image ads in it. But this folder should contain Only the ads images and nothing else, ex. /images/ads/</p>
<p>2. In the aspx page the following code:</p>
<p>&lt;a href=&#8221;your_ad_url&#8221;&gt;<br />
&lt;%= GetYourAdHere() %&gt;<br />
&lt;/a&gt;</p>
<p>replace your_ad_url with url you want. We need to write implementation of the GetYourAdHere method:</p>
<p>3. In the code behind class add the following code:</p>
<p>using System.IO;</p>
<p>&#8230;</p>
<p>private const string _IMAGES_AD_PATH = &#8220;~/images/ads/&#8221;;<br />
private const string _IMG_AD_TAG = &#8220;&lt;img src=&#8221;http://www.devtheweb.net/images/ads/XXX&#8221; alt=&#8221;Your Ad Here&#8221; /&gt;&#8221;;</p>
<p>private static int adIndex = 0;</p>
<p>&#8230;</p>
<p>public string GetYourAdHere()<br />
{<br />
DirectoryInfo di;<br />
FileInfo[] imgAds;<br />
string result = &#8220;&#8221;;</p>
<p>try<br />
{<br />
di = new DirectoryInfo(Server.MapPath(_IMAGES_AD_PATH));</p>
<p>//t get images files<br />
imgAds = di.GetFiles();</p>
<p>result = _IMG_AD_TAG.Replace(&#8220;XXX&#8221;, imgAds[adIndex].Name);</p>
<p>if (adIndex &lt; imgAds.Count() &#8211; 1)<br />
++adIndex;<br />
else<br />
adIndex = 0;<br />
}<br />
catch (Exception)<br />
{<br />
}</p>
<p>return result;<br />
}</p>
<p>_IMAGES_AD_PATH is the path of folder with image ads.</p>
<p>_IMG_AD_TAG is template of the image tag, you can modify how you want, only XXX is used to be replaced with the image name.<br />
<!--adsense--><br />
The code should works for you if you change only these two const variables&#8217; values. Here&#8217;s an explanation about the other part of the code:</p>
<p>adIndex is a static variable which we use to store the current index of the ads images. It&#8217;s increased with 1 every time the banner ad is shown. That&#8217;s how we rotate the banners <img src='http://www.devtheweb.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.devtheweb.net/blog/2010/02/19/simple-rotating-ad-script-in-asp-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Export Textbox&#8217;s text to a file using asp.net</title>
		<link>http://www.devtheweb.net/blog/2010/02/06/export-textboxs-text-to-a-file-using-asp-net/</link>
		<comments>http://www.devtheweb.net/blog/2010/02/06/export-textboxs-text-to-a-file-using-asp-net/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 10:31:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[asp.net]]></category>

		<guid isPermaLink="false">http://www.devtheweb.net/blog/?p=872</guid>
		<description><![CDATA[In the Reduce Code Size Tool, I wanted to add ability for the users to be able to export the Output TextBox&#8217;s Text into file. It can be done dynamically, without need to create a temp file into the server. Here&#8217;s an asp.net example how it can be done: Response.Clear(); Response.AddHeader(&#8220;Content-Type&#8221;, &#8220;application/html&#8221;); Response.AddHeader(&#8220;Content-Disposition&#8221;, &#8220;attachment; filename=&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>In the <a href="http://www.devtheweb.net/tools/reduce-code-size.aspx" target="_blank">Reduce Code Size Tool</a>, I wanted to add ability for the users to be able to export the Output TextBox&#8217;s Text into file. It can be done dynamically, without need to create a temp file into the server. <!--adsense-->Here&#8217;s an asp.net example how it can be done:</p>
<p>Response.Clear();<br />
Response.AddHeader(&#8220;Content-Type&#8221;, &#8220;application/html&#8221;);<br />
Response.AddHeader(&#8220;Content-Disposition&#8221;, &#8220;attachment; filename=&#8221; + &#8220;SOME_FILENAME&#8221;);<br />
Response.Write(_YOUR_TEXTBOX_ID.Text);<br />
Response.Flush();<br />
Response.End();</p>
<p>That&#8217;s all <img src='http://www.devtheweb.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">http://www.devtheweb.net/tools/reduce-code-size.aspx</div>
]]></content:encoded>
			<wfw:commentRss>http://www.devtheweb.net/blog/2010/02/06/export-textboxs-text-to-a-file-using-asp-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Integrate PayPal Donate Button into ASP.NET Page</title>
		<link>http://www.devtheweb.net/blog/2010/01/21/how-to-integrate-paypal-donate-button-into-asp-net-page/</link>
		<comments>http://www.devtheweb.net/blog/2010/01/21/how-to-integrate-paypal-donate-button-into-asp-net-page/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 08:48:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[asp.net]]></category>
		<category><![CDATA[paypal]]></category>

		<guid isPermaLink="false">http://www.devtheweb.net/blog/?p=680</guid>
		<description><![CDATA[I&#8217;ve recently decided to add PayPal Donate Button in the current site. The generated code for the donate button was: &#60;form action=&#8221;https://www.paypal.com/cgi-bin/webscr&#8221; method=&#8221;post&#8221;&#62; &#60;input type=&#8221;hidden&#8221; name=&#8221;cmd&#8221; value=&#8221;_s-xclick&#8221; /&#62; &#60;input type=&#8221;hidden&#8221; name=&#8221;hosted_button_id&#8221; value=&#8221;11271506&#8243; /&#62; &#60;input type=&#8221;image&#8221; src=&#8221;https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif&#8221; border=&#8221;0&#8243; name=&#8221;submit&#8221; alt=&#8221;PayPal &#8211; The safer, easier way to pay online!&#8221; /&#62; &#60;img alt=&#8221;" border=&#8221;0&#8243; src=&#8221;https://www.paypal.com/en_US/i/scr/pixel.gif&#8221; width=&#8221;1&#8243; height=&#8221;1&#8243; /&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently decided to add PayPal Donate Button in the current site. The generated code for the donate button was:</p>
<p>&lt;form action=&#8221;https://www.paypal.com/cgi-bin/webscr&#8221; method=&#8221;post&#8221;&gt;<br />
&lt;input type=&#8221;hidden&#8221; name=&#8221;cmd&#8221; value=&#8221;_s-xclick&#8221; /&gt;<br />
&lt;input type=&#8221;hidden&#8221; name=&#8221;hosted_button_id&#8221; value=&#8221;11271506&#8243; /&gt;<br />
&lt;input type=&#8221;image&#8221; src=&#8221;https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif&#8221; border=&#8221;0&#8243; name=&#8221;submit&#8221; alt=&#8221;PayPal &#8211; The safer, easier way to pay online!&#8221; /&gt;<br />
&lt;img alt=&#8221;" border=&#8221;0&#8243; src=&#8221;https://www.paypal.com/en_US/i/scr/pixel.gif&#8221; width=&#8221;1&#8243; height=&#8221;1&#8243; /&gt;<br />
&lt;/form&gt;</p>
<p>Adding the donate button code in the blog was easy (it&#8217;s wordpress), but in the entire part of the site it was a problem, because it&#8217;s written in asp.net.</p>
<p>I&#8217;ve search for many solutions but most of them are too complicated, ex. why should I add 3rd party control for a simple paypal donate button!?</p>
<p>The form above can be re-written also in HTML:</p>
<p>&lt;a id=&#8221;paypalDonate&#8221; target=&#8221;_blank&#8221; href=&#8221;https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=11271506&#8243;&gt;<br />
&lt;img border=&#8221;0&#8243; id=&#8221;payPalImage&#8221; src=&#8221;https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif&#8221; alt=&#8221;Donate to DevtheWeb.NET&#8221; /&gt;<br />
&lt;/a&gt;</p>
<div><!--adsense--></div>
<p>If you want to use to code above, all you need to do is to replace hosted_button_id&#8217;s value with your value, generated for your form by PayPal and that&#8217;s really all <img src='http://www.devtheweb.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div>
 &nbsp;
</div>
<form id="formPoll" method="post" action="http://www.devtheweb.net/polls/poll-is-it-awful-to-have-only-one-server-side-form-tag-in-asp-net-page.aspx?embed=true#vote">
<div><strong>Is it awful to have only one server-side Form tag in asp.net page?</strong></div>
<div>&nbsp;</div>
<div>
<input value="option1" id="option1" type="radio" name="poll" /><label for="option1">Yes</label></div>
<div>
<input value="option2" id="option2" type="radio" name="poll" /><label for="option2">No</label></div>
<div>
<input value="option3" id="option3" type="radio" name="poll" /><label for="option3">I don&#8217;t know</label></div>
<div>&nbsp;</div>
<div>
<input type="submit" value="VOTE" onclick="this.form.target='_blank';return true;" /></div>
<div>&nbsp;</div>
<div><a href="http://www.devtheweb.net/polls/poll-is-it-awful-to-have-only-one-server-side-form-tag-in-asp-net-page.aspx#results" target="_blank">View Results</a></div>
</form>
]]></content:encoded>
			<wfw:commentRss>http://www.devtheweb.net/blog/2010/01/21/how-to-integrate-paypal-donate-button-into-asp-net-page/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>8 Advantages of ASP.NET over PHP</title>
		<link>http://www.devtheweb.net/blog/2009/08/25/8-advantages-of-asp-net-over-php/</link>
		<comments>http://www.devtheweb.net/blog/2009/08/25/8-advantages-of-asp-net-over-php/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 14:06:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[asp.net]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://dev-the-web.com/blog/?p=120</guid>
		<description><![CDATA[1. The code-behind allows you easier to maintain the code when it comes to large websites. 2. You have the freedom of choosing from multiple languages (C#, VB.NET, C++, etc.) 3. SQL Server is also very fast, secure, and it can store extremely large amounts of data; actually, there&#8217;s no limit; 4. With ASP.NET you [...]]]></description>
			<content:encoded><![CDATA[<p><strong>1.</strong> The code-behind allows you easier to maintain the code when it comes to large websites.</p>
<p><strong>2.</strong> You have the freedom of choosing from multiple languages (C#, VB.NET, C++, etc.)</p>
<p><strong>3.</strong> SQL Server is also very fast, secure, and it can store extremely large amounts of data; actually, there&#8217;s no limit;</p>
<p><strong>4.</strong> With ASP.NET you get the whole .NET Class Library and the thousands of third party components as well. There are definitely much more third party components out there for .NET than for PHP.</p>
<p><img class="alignnone size-medium wp-image-121" title="asp.net-vs.-php-round-1" src="http://devtheweb.net/blog/wp-content/uploads/2009/08/asp.net-vs.-php-round-1-300x225.jpg" alt="asp.net-vs.-php-round-1" width="300" height="225" /></p>
<p><strong>5.</strong> The Visual Studio .NET IDE. makes coding much, much easier. It can highlight syntax, let you know when the wrong stuff is commented, do command completion, and just plain help you organize better. Visual Studio has a really nice debugger.</p>
<p><strong>6.</strong> The Compiled Code (vs. PHP Interpreted Code) &#8211; .NET compiles code, such as C#, into what its creators have termed MSIL (Microsoft Intermediate Language).</p>
<p><strong>7.</strong> In ASP.NET it&#8217;s easy to use threads and build asynchronous handlers in your server-side web code.</p>
<p><strong>8. </strong>ASP.NET developers are paid better</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devtheweb.net/blog/2009/08/25/8-advantages-of-asp-net-over-php/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

