<?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>Parallelcoding.com &#187; ASP</title>
	<atom:link href="http://www.parallelcoding.com/tag/asp/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.parallelcoding.com</link>
	<description>Intelligent, Efficient, Parallel, and Sustainable Code</description>
	<lastBuildDate>Thu, 02 Feb 2012 15:17:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>ASP .NET Nested Forms (Or why do I get the error &#039;Invalid postack or callback argument&#039;)</title>
		<link>http://www.parallelcoding.com/2008/03/07/asp-net-nested-forms-or-why-do-i-get-the-error-invalid-postack-or-callback-argument/</link>
		<comments>http://www.parallelcoding.com/2008/03/07/asp-net-nested-forms-or-why-do-i-get-the-error-invalid-postack-or-callback-argument/#comments</comments>
		<pubDate>Fri, 07 Mar 2008 16:57:25 +0000</pubDate>
		<dc:creator>manatarms</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP]]></category>

		<guid isPermaLink="false">http://dotanything.wordpress.com/?p=15</guid>
		<description><![CDATA[<a href="http://www.parallelcoding.com/2008/03/07/asp-net-nested-forms-or-why-do-i-get-the-error-invalid-postack-or-callback-argument/" title="ASP .NET Nested Forms (Or why do I get the error &#039;Invalid postack or callback argument&#039;)"></a>I have now come across a few situations where using nested forms in ASP .NET causes problems. The typical error produced in this case is a 'Invalid postback or callback argument' error. This occurs because ASP .NET allows the rendering &#8230;<p class="read-more"><a href="http://www.parallelcoding.com/2008/03/07/asp-net-nested-forms-or-why-do-i-get-the-error-invalid-postack-or-callback-argument/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://www.parallelcoding.com/2008/03/07/asp-net-nested-forms-or-why-do-i-get-the-error-invalid-postack-or-callback-argument/" title="ASP .NET Nested Forms (Or why do I get the error &#039;Invalid postack or callback argument&#039;)"></a><p class="MsoNormal">I have now come across a few situations where using nested forms in ASP .NET causes problems. The typical error produced in this case is a 'Invalid postback or callback argument' error. This occurs because ASP .NET allows the rendering of multiple, nested forms but fails to validate the forms when a postback occurs. Thus when ASP .NET recognizes nested forms in a page, it marks the page as not valid (Page.IsValid returns false).</p>
<p class="MsoNormal">The reason that this error occurs is because multiple, nested forms cannot reside on a single aspx page .</p>
<p class="MsoNormal">The solution is very simple: The submit button for the user created form must contain the following attribute: onclick="this.form.submit();". A recent example I came across is below. The basic form that was developed and placed inside an aspx page as a nested form was as follows (only the beginning and ending of this form is shown. The content is not necessary or relevant):</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;form accept-charset=&quot;UTF-8&quot; action=&quot;http://www.response-o-matic.com/mail.php&quot; method=&quot;post&quot; enctype=&quot;multipart/form-data&quot;&gt;
&lt;table&gt;
&lt;tbody&gt;
...
&lt;tr&gt;
&lt;td colspan=&quot;2&quot; align=&quot;center&quot;&gt;
&lt;input value=&quot;Submit Form&quot; type=&quot;submit&quot; /&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/form&gt;</pre></td></tr></table></div>

<p class="MsoNormal">The following code demonstrates the proper way of entering this form so that nested forms will work. Please note that I reiterated all of the attributes (action, method, enctype, etc...) of the form<span> </span>in the JavaScript call.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;form accept-charset=&quot;UTF-8&quot; action=&quot;http://www.response-o-matic.com/mail.php&quot; method=&quot;post&quot; enctype=&quot;multipart/form-data&quot;&gt;
&lt;table&gt;
&lt;tbody&gt;
...
&lt;tr&gt;
&lt;td&gt;
&lt;input onclick=&quot;this.form.action='http://www.response-o-matic.com/mail.php'; this.form.method='post';this.form.enctype='multipart/form-data';this.form.submit();&quot; value=&quot; Submit Form &quot; type=&quot;submit&quot; /&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/form&gt;</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.parallelcoding.com/2008/03/07/asp-net-nested-forms-or-why-do-i-get-the-error-invalid-postack-or-callback-argument/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SEO 301 Redirects for ASP .NET 1.1</title>
		<link>http://www.parallelcoding.com/2008/02/26/seo-301-redirects-for-asp-net-11/</link>
		<comments>http://www.parallelcoding.com/2008/02/26/seo-301-redirects-for-asp-net-11/#comments</comments>
		<pubDate>Tue, 26 Feb 2008 22:44:03 +0000</pubDate>
		<dc:creator>manatarms</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP]]></category>

		<guid isPermaLink="false">http://dotanything.wordpress.com/?p=14</guid>
		<description><![CDATA[<a href="http://www.parallelcoding.com/2008/02/26/seo-301-redirects-for-asp-net-11/" title="SEO 301 Redirects for ASP .NET 1.1"></a>I recently worked on a project where any URL following the form of http://www.mydomain.com/subDomain/Default.aspx needed to 301 redirect to http://www.mydomain.com/subDomain/. Basically this calls for stripping the 'Default.aspx' off of any request that has it. The project was to be completed &#8230;<p class="read-more"><a href="http://www.parallelcoding.com/2008/02/26/seo-301-redirects-for-asp-net-11/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://www.parallelcoding.com/2008/02/26/seo-301-redirects-for-asp-net-11/" title="SEO 301 Redirects for ASP .NET 1.1"></a><p>I recently worked on a project where any URL following the form of http://www.mydomain.com/subDomain/Default.aspx needed to 301 redirect to http://www.mydomain.com/subDomain/. Basically this calls for stripping the 'Default.aspx' off of any request that has it. The project was to be completed using Visual Basic .NET 1.1.</p>
<p>The solution is  is to add a few lines of code in the Global.asax.vb file inside of the  <span style="color: #0000ff;">Sub</span> Application_BeginRequest(<span style="color: #0000ff;">ByVal </span>sender <span style="color: #0000ff;">As Object</span>, ByVal e <span style="color: #0000ff;">As </span>EventArgs) function. The final product looks like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="vb" style="font-family:monospace;"><span style="color: #E56717; font-weight: bold;">Sub</span> Application_BeginRequest(<span style="color: #151B8D; font-weight: bold;">ByVal</span> sender <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">Object</span>, <span style="color: #151B8D; font-weight: bold;">ByVal</span> e AsEventArgs)
    <span style="color: #151B8D; font-weight: bold;">Dim</span> oPath <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">String</span> = Request.CurrentExecutionFilePath.ToLower
    <span style="color: #8D38C9; font-weight: bold;">If</span> <span style="color: #8D38C9; font-weight: bold;">Not</span> oPath.EndsWith(<span style="color: #800000;">&quot;default.aspx&quot;</span>) <span style="color: #8D38C9; font-weight: bold;">Then</span> Return
&nbsp;
    Response.Status = <span style="color: #800000;">&quot;301 Moved Permanently&quot;</span>
    Response.AddHeader(<span style="color: #800000;">&quot;Location&quot;</span>, <span style="color: #800000;">&quot;http://www.myDomain.com&quot;</span> +  
    oPath.Substring(0, oPath.IndexOf(<span style="color: #800000;">&quot;default.aspx&quot;</span>)))
&nbsp;
<span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #E56717; font-weight: bold;">Sub</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.parallelcoding.com/2008/02/26/seo-301-redirects-for-asp-net-11/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upload Large Files in ASP.NET</title>
		<link>http://www.parallelcoding.com/2007/12/03/upload-large-files-in-aspnet/</link>
		<comments>http://www.parallelcoding.com/2007/12/03/upload-large-files-in-aspnet/#comments</comments>
		<pubDate>Tue, 04 Dec 2007 00:43:00 +0000</pubDate>
		<dc:creator>manatarms</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP]]></category>

		<guid isPermaLink="false">http://dotanything.wordpress.com/2007/12/03/upload-large-files-in-aspnet/</guid>
		<description><![CDATA[<a href="http://www.parallelcoding.com/2007/12/03/upload-large-files-in-aspnet/" title="Upload Large Files in ASP.NET"></a>Here's the simple solution to uploading large files in ASP .net. Add a new key in the web.config. The fileSize (maxRequestLength) is in kilobytes with a default size of 4. The key to add is 1 &#60;httpRuntime maxRequestLength=&#34;2000000&#34;/&#62;]]></description>
			<content:encoded><![CDATA[<a href="http://www.parallelcoding.com/2007/12/03/upload-large-files-in-aspnet/" title="Upload Large Files in ASP.NET"></a><p>Here's the simple solution to uploading large files in ASP .net.</p>
<p>Add a new key in the web.config. The fileSize (maxRequestLength) is in kilobytes with a default size of 4.</p>
<p>The key to add is</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;httpRuntime</span> <span style="color: #000066;">maxRequestLength</span>=<span style="color: #ff0000;">&quot;2000000&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.parallelcoding.com/2007/12/03/upload-large-files-in-aspnet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

