<?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>www.kevincornwell.com &#187; ASP</title>
	<atom:link href="http://www.kevincornwell.com/blog/index.php/category/asp/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kevincornwell.com/blog</link>
	<description></description>
	<lastBuildDate>Thu, 02 Dec 2010 16:31:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.2</generator>
		<item>
		<title>ASP.NET Add Sub Header Row (Group) To GridView Control</title>
		<link>http://www.kevincornwell.com/blog/index.php/asp-net-add-subheader-row-group-to-gridview-control/</link>
		<comments>http://www.kevincornwell.com/blog/index.php/asp-net-add-subheader-row-group-to-gridview-control/#comments</comments>
		<pubDate>Thu, 02 Dec 2010 15:16:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP]]></category>
		<category><![CDATA[microsoft]]></category>

		<guid isPermaLink="false">http://www.kevincornwell.com/blog/?p=275</guid>
		<description><![CDATA[''' &#60;summary&#62; ''' Insert a sub header in a grid view. ''' &#60;/summary&#62; ''' &#60;param name=&#34;gv&#34;&#62;The GridView to insert the sub header row into.&#60;/param&#62; ''' &#60;param name=&#34;gvrBeforeRow&#34;&#62;The GridViewRow to insert the sub header before.&#60;/param&#62; ''' &#60;param name=&#34;sSubHeaderText&#34;&#62;The text to render in the sub header.&#60;/param&#62; ''' &#60;remarks&#62;&#60;/remarks&#62; Protected Sub insertGroupHeaderToGridView&#40;ByRef gv As GridView, ByVal gvrBeforeRow As [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.kevincornwell.com/blog/wp-content/uploads/2010/12/sub_group_headers_gridview.jpg"><img src="http://www.kevincornwell.com/blog/wp-content/uploads/2010/12/sub_group_headers_gridview-300x200.jpg" alt="" title="sub_group_headers_gridview" width="300" height="200" class="alignnone size-medium wp-image-288" /></a></p>

<div class="wp_syntax"><div class="code"><pre class="vbnet">    <span style="color: #008080; font-style: italic;">''' &lt;summary&gt;</span>
    <span style="color: #008080; font-style: italic;">''' Insert a sub header in a grid view.</span>
    <span style="color: #008080; font-style: italic;">''' &lt;/summary&gt;</span>
    <span style="color: #008080; font-style: italic;">''' &lt;param name=&quot;gv&quot;&gt;The GridView to insert the sub header row into.&lt;/param&gt;</span>
    <span style="color: #008080; font-style: italic;">''' &lt;param name=&quot;gvrBeforeRow&quot;&gt;The GridViewRow to insert the sub header before.&lt;/param&gt;</span>
    <span style="color: #008080; font-style: italic;">''' &lt;param name=&quot;sSubHeaderText&quot;&gt;The text to render in the sub header.&lt;/param&gt;</span>
    <span style="color: #008080; font-style: italic;">''' &lt;remarks&gt;&lt;/remarks&gt;</span>
    Protected <span style="color: #0600FF;">Sub</span> insertGroupHeaderToGridView<span style="color: #000000;">&#40;</span><span style="color: #FF8000;">ByRef</span> gv <span style="color: #FF8000;">As</span> GridView, <span style="color: #FF8000;">ByVal</span> gvrBeforeRow <span style="color: #FF8000;">As</span> GridViewRow, <span style="color: #FF8000;">ByVal</span> sSubHeaderText <span style="color: #FF8000;">As</span> <span style="color: #FF8000;">String</span><span style="color: #000000;">&#41;</span>
&nbsp;
        <span style="color: #0600FF;">Dim</span> visibleColumns <span style="color: #FF8000;">As</span> <span style="color: #FF0000;">Integer</span> = gv.<span style="color: #0000FF;">Columns</span>.<span style="color: #0000FF;">Count</span>
&nbsp;
        <span style="color: #0600FF;">Dim</span> tbl <span style="color: #FF8000;">As</span> Table = gv.<span style="color: #0000FF;">Controls</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">0</span><span style="color: #000000;">&#41;</span>
        <span style="color: #0600FF;">Dim</span> newRowIndex <span style="color: #FF8000;">As</span> <span style="color: #FF0000;">Integer</span> = tbl.<span style="color: #0000FF;">Rows</span>.<span style="color: #0000FF;">GetRowIndex</span><span style="color: #000000;">&#40;</span>gvrBeforeRow<span style="color: #000000;">&#41;</span>
        <span style="color: #0600FF;">Dim</span> newRow <span style="color: #FF8000;">As</span> GridViewRow = <span style="color: #FF8000;">New</span> GridViewRow<span style="color: #000000;">&#40;</span>newRowIndex, newRowIndex, DataControlRowType.<span style="color: #0000FF;">DataRow</span>, DataControlRowState.<span style="color: #0600FF;">Normal</span><span style="color: #000000;">&#41;</span>
&nbsp;
        newRow.<span style="color: #0000FF;">Cells</span>.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #FF8000;">New</span> TableCell<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>
&nbsp;
        <span style="color: #0600FF;">If</span> <span style="color: #000000;">&#40;</span>visibleColumns &gt; <span style="color: #FF0000;">1</span><span style="color: #000000;">&#41;</span> <span style="color: #FF8000;">Then</span>
            newRow.<span style="color: #0000FF;">Cells</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">0</span><span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">ColumnSpan</span> = visibleColumns
            newRow.<span style="color: #0000FF;">Cells</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">0</span><span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">Text</span> = sSubHeaderText
        <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span>
&nbsp;
        tbl.<span style="color: #0000FF;">Controls</span>.<span style="color: #0000FF;">AddAt</span><span style="color: #000000;">&#40;</span>newRowIndex, newRow<span style="color: #000000;">&#41;</span>
&nbsp;
    <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Sub</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.kevincornwell.com/blog/index.php/asp-net-add-subheader-row-group-to-gridview-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>.NET DataGrid (or GridView) To Excel Utility</title>
		<link>http://www.kevincornwell.com/blog/index.php/net-datagrid-or-gridview-to-excel-utility/</link>
		<comments>http://www.kevincornwell.com/blog/index.php/net-datagrid-or-gridview-to-excel-utility/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 15:00:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.kevincornwell.com/blog/index.php/net-datagrid-to-excel-utility/</guid>
		<description><![CDATA[protected void Button3_Click&#40;object sender, EventArgs e&#41; &#123; &#160; &#160; DataSet dsExport = dataSet; DataGrid dgExport = new DataGrid&#40;&#41;; dgExport.DataSource = dsExport; &#160; //ExportToExcel(); &#160; DataGridToExcel&#40;dgExport, Response&#41;; &#125; &#160; protected void DataGridToExcel&#40;DataGrid dGridExport, HttpResponse httpResp&#41; &#123; httpResp.Clear&#40;&#41;; httpResp.Charset = &#34;&#34;; httpResp.ContentType = &#34;application/vnd.ms-excel&#34;; StringWriter stringWrite = new StringWriter&#40;&#41;; HtmlTextWriter htmlWrite = new HtmlTextWriter&#40;stringWrite&#41;; DataGrid dGrid = [...]]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="csharp">    <span style="color: #0600FF;">protected</span> <span style="color: #0600FF;">void</span> Button3_Click<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">object</span> sender, EventArgs e<span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
&nbsp;
&nbsp;
        DataSet dsExport = dataSet;
        DataGrid dgExport = <span style="color: #008000;">new</span> DataGrid<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
        dgExport.<span style="color: #0000FF;">DataSource</span> = dsExport;
&nbsp;
        <span style="color: #008080; font-style: italic;">//ExportToExcel();</span>
&nbsp;
        DataGridToExcel<span style="color: #000000;">&#40;</span>dgExport, Response<span style="color: #000000;">&#41;</span>;
    <span style="color: #000000;">&#125;</span>
&nbsp;
    <span style="color: #0600FF;">protected</span> <span style="color: #0600FF;">void</span> DataGridToExcel<span style="color: #000000;">&#40;</span>DataGrid dGridExport, HttpResponse httpResp<span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
        httpResp.<span style="color: #0000FF;">Clear</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
        httpResp.<span style="color: #0000FF;">Charset</span> = <span style="color: #808080;">&quot;&quot;</span>;
        httpResp.<span style="color: #0000FF;">ContentType</span> = <span style="color: #808080;">&quot;application/vnd.ms-excel&quot;</span>;
        StringWriter stringWrite = <span style="color: #008000;">new</span> StringWriter<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
        HtmlTextWriter htmlWrite = <span style="color: #008000;">new</span> HtmlTextWriter<span style="color: #000000;">&#40;</span>stringWrite<span style="color: #000000;">&#41;</span>;
        DataGrid dGrid = <span style="color: #008000;">new</span> DataGrid<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
        dGrid = dGridExport;
        dGrid.<span style="color: #0000FF;">HeaderStyle</span>.<span style="color: #0000FF;">Font</span>.<span style="color: #0000FF;">Bold</span> = <span style="color: #0600FF;">true</span>;
        dGrid.<span style="color: #0000FF;">DataBind</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
        dGrid.<span style="color: #0000FF;">RenderControl</span><span style="color: #000000;">&#40;</span>htmlWrite<span style="color: #000000;">&#41;</span>;
        httpResp.<span style="color: #0000FF;">Write</span><span style="color: #000000;">&#40;</span>stringWrite.<span style="color: #0000FF;">ToString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
        httpResp.<span style="color: #0000FF;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
    <span style="color: #000000;">&#125;</span></pre></div></div>

<p>Or to export a DataGrid to Excel use:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp">    <span style="color: #0600FF;">protected</span> <span style="color: #0600FF;">void</span> LinkButton1_Click<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">object</span> sender, EventArgs e<span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
        exportToExcel<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
    <span style="color: #000000;">&#125;</span>
&nbsp;
    <span style="color: #0600FF;">protected</span> <span style="color: #0600FF;">void</span> exportToExcel<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
        VerifyRenderingInServerForm<span style="color: #000000;">&#40;</span>GridView1<span style="color: #000000;">&#41;</span>;
&nbsp;
        <span style="color: #008080; font-style: italic;">/* This is a limit in Excel prior to Office 2007 */</span>
        <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>GridView1.<span style="color: #0000FF;">Rows</span>.<span style="color: #0000FF;">Count</span> &gt; <span style="color: #FF0000;">65536</span><span style="color: #000000;">&#41;</span>
        <span style="color: #000000;">&#123;</span>
            Page.<span style="color: #0000FF;">Response</span>.<span style="color: #0000FF;">Clear</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
            Page.<span style="color: #0000FF;">Response</span>.<span style="color: #0000FF;">Write</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;Too many lines to export.&quot;</span><span style="color: #000000;">&#41;</span>;
            Page.<span style="color: #0000FF;">Response</span>.<span style="color: #0000FF;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
        <span style="color: #000000;">&#125;</span>
        GridView1.<span style="color: #0000FF;">AllowPaging</span> = <span style="color: #0600FF;">false</span>;
        GridView1.<span style="color: #0000FF;">AllowSorting</span> = <span style="color: #0600FF;">false</span>;
        GridView1.<span style="color: #0000FF;">DataBind</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
        Response.<span style="color: #0000FF;">Clear</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
        Response.<span style="color: #0000FF;">AddHeader</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;content-disposition&quot;</span>, <span style="color: #808080;">&quot;attachment; filename=FileName.xls&quot;</span><span style="color: #000000;">&#41;</span>;
        Response.<span style="color: #0000FF;">Charset</span> = <span style="color: #808080;">&quot;&quot;</span>;
        <span style="color: #008080; font-style: italic;">// If you want the option to open the Excel file without saving than</span>
        <span style="color: #008080; font-style: italic;">// comment out the line below</span>
        <span style="color: #008080; font-style: italic;">// Response.Cache.SetCacheability(HttpCacheability.NoCache);</span>
        Response.<span style="color: #0000FF;">ContentType</span> = <span style="color: #808080;">&quot;application/vnd.xls&quot;</span>;
        <span style="color: #000000;">System</span>.<span style="color: #0000FF;">IO</span>.<span style="color: #0000FF;">StringWriter</span> stringWrite = <span style="color: #008000;">new</span> <span style="color: #000000;">System</span>.<span style="color: #0000FF;">IO</span>.<span style="color: #0000FF;">StringWriter</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
        <span style="color: #000000;">System</span>.<span style="color: #0000FF;">Web</span>.<span style="color: #0000FF;">UI</span>.<span style="color: #0000FF;">HtmlTextWriter</span> htmlWrite = <span style="color: #008000;">new</span> HtmlTextWriter<span style="color: #000000;">&#40;</span>stringWrite<span style="color: #000000;">&#41;</span>;
        GridView1.<span style="color: #0000FF;">RenderControl</span><span style="color: #000000;">&#40;</span>htmlWrite<span style="color: #000000;">&#41;</span>;
        Response.<span style="color: #0000FF;">Write</span><span style="color: #000000;">&#40;</span>stringWrite.<span style="color: #0000FF;">ToString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
        Response.<span style="color: #0000FF;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
    <span style="color: #000000;">&#125;</span>
&nbsp;
    <span style="color: #0600FF;">public</span> <span style="color: #0600FF;">override</span> <span style="color: #0600FF;">void</span> VerifyRenderingInServerForm<span style="color: #000000;">&#40;</span>Control control<span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
        <span style="color: #008080; font-style: italic;">/* Confirms that an HtmlForm control is rendered for the specified ASP.NET
           server control at run time. */</span>
    <span style="color: #000000;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.kevincornwell.com/blog/index.php/net-datagrid-or-gridview-to-excel-utility/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP.NET &#8211; Test NTFS Directory Access</title>
		<link>http://www.kevincornwell.com/blog/index.php/aspnet-test-ntfs-directory-access/</link>
		<comments>http://www.kevincornwell.com/blog/index.php/aspnet-test-ntfs-directory-access/#comments</comments>
		<pubDate>Fri, 05 Oct 2007 20:42:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.kevincornwell.com/blog/index.php/aspnet-test-ntfs-directory-access/</guid>
		<description><![CDATA[protected void Page_Load&#40;object sender, EventArgs e&#41; &#123; &#160; // Show admin link if they have access to the admin directory. // &#160; hyperLinkAdmin.Visible = hasAccessToDir&#40;&#34;admin&#34;&#41;; &#125; &#160; protected bool hasAccessToDir&#40;string dir&#41; &#123; return System.IO.Directory.Exists&#40;MapPath&#40;dir&#41;&#41;; &#125;]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="csharp">    <span style="color: #0600FF;">protected</span> <span style="color: #0600FF;">void</span> Page_Load<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">object</span> sender, EventArgs e<span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
&nbsp;
        <span style="color: #008080; font-style: italic;">// Show admin link if they have access to the admin directory. //</span>
&nbsp;
        hyperLinkAdmin.<span style="color: #0000FF;">Visible</span> = hasAccessToDir<span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;admin&quot;</span><span style="color: #000000;">&#41;</span>;
    <span style="color: #000000;">&#125;</span>
&nbsp;
    <span style="color: #0600FF;">protected</span> <span style="color: #FF0000;">bool</span> hasAccessToDir<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">string</span> dir<span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
        <span style="color: #0600FF;">return</span> <span style="color: #000000;">System</span>.<span style="color: #0000FF;">IO</span>.<span style="color: #0000FF;">Directory</span>.<span style="color: #0000FF;">Exists</span><span style="color: #000000;">&#40;</span>MapPath<span style="color: #000000;">&#40;</span>dir<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
    <span style="color: #000000;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.kevincornwell.com/blog/index.php/aspnet-test-ntfs-directory-access/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to dynamically add a table row with input fields in .NET.</title>
		<link>http://www.kevincornwell.com/blog/index.php/how-to-dynamically-add-a-table-row-with-input-fields-in-net/</link>
		<comments>http://www.kevincornwell.com/blog/index.php/how-to-dynamically-add-a-table-row-with-input-fields-in-net/#comments</comments>
		<pubDate>Wed, 27 Jun 2007 21:57:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.kevincornwell.com/blog/index.php/how-to-dynamically-add-a-table-row-with-input-fields-in-net/</guid>
		<description><![CDATA[C# using Visual Studio 2005&#8230; using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; &#160; public partial class _Default : System.Web.UI.Page &#123; // How many rows when the page initially loads. static int tDefaultRow_Count = 10; // Max number of rows. static int tMaxRows = 50; [...]]]></description>
			<content:encoded><![CDATA[<p>C# using Visual Studio 2005&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="csharp"><span style="color: #0600FF;">using</span> <span style="color: #000000;">System</span>;
<span style="color: #0600FF;">using</span> <span style="color: #000000;">System</span>.<span style="color: #0000FF;">Data</span>;
<span style="color: #0600FF;">using</span> <span style="color: #000000;">System</span>.<span style="color: #0000FF;">Configuration</span>;
<span style="color: #0600FF;">using</span> <span style="color: #000000;">System</span>.<span style="color: #0000FF;">Web</span>;
<span style="color: #0600FF;">using</span> <span style="color: #000000;">System</span>.<span style="color: #0000FF;">Web</span>.<span style="color: #0000FF;">Security</span>;
<span style="color: #0600FF;">using</span> <span style="color: #000000;">System</span>.<span style="color: #0000FF;">Web</span>.<span style="color: #0000FF;">UI</span>;
<span style="color: #0600FF;">using</span> <span style="color: #000000;">System</span>.<span style="color: #0000FF;">Web</span>.<span style="color: #0000FF;">UI</span>.<span style="color: #0000FF;">WebControls</span>;
<span style="color: #0600FF;">using</span> <span style="color: #000000;">System</span>.<span style="color: #0000FF;">Web</span>.<span style="color: #0000FF;">UI</span>.<span style="color: #0000FF;">WebControls</span>.<span style="color: #0000FF;">WebParts</span>;
<span style="color: #0600FF;">using</span> <span style="color: #000000;">System</span>.<span style="color: #0000FF;">Web</span>.<span style="color: #0000FF;">UI</span>.<span style="color: #0000FF;">HtmlControls</span>;
&nbsp;
<span style="color: #0600FF;">public</span> partial <span style="color: #FF0000;">class</span> _Default : <span style="color: #000000;">System</span>.<span style="color: #0000FF;">Web</span>.<span style="color: #0000FF;">UI</span>.<span style="color: #0000FF;">Page</span> 
<span style="color: #000000;">&#123;</span>
    <span style="color: #008080; font-style: italic;">// How many rows when the page initially loads.</span>
    <span style="color: #0600FF;">static</span> <span style="color: #FF0000;">int</span> tDefaultRow_Count = <span style="color: #FF0000;">10</span>;
    <span style="color: #008080; font-style: italic;">// Max number of rows.</span>
    <span style="color: #0600FF;">static</span> <span style="color: #FF0000;">int</span> tMaxRows = <span style="color: #FF0000;">50</span>;
&nbsp;
    <span style="color: #008080; font-style: italic;">// Do not modify the following.</span>
    <span style="color: #0600FF;">private</span> <span style="color: #FF0000;">int</span> tUserAddedRowCount = <span style="color: #FF0000;">0</span>;
    <span style="color: #0600FF;">static</span> TextBox<span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span> TextBox_Item = <span style="color: #008000;">new</span> TextBox<span style="color: #000000;">&#91;</span>tMaxRows<span style="color: #000000;">&#93;</span>;
    <span style="color: #0600FF;">static</span> TextBox<span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span> TextBox_Desc = <span style="color: #008000;">new</span> TextBox<span style="color: #000000;">&#91;</span>tMaxRows<span style="color: #000000;">&#93;</span>;
    <span style="color: #0600FF;">static</span> TextBox<span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span> TextBox_Quantity = <span style="color: #008000;">new</span> TextBox<span style="color: #000000;">&#91;</span>tMaxRows<span style="color: #000000;">&#93;</span>;
    <span style="color: #0600FF;">static</span> TextBox<span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span> TextBox_Price = <span style="color: #008000;">new</span> TextBox<span style="color: #000000;">&#91;</span>tMaxRows<span style="color: #000000;">&#93;</span>;
    <span style="color: #0600FF;">static</span> TextBox<span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span> TextBox_Total = <span style="color: #008000;">new</span> TextBox<span style="color: #000000;">&#91;</span>tMaxRows<span style="color: #000000;">&#93;</span>;
&nbsp;
    <span style="color: #0600FF;">protected</span> <span style="color: #0600FF;">void</span> Page_Load<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">object</span> sender, EventArgs e<span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
        tUserAddedRowCount = <span style="color: #000000;">&#40;</span>ViewState<span style="color: #000000;">&#91;</span><span style="color: #808080;">&quot;tUserAddedRowCount&quot;</span><span style="color: #000000;">&#93;</span> != <span style="color: #0600FF;">null</span><span style="color: #000000;">&#41;</span> ? <span style="color: #FF0000;">int</span>.<span style="color: #0000FF;">Parse</span><span style="color: #000000;">&#40;</span>ViewState<span style="color: #000000;">&#91;</span><span style="color: #808080;">&quot;tUserAddedRowCount&quot;</span><span style="color: #000000;">&#93;</span>.<span style="color: #0000FF;">ToString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> : <span style="color: #FF0000;">0</span>;
        <span style="color: #008080; font-style: italic;">//Response.Write(&quot;User Rows: &quot; + tUserAddedRowCount + &quot;\r\n&quot;);</span>
&nbsp;
        <span style="color: #008080; font-style: italic;">// Recreate the extra rows created by the user on postback</span>
        <span style="color: #008080; font-style: italic;">// events (required to maintain state).</span>
        Add_Table_Rows<span style="color: #000000;">&#40;</span>tUserAddedRowCount + tDefaultRow_Count<span style="color: #000000;">&#41;</span>;
    <span style="color: #000000;">&#125;</span>
&nbsp;
    <span style="color: #0600FF;">protected</span> <span style="color: #0600FF;">void</span> Button1_Click<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">object</span> sender, EventArgs e<span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
            <span style="color: #008080; font-style: italic;">// User clicked &quot;add a row&quot; button.</span>
&nbsp;
            Add_Table_Rows<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">1</span><span style="color: #000000;">&#41;</span>;
            ViewState<span style="color: #000000;">&#91;</span><span style="color: #808080;">&quot;tUserAddedRowCount&quot;</span><span style="color: #000000;">&#93;</span> = ++tUserAddedRowCount;
    <span style="color: #000000;">&#125;</span>
&nbsp;
    <span style="color: #0600FF;">protected</span> <span style="color: #0600FF;">void</span> Button2_Click<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">object</span> sender, EventArgs e<span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
        <span style="color: #008080; font-style: italic;">// User clicked &quot;Submit&quot; button.</span>
&nbsp;
        <span style="color: #0600FF;">for</span> <span style="color: #000000;">&#40;</span><span style="color: #FF0000;">int</span> x = <span style="color: #FF0000;">0</span>; x &lt; tDefaultRow_Count + tUserAddedRowCount; x++<span style="color: #000000;">&#41;</span>
        <span style="color: #000000;">&#123;</span>
&nbsp;
            <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>TextBox_Item<span style="color: #000000;">&#91;</span>x<span style="color: #000000;">&#93;</span>.<span style="color: #0000FF;">Text</span>.<span style="color: #0000FF;">ToString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">Length</span> &gt; <span style="color: #FF0000;">0</span><span style="color: #000000;">&#41;</span> 
            <span style="color: #000000;">&#123;</span> 
                Response.<span style="color: #0000FF;">Write</span><span style="color: #000000;">&#40;</span>TextBox_Item<span style="color: #000000;">&#91;</span>x<span style="color: #000000;">&#93;</span>.<span style="color: #0000FF;">Text</span>.<span style="color: #0000FF;">ToString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
                Response.<span style="color: #0000FF;">Write</span><span style="color: #000000;">&#40;</span>TextBox_Desc<span style="color: #000000;">&#91;</span>x<span style="color: #000000;">&#93;</span>.<span style="color: #0000FF;">Text</span>.<span style="color: #0000FF;">ToString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
                Response.<span style="color: #0000FF;">Write</span><span style="color: #000000;">&#40;</span>TextBox_Quantity<span style="color: #000000;">&#91;</span>x<span style="color: #000000;">&#93;</span>.<span style="color: #0000FF;">Text</span>.<span style="color: #0000FF;">ToString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
                Response.<span style="color: #0000FF;">Write</span><span style="color: #000000;">&#40;</span>TextBox_Price<span style="color: #000000;">&#91;</span>x<span style="color: #000000;">&#93;</span>.<span style="color: #0000FF;">Text</span>.<span style="color: #0000FF;">ToString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
                Response.<span style="color: #0000FF;">Write</span><span style="color: #000000;">&#40;</span>TextBox_Total<span style="color: #000000;">&#91;</span>x<span style="color: #000000;">&#93;</span>.<span style="color: #0000FF;">Text</span>.<span style="color: #0000FF;">ToString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
            <span style="color: #000000;">&#125;</span>
        <span style="color: #000000;">&#125;</span>
    <span style="color: #000000;">&#125;</span>
&nbsp;
    <span style="color: #0600FF;">private</span> <span style="color: #0600FF;">void</span> Add_Table_Rows<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">int</span> NumberOfRows<span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
        <span style="color: #0600FF;">for</span> <span style="color: #000000;">&#40;</span><span style="color: #FF0000;">int</span> x = <span style="color: #FF0000;">0</span>; x &lt; NumberOfRows; x++<span style="color: #000000;">&#41;</span>
        <span style="color: #000000;">&#123;</span>
            TableRow myRow = <span style="color: #008000;">new</span> TableRow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
            Table1.<span style="color: #0000FF;">Rows</span>.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span>myRow<span style="color: #000000;">&#41;</span>;
&nbsp;
            TableCell myCell0 = <span style="color: #008000;">new</span> TableCell<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
            myRow.<span style="color: #0000FF;">Cells</span>.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span>myCell0<span style="color: #000000;">&#41;</span>;
            TextBox myTextbox0 = <span style="color: #008000;">new</span> TextBox<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
            TextBox_Item<span style="color: #000000;">&#91;</span>x<span style="color: #000000;">&#93;</span> = myTextbox0;
            myCell0.<span style="color: #0000FF;">Controls</span>.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span>TextBox_Item<span style="color: #000000;">&#91;</span>x<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
            TableCell myCell1 = <span style="color: #008000;">new</span> TableCell<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
            myRow.<span style="color: #0000FF;">Cells</span>.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span>myCell1<span style="color: #000000;">&#41;</span>;
            TextBox myTextbox1 = <span style="color: #008000;">new</span> TextBox<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
            TextBox_Desc<span style="color: #000000;">&#91;</span>x<span style="color: #000000;">&#93;</span> = myTextbox1;
            myCell1.<span style="color: #0000FF;">Controls</span>.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span>TextBox_Desc<span style="color: #000000;">&#91;</span>x<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
            TableCell myCell2 = <span style="color: #008000;">new</span> TableCell<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
            myRow.<span style="color: #0000FF;">Cells</span>.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span>myCell2<span style="color: #000000;">&#41;</span>;
            TextBox myTextbox2 = <span style="color: #008000;">new</span> TextBox<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
            TextBox_Quantity<span style="color: #000000;">&#91;</span>x<span style="color: #000000;">&#93;</span> = myTextbox2;
            myCell2.<span style="color: #0000FF;">Controls</span>.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span>TextBox_Quantity<span style="color: #000000;">&#91;</span>x<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
            TableCell myCell3 = <span style="color: #008000;">new</span> TableCell<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
            myRow.<span style="color: #0000FF;">Cells</span>.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span>myCell3<span style="color: #000000;">&#41;</span>;
            TextBox myTextbox3 = <span style="color: #008000;">new</span> TextBox<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
            TextBox_Price<span style="color: #000000;">&#91;</span>x<span style="color: #000000;">&#93;</span> = myTextbox3;
            myCell3.<span style="color: #0000FF;">Controls</span>.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span>TextBox_Price<span style="color: #000000;">&#91;</span>x<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
            TableCell myCell4 = <span style="color: #008000;">new</span> TableCell<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
            myRow.<span style="color: #0000FF;">Cells</span>.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span>myCell4<span style="color: #000000;">&#41;</span>;
            TextBox myTextbox4 = <span style="color: #008000;">new</span> TextBox<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
            TextBox_Total<span style="color: #000000;">&#91;</span>x<span style="color: #000000;">&#93;</span> = myTextbox4;
            myCell4.<span style="color: #0000FF;">Controls</span>.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span>TextBox_Total<span style="color: #000000;">&#91;</span>x<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
        <span style="color: #000000;">&#125;</span>
    <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.kevincornwell.com/blog/index.php/how-to-dynamically-add-a-table-row-with-input-fields-in-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enable .NET Web Extensions In ISS via Command Line</title>
		<link>http://www.kevincornwell.com/blog/index.php/enable-net-web-extensions-in-iss-via-command-line/</link>
		<comments>http://www.kevincornwell.com/blog/index.php/enable-net-web-extensions-in-iss-via-command-line/#comments</comments>
		<pubDate>Tue, 22 May 2007 18:56:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.kevincornwell.com/blog/index.php/enable-net-web-extensions-in-iss-via-command-line/</guid>
		<description><![CDATA[From command line C:\WINDOWS\Microsoft.NET\Framework\[framework version]\aspnet_regiis.exe -r After that has run, goto IIS &#8211;> Web Service Extensions &#8211;> ASP.NET [framework version] &#8211;> Enable.]]></description>
			<content:encoded><![CDATA[<p>From command line</p>
<pre>
C:\WINDOWS\Microsoft.NET\Framework\[framework version]\aspnet_regiis.exe -r
</pre>
<p>After that has run, goto IIS &#8211;> Web Service Extensions &#8211;> ASP.NET [framework version] &#8211;> Enable.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevincornwell.com/blog/index.php/enable-net-web-extensions-in-iss-via-command-line/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ASP.NET Excel Function</title>
		<link>http://www.kevincornwell.com/blog/index.php/aspnet-excel-function/</link>
		<comments>http://www.kevincornwell.com/blog/index.php/aspnet-excel-function/#comments</comments>
		<pubDate>Wed, 18 Apr 2007 17:50:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.kevincornwell.com/blog/index.php/aspnet-excel-function/</guid>
		<description><![CDATA[This function written in c# builds a MS excel out of a dataSet. private DataSet dataSet = new DataSet&#40;&#41;; private DataView dView = new DataView&#40;&#41;; &#160; private void LoadPeople&#40;&#41; &#123; SqlConnection conn = new SqlConnection&#40;&#34;Data Source=asdf;User ID=asdf;Password=asdf;Database=Directory&#34;&#41;; SqlDataAdapter dAdapter = new SqlDataAdapter&#40;&#34;SELECT * FROM People&#34;, conn&#41;; dAdapter.Fill&#40;dataSet, &#34;peeps&#34;&#41;; dView.Table = dataSet.Tables&#91;&#34;peeps&#34;&#93;; personel_cnt = dView.Count; dView.Table.Columns.Add&#40;&#34;is_a_member&#34;&#41;; [...]]]></description>
			<content:encoded><![CDATA[<p>This function written in c# builds a MS excel out of a dataSet.</p>

<div class="wp_syntax"><div class="code"><pre class="csharp">    <span style="color: #0600FF;">private</span> DataSet dataSet = <span style="color: #008000;">new</span> DataSet<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
    <span style="color: #0600FF;">private</span> DataView dView = <span style="color: #008000;">new</span> DataView<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
    <span style="color: #0600FF;">private</span> <span style="color: #0600FF;">void</span> LoadPeople<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
        SqlConnection conn = <span style="color: #008000;">new</span> SqlConnection<span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;Data Source=asdf;User ID=asdf;Password=asdf;Database=Directory&quot;</span><span style="color: #000000;">&#41;</span>;
        SqlDataAdapter dAdapter = <span style="color: #008000;">new</span> SqlDataAdapter<span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;SELECT * FROM People&quot;</span>, conn<span style="color: #000000;">&#41;</span>;
        dAdapter.<span style="color: #0000FF;">Fill</span><span style="color: #000000;">&#40;</span>dataSet, <span style="color: #808080;">&quot;peeps&quot;</span><span style="color: #000000;">&#41;</span>;
        dView.<span style="color: #0000FF;">Table</span> = dataSet.<span style="color: #0000FF;">Tables</span><span style="color: #000000;">&#91;</span><span style="color: #808080;">&quot;peeps&quot;</span><span style="color: #000000;">&#93;</span>;
        personel_cnt = dView.<span style="color: #0000FF;">Count</span>;
        dView.<span style="color: #0000FF;">Table</span>.<span style="color: #0000FF;">Columns</span>.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;is_a_member&quot;</span><span style="color: #000000;">&#41;</span>;
        conn.<span style="color: #0000FF;">Close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
    <span style="color: #000000;">&#125;</span>
&nbsp;
    <span style="color: #0600FF;">private</span> <span style="color: #0600FF;">void</span> buildExcelReport<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
        DataSet dsExport = dataSet;
        <span style="color: #000000;">System</span>.<span style="color: #0000FF;">IO</span>.<span style="color: #0000FF;">StringWriter</span> tw = <span style="color: #008000;">new</span> <span style="color: #000000;">System</span>.<span style="color: #0000FF;">IO</span>.<span style="color: #0000FF;">StringWriter</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
        <span style="color: #000000;">System</span>.<span style="color: #0000FF;">Web</span>.<span style="color: #0000FF;">UI</span>.<span style="color: #0000FF;">HtmlTextWriter</span> hw =
           <span style="color: #008000;">new</span> <span style="color: #000000;">System</span>.<span style="color: #0000FF;">Web</span>.<span style="color: #0000FF;">UI</span>.<span style="color: #0000FF;">HtmlTextWriter</span><span style="color: #000000;">&#40;</span>tw<span style="color: #000000;">&#41;</span>;
        DataGrid dgGrid = <span style="color: #008000;">new</span> DataGrid<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
        dgGrid.<span style="color: #0000FF;">DataSource</span> = dsExport;
&nbsp;
        <span style="color: #008080; font-style: italic;">//Report Header</span>
        hw.<span style="color: #0000FF;">WriteLine</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;My Super Duper Excel Report&quot;</span><span style="color: #000000;">&#41;</span>;
        hw.<span style="color: #0000FF;">WriteLine</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;&amp;lt;br&amp;gt;&amp;mp;nbsp;&quot;</span><span style="color: #000000;">&#41;</span>;
        <span style="color: #008080; font-style: italic;">// Get the HTML for the control.</span>
        dgGrid.<span style="color: #0000FF;">HeaderStyle</span>.<span style="color: #0000FF;">Font</span>.<span style="color: #0000FF;">Bold</span> = <span style="color: #0600FF;">true</span>;
        dgGrid.<span style="color: #0000FF;">DataBind</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
        dgGrid.<span style="color: #0000FF;">RenderControl</span><span style="color: #000000;">&#40;</span>hw<span style="color: #000000;">&#41;</span>;
&nbsp;
        <span style="color: #008080; font-style: italic;">// Write the HTML back to the browser.</span>
        Response.<span style="color: #0000FF;">ContentType</span> = <span style="color: #808080;">&quot;application/vnd.ms-excel&quot;</span>;
        <span style="color: #0600FF;">this</span>.<span style="color: #0000FF;">EnableViewState</span> = <span style="color: #0600FF;">false</span>;
        Response.<span style="color: #0000FF;">Write</span><span style="color: #000000;">&#40;</span>tw.<span style="color: #0000FF;">ToString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
        Response.<span style="color: #0000FF;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
    <span style="color: #000000;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.kevincornwell.com/blog/index.php/aspnet-excel-function/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>IIS 6.0: How To Eliminate the Delay in Serving Updated ASP</title>
		<link>http://www.kevincornwell.com/blog/index.php/iis-60-how-to-eliminate-the-delay-in-serving-updated-asp/</link>
		<comments>http://www.kevincornwell.com/blog/index.php/iis-60-how-to-eliminate-the-delay-in-serving-updated-asp/#comments</comments>
		<pubDate>Tue, 13 Feb 2007 15:07:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ASP]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.kevincornwell.com/blog/index.php/iis-60-how-to-eliminate-the-delay-in-serving-updated-asp/</guid>
		<description><![CDATA[Due to some new enhancements in IIS 6.0, users may encounter a significant delay before receiving the content on the page. This can be a great annoyance for the users and prevent them from visiting your site. To eliminate this delay, follow these instructions: Copy the following: Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ASP\Parameters] "DisableLazyContentPropagation"=dword:00000001 Open [...]]]></description>
			<content:encoded><![CDATA[<p>Due to some new enhancements in IIS 6.0, users may encounter a significant delay before receiving the content on the page. This can be a great annoyance for the users and prevent them from visiting your site. To eliminate this delay, follow these instructions:</p>
<ol>
<li>Copy the following:
<pre>
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ASP\Parameters]
"DisableLazyContentPropagation"=dword:00000001
</pre>
<li>
<li>Open Notepad and paste the text.</li>
<li>Save the text file and rename it to for example &#8220;IIS6_Delay_Fix.reg&#8221;.</li>
<li>Merge the file into the registry by double-clicking it.</li>
<li>Reboot.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.kevincornwell.com/blog/index.php/iis-60-how-to-eliminate-the-delay-in-serving-updated-asp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visual Studio Syntax Highlighting and Intellisense for Classic ASP</title>
		<link>http://www.kevincornwell.com/blog/index.php/visual-studio-classic-asp-syntax-highlighting-and-intellisense/</link>
		<comments>http://www.kevincornwell.com/blog/index.php/visual-studio-classic-asp-syntax-highlighting-and-intellisense/#comments</comments>
		<pubDate>Wed, 05 Apr 2006 17:58:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ASP]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://kevincornwell.com/wordpress/?p=19</guid>
		<description><![CDATA[With the new release of Visual Studio (VS) 2005, you would think that it would have full support for classic ASP when working in a directory. This is not the case. There are some hacks out there, however none are fully functional and some require that you set the page directive on every page you [...]]]></description>
			<content:encoded><![CDATA[<p>With the new release of Visual Studio (VS) 2005, you would think that it would have full support for classic ASP when working in a directory.  This is not the case.  There are some hacks out there, however none are fully functional and some require that you set the page directive on every page you want highlighting and intellisense. Of course this will  break some of your pages.</p>
<p>For those who want the power of VS (mainly Intellisense), you still need to use vs 2003 until MS makes a fully functional .asp template for VS 2005.</p>
<p>This tutorial will walk you through the process of creating a Solution that allows you to edit your classic ASP in VS 2003.  The site must be accessible though windows explorer (C:\ or mapped drives).</p>
<ol>
<li>Start VS 2003</li>
<li>File > New > Blank Solution</li>
<li>Name it &#8220;Classic ASP&#8221; or whatever.  The location is where the link will be stored for opening the solution and all it&#8217;s projects.</li>
<li>Add your sites&#8230;</li>
<li>Right Click the Solution &#8220;Classic ASP&#8221;</li>
<li>Add > New Project > Visual Basic Projects > New Project In Existing Folder</li>
<li>Name it &#8220;My ASP Site 1&#8243;</li>
<li>Click Ok</li>
<li>Browse to the location of the root folder for that web site.</li>
<li>Single click the project.  From the VS menu bar, click Project > Show all Files (or click the second button in the solution Explorer)</li>
<li>Repeat for all your sites/directories.</li>
</ol>
<p><br/><br />
Now when you start the solution, all the sites and files will be listed from within VS 2003.  You now have html, javascript, and vbscript intellisense.  You also get param lists when you call functions/subs that are on the same working page.  Sweet!</p>
<p><strong>Notes</strong>:</p>
<ul>
<li>VS will create a couple of files in the project directories (bin folder, .vbproj, .vbproj.user) .  They are harmless and a small price to pay for the power of VS.</li>
<li>You may get a warning about a project not being fully trusted by the .NET runtime.  That&#8217;s ok, we are not using .NET here anyway.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.kevincornwell.com/blog/index.php/visual-studio-classic-asp-syntax-highlighting-and-intellisense/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

