<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>ASP .NET</title>
        <link>http://geekswithblogs.net/LifeLongTechie/category/10734.aspx</link>
        <description>ASP .NET</description>
        <language>en-US</language>
        <copyright>Kevin Shyr</copyright>
        <managingEditor>kevinshyr@gmail.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <item>
            <title>Javascript Minify tools, optimization, style checker</title>
            <link>http://geekswithblogs.net/LifeLongTechie/archive/2011/03/31/javascript-minify-tools.aspx</link>
            <description>&lt;p&gt;Microsoft:  http://aspnet.codeplex.com/releases/view/40584&lt;/p&gt;
&lt;p&gt;Google:  http://code.google.com/p/minify/ ;  http://code.google.com/closure/&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Some online ones that takes a block of javascript:&lt;/p&gt;
&lt;p&gt;http://jscompress.com/&lt;/p&gt;
&lt;p&gt;http://www.minifyjavascript.com/&lt;/p&gt; &lt;img src="http://geekswithblogs.net/LifeLongTechie/aggbug/144619.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Kevin Shyr</dc:creator>
            <guid>http://geekswithblogs.net/LifeLongTechie/archive/2011/03/31/javascript-minify-tools.aspx</guid>
            <pubDate>Thu, 31 Mar 2011 17:37:54 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/LifeLongTechie/comments/144619.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/LifeLongTechie/archive/2011/03/31/javascript-minify-tools.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/LifeLongTechie/comments/commentRss/144619.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/LifeLongTechie/services/trackbacks/144619.aspx</trackback:ping>
        </item>
        <item>
            <title>Parallel programming in Visual Studio</title>
            <link>http://geekswithblogs.net/LifeLongTechie/archive/2011/03/31/parallel-programming-in-visual-studio.aspx</link>
            <description>&lt;p&gt;Not much experience with these products yet.&lt;/p&gt;
&lt;p&gt;Free:  http://developer.nvidia.com/object/nsight.html&lt;/p&gt;
&lt;p&gt;Not free:  http://software.intel.com/en-us/articles/intel-parallel-studio-purchase/&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;For SSIS, this looks very interesting:&lt;/p&gt;
&lt;p&gt;http://extendedssispkgexec.codeplex.com/&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt; &lt;img src="http://geekswithblogs.net/LifeLongTechie/aggbug/144617.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Kevin Shyr</dc:creator>
            <guid>http://geekswithblogs.net/LifeLongTechie/archive/2011/03/31/parallel-programming-in-visual-studio.aspx</guid>
            <pubDate>Thu, 31 Mar 2011 17:26:03 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/LifeLongTechie/comments/144617.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/LifeLongTechie/archive/2011/03/31/parallel-programming-in-visual-studio.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/LifeLongTechie/comments/commentRss/144617.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/LifeLongTechie/services/trackbacks/144617.aspx</trackback:ping>
        </item>
        <item>
            <title>JavaScript CheckAll checkbox changes not being picked up by GridView code behind</title>
            <link>http://geekswithblogs.net/LifeLongTechie/archive/2010/02/24/javascript-checkall-checkbox-changes-not-being-picked-up-by-gridview.aspx</link>
            <description>&lt;p&gt;If you need to use JavaScript to do a Check All on all the checkboxes in the column, be sure to use this guy's code:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.highoncoding.com/Articles/81_Selecting_Checkboxes_inside_GridView_Control.aspx"&gt;http://www.highoncoding.com/Articles/81_Selecting_Checkboxes_inside_GridView_Control.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If your code simply change the state (...checked == true), it does not get registered and does not get passed into the code behind.  Instead, follow AzamSharp's article and make sure you initiate a click() event.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt; &lt;img src="http://geekswithblogs.net/LifeLongTechie/aggbug/138157.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Kevin Shyr</dc:creator>
            <guid>http://geekswithblogs.net/LifeLongTechie/archive/2010/02/24/javascript-checkall-checkbox-changes-not-being-picked-up-by-gridview.aspx</guid>
            <pubDate>Wed, 24 Feb 2010 22:03:48 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/LifeLongTechie/comments/138157.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/LifeLongTechie/archive/2010/02/24/javascript-checkall-checkbox-changes-not-being-picked-up-by-gridview.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/LifeLongTechie/comments/commentRss/138157.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/LifeLongTechie/services/trackbacks/138157.aspx</trackback:ping>
        </item>
        <item>
            <title>Convert GridViewRows into a DataTable to edit data in ASP .NET</title>
            <link>http://geekswithblogs.net/LifeLongTechie/archive/2010/02/19/convert-gridviewrows-into-a-datatable-in-asp-.net.aspx</link>
            <description>&lt;p&gt;I recently ran into a business problem that I can't find any sample code online.  I think I worked out a tolerable solution.&lt;/p&gt;
&lt;p&gt;The business scenario is this:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;All rows retrieve from the database must be in edit mode, but only some fields should be in edit mode, not all.  Editing one row at a time is out of the question.&lt;/li&gt;
    &lt;li&gt;User might make changes and THEN want to sort the grid.  Any user input needs to be preserved.&lt;/li&gt;
    &lt;li&gt;Have to use .NET control that come out of the box with Visual Studio due to maintenance concerns.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The solution i came up with basically get the GridViewRows on postback and put everything into a datatable, then I am free to do whatever I want with it.  Also, there is no hard-coded control ID or column name or cell index, which makes it more reuseable.&lt;/p&gt;
&lt;p&gt;Solution limitation:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Only 2 type of edit controls are considered: TextBox and DropDownList.  Their ID have to be "txt/ddl" + database column name&lt;/li&gt;
    &lt;li&gt;Any additional field has to come before the first column or after the last column &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Code (in VB.NET)&lt;/p&gt;
&lt;p&gt;GridView:&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;asp&lt;/span&gt;&lt;span style="color: blue;"&gt;:&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;GridView&lt;/span&gt; &lt;span style="color: red;"&gt;ID&lt;/span&gt;&lt;span style="color: blue;"&gt;="grdClaims"&lt;/span&gt; &lt;span style="color: red;"&gt;runat&lt;/span&gt;&lt;span style="color: blue;"&gt;="server"&lt;/span&gt; &lt;span style="color: red;"&gt;style&lt;/span&gt;&lt;span style="color: blue;"&gt;="position: absolute;&lt;span style=""&gt;  &lt;/span&gt;top: 224px; left:10px;"&lt;/span&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;span style="color: red;"&gt;AutoGenerateColumns&lt;/span&gt;&lt;span style="color: blue;"&gt;="False"&lt;/span&gt; &lt;span style="color: red;"&gt;AllowPaging&lt;/span&gt;&lt;span style="color: blue;"&gt;="False"&lt;/span&gt; &lt;span style="color: red;"&gt;EnableViewState&lt;/span&gt;&lt;span style="color: blue;"&gt;="True"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;span style="color: red;"&gt;AllowSorting&lt;/span&gt;&lt;span style="color: blue;"&gt;="True"&lt;/span&gt; &lt;span style="color: red;"&gt;EmptyDataText&lt;/span&gt;&lt;span style="color: blue;"&gt;="No claims found."&lt;/span&gt; &lt;span style="color: red;"&gt;EnableTheming&lt;/span&gt;&lt;span style="color: blue;"&gt;="False"&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;RowStyle&lt;/span&gt; &lt;span style="color: red;"&gt;CssClass&lt;/span&gt;&lt;span style="color: blue;"&gt;="gridcell"&lt;/span&gt; &lt;span style="color: blue;"&gt;/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;Columns&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;asp&lt;/span&gt;&lt;span style="color: blue;"&gt;:&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;TemplateField&lt;/span&gt; &lt;span style="color: red;"&gt;HeaderText&lt;/span&gt;&lt;span style="color: blue;"&gt;="Select"&lt;/span&gt; &lt;span style="color: red;"&gt;ItemStyle-CssClass&lt;/span&gt;&lt;span style="color: blue;"&gt;="gridtext"&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;                &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;HeaderTemplate&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;                    &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;asp&lt;/span&gt;&lt;span style="color: blue;"&gt;:&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;CheckBox&lt;/span&gt; &lt;span style="color: red;"&gt;ID&lt;/span&gt;&lt;span style="color: blue;"&gt;="chkSelectAll"&lt;/span&gt; &lt;span style="color: red;"&gt;runat&lt;/span&gt;&lt;span style="color: blue;"&gt;="server"&lt;/span&gt; &lt;span style="color: red;"&gt;onclick&lt;/span&gt;&lt;span style="color: blue;"&gt;="fnSelectAll(this.checked)"&lt;/span&gt; &lt;span style="color: blue;"&gt;/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;                &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;HeaderTemplate&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;                &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;ItemTemplate&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;                    &lt;/span&gt;&lt;span style="color: red;"&gt;&amp;amp;nbsp;&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;asp&lt;/span&gt;&lt;span style="color: blue;"&gt;:&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;CheckBox&lt;/span&gt; &lt;span style="color: red;"&gt;ID&lt;/span&gt;&lt;span style="color: blue;"&gt;="chkSelect"&lt;/span&gt; &lt;span style="color: red;"&gt;runat&lt;/span&gt;&lt;span style="color: blue;"&gt;="server"&lt;/span&gt; &lt;span style="color: blue;"&gt;/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;                &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;ItemTemplate&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;                &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;ItemStyle&lt;/span&gt; &lt;span style="color: red;"&gt;CssClass&lt;/span&gt;&lt;span style="color: blue;"&gt;="gridtext"&lt;/span&gt; &lt;span style="color: blue;"&gt;/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;asp&lt;/span&gt;&lt;span style="color: blue;"&gt;:&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;TemplateField&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;asp&lt;/span&gt;&lt;span style="color: blue;"&gt;:&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;BoundField&lt;/span&gt; &lt;span style="color: red;"&gt;DataField&lt;/span&gt;&lt;span style="color: blue;"&gt;="CLAIMNR"&lt;/span&gt; &lt;span style="color: red;"&gt;HeaderText&lt;/span&gt;&lt;span style="color: blue;"&gt;="Claim#"&lt;/span&gt; &lt;span style="color: red;"&gt;SortExpression&lt;/span&gt;&lt;span style="color: blue;"&gt;="CLAIMNR"&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;                &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;HeaderStyle&lt;/span&gt; &lt;span style="color: red;"&gt;Wrap&lt;/span&gt;&lt;span style="color: blue;"&gt;="false"&lt;/span&gt; &lt;span style="color: blue;"&gt;/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;                &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;ItemStyle&lt;/span&gt; &lt;span style="color: red;"&gt;Wrap&lt;/span&gt;&lt;span style="color: blue;"&gt;="true"&lt;/span&gt; &lt;span style="color: blue;"&gt;/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;asp&lt;/span&gt;&lt;span style="color: blue;"&gt;:&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;BoundField&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt; A Drop Down List in the GridView&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;asp&lt;/span&gt;&lt;span style="color: blue;"&gt;:&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;TemplateField&lt;/span&gt; &lt;span style="color: red;"&gt;HeaderText&lt;/span&gt;&lt;span style="color: blue;"&gt;="Delete"&lt;/span&gt; &lt;span style="color: red;"&gt;SortExpression&lt;/span&gt;&lt;span style="color: blue;"&gt;="DELETECLMFLAG"&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;                &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;ItemTemplate&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;                    &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;asp&lt;/span&gt;&lt;span style="color: blue;"&gt;:&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;DropDownList&lt;/span&gt; &lt;span style="color: red;"&gt;ID&lt;/span&gt;&lt;span style="color: blue;"&gt;="ddlDELETECLMFLAG"&lt;/span&gt; &lt;span style="color: red;"&gt;runat&lt;/span&gt;&lt;span style="color: blue;"&gt;="server"&lt;/span&gt; &lt;span style="color: red;"&gt;Text&lt;/span&gt;&lt;span style="color: blue;"&gt;='&lt;/span&gt;&lt;span style="background: none repeat scroll 0% 0% yellow;"&gt;&amp;lt;%&lt;/span&gt;#DataBinder.Eval(Container.DataItem, "DELETECLMFLAG").ToString().Trim()&lt;span style="background: none repeat scroll 0% 0% yellow;"&gt;%&amp;gt;&lt;/span&gt;&lt;span style="color: blue;"&gt; '&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;                        &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;asp&lt;/span&gt;&lt;span style="color: blue;"&gt;:&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;ListItem&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;Y&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;asp&lt;/span&gt;&lt;span style="color: blue;"&gt;:&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;ListItem&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;                        &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;asp&lt;/span&gt;&lt;span style="color: blue;"&gt;:&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;ListItem&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;N&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;asp&lt;/span&gt;&lt;span style="color: blue;"&gt;:&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;ListItem&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;                    &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;asp&lt;/span&gt;&lt;span style="color: blue;"&gt;:&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;DropDownList&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;                &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;ItemTemplate&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;asp&lt;/span&gt;&lt;span style="color: blue;"&gt;:&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;TemplateField&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Code behind:&lt;/p&gt;
&lt;p&gt;[Updated on 2/22/2010 to fix a bug and for the code to be more efficient]&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt 80px;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 10pt;"&gt;Dim&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;font color="#000000"&gt; dtClaims &lt;/font&gt;&lt;span style="color: blue;"&gt;As&lt;/span&gt;&lt;font color="#000000"&gt; System.Data.DataTable&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;        &lt;/font&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;Dim&lt;/span&gt;&lt;font color="#000000"&gt; iColOffSet &lt;/font&gt;&lt;span style="color: blue;"&gt;As&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color: blue;"&gt;Integer&lt;/span&gt;&lt;font color="#000000"&gt; = 2 &lt;/font&gt;&lt;span style="color: green;"&gt;'This is because the display grid has 2 extra cells at the beginning&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: green; font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;font color="#000000"&gt;&lt;span style=""&gt;        &lt;/span&gt;dtClaims = dtInsertClaimDetails.Clone() &lt;/font&gt;&lt;span style="color: green;"&gt;'dtModifyClaimDetails was cloned the first time the dataset was populated&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: green; font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;        &lt;/font&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;' Limitation for GridView:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;        &lt;/font&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;'&lt;span style=""&gt;  &lt;/span&gt;Data not from the datasource must be at the beginning or the end of the layout, and iColOffSet has to be set&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;        &lt;/font&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;'&lt;span style=""&gt;  &lt;/span&gt;The code currently assumes that only TextBox or Drop Down List will be used and their ID must be "txt" + ColumnName for&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;        &lt;/font&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;'&lt;span style=""&gt;      &lt;/span&gt;TextBox or "ddl" + ColumnName for Drop Down List&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;        &lt;/font&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;For&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color: blue;"&gt;Each&lt;/span&gt;&lt;font color="#000000"&gt; drGridView &lt;/font&gt;&lt;span style="color: blue;"&gt;As&lt;/span&gt;&lt;font color="#000000"&gt; GridViewRow &lt;/font&gt;&lt;span style="color: blue;"&gt;In&lt;/span&gt;&lt;font color="#000000"&gt; gvInsertClaimDetails.Rows&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;            &lt;/font&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;Dim&lt;/span&gt;&lt;font color="#000000"&gt; dr &lt;/font&gt;&lt;span style="color: blue;"&gt;As&lt;/span&gt;&lt;font color="#000000"&gt; System.Data.DataRow = dtClaims.NewRow()&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;            &lt;/font&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;For&lt;/span&gt;&lt;font color="#000000"&gt; i &lt;/font&gt;&lt;span style="color: blue;"&gt;As&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color: blue;"&gt;Integer&lt;/span&gt;&lt;font color="#000000"&gt; = iColOffSet &lt;/font&gt;&lt;span style="color: blue;"&gt;To&lt;/span&gt;&lt;font color="#000000"&gt; dr.ItemArray.Count + iColOffSet - 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;                &lt;/font&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;Dim&lt;/span&gt;&lt;font color="#000000"&gt; sColumnName &lt;/font&gt;&lt;span style="color: blue;"&gt;As&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color: blue;"&gt;String&lt;/span&gt;&lt;font color="#000000"&gt; = dtClaims.Columns(i - iColOffSet).ColumnName.ToString()&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;                &lt;/font&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;Dim&lt;/span&gt;&lt;font color="#000000"&gt; sInputOrData &lt;/font&gt;&lt;span style="color: blue;"&gt;As&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color: blue;"&gt;String&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;                &lt;/font&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;If&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color: blue;"&gt;Not&lt;/span&gt;&lt;font color="#000000"&gt; drGridView.Cells(iColOffSet).FindControl(&lt;/font&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;"txt"&lt;/span&gt;&lt;font color="#000000"&gt; + sColumnName) &lt;/font&gt;&lt;span style="color: blue;"&gt;Is&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color: blue;"&gt;Nothing&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color: blue;"&gt;Then&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;                    &lt;/font&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;'Found the textbox&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;font color="#000000"&gt;&lt;span style=""&gt;                    &lt;/span&gt;sInputOrData = &lt;/font&gt;&lt;span style="color: blue;"&gt;CType&lt;/span&gt;&lt;font color="#000000"&gt;(drGridView.Cells(iColOffSet).FindControl(&lt;/font&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;"txt"&lt;/span&gt;&lt;font color="#000000"&gt; + sColumnName), TextBox).Text&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;                &lt;/font&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;ElseIf&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color: blue;"&gt;Not&lt;/span&gt;&lt;font color="#000000"&gt; drGridView.Cells(iColOffSet).FindControl(&lt;/font&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;"ddl"&lt;/span&gt;&lt;font color="#000000"&gt; + sColumnName) &lt;/font&gt;&lt;span style="color: blue;"&gt;Is&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color: blue;"&gt;Nothing&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color: blue;"&gt;Then&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;                    &lt;/font&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;'Found the drop down list&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;font color="#000000"&gt;&lt;span style=""&gt;                    &lt;/span&gt;sInputOrData = &lt;/font&gt;&lt;span style="color: blue;"&gt;CType&lt;/span&gt;&lt;font color="#000000"&gt;(drGridView.Cells(iColOffSet).FindControl(&lt;/font&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;"ddl"&lt;/span&gt;&lt;font color="#000000"&gt; + sColumnName), DropDownList).SelectedValue&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;                &lt;/font&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;Else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;font color="#000000"&gt;&lt;span style=""&gt;                    &lt;/span&gt;sInputOrData = drGridView.Cells(i).Text&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;                &lt;/font&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;End&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color: blue;"&gt;If&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;                &lt;/font&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;' If the data is empty, do not insert back into datatable if the type is numbers, leave them NULL&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;                &lt;/font&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;If&lt;/span&gt;&lt;font color="#000000"&gt; (dtClaims.Columns(i - iColOffSet).DataType.ToString() = &lt;/font&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;"System.Int32"&lt;/span&gt;&lt;font color="#000000"&gt; _&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;                    &lt;/font&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;Or&lt;/span&gt;&lt;font color="#000000"&gt; dtClaims.Columns(i - iColOffSet).DataType.ToString() = &lt;/font&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;"System.Double"&lt;/span&gt;&lt;font color="#000000"&gt;) _&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;                    &lt;/font&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;And&lt;/span&gt;&lt;font color="#000000"&gt; (&lt;/font&gt;&lt;span style="color: blue;"&gt;String&lt;/span&gt;&lt;font color="#000000"&gt;.IsNullOrEmpty(sInputOrData) &lt;/font&gt;&lt;span style="color: blue;"&gt;Or&lt;/span&gt;&lt;font color="#000000"&gt; sInputOrData = &lt;/font&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;"&amp;amp;nbsp;"&lt;/span&gt;&lt;font color="#000000"&gt;) &lt;/font&gt;&lt;span style="color: blue;"&gt;Then&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;                    &lt;/font&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;' Do nothing&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;                &lt;/font&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;Else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;                    &lt;/font&gt;&lt;/span&gt;&lt;span style="color: green;"&gt;' Set the column&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;font color="#000000"&gt;&lt;span style=""&gt;                    &lt;/span&gt;dr.Item(i - iColOffSet) = System.Convert.ChangeType(sInputOrData, dtClaims.Columns(i - iColOffSet).DataType)&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;                &lt;/font&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;End&lt;/span&gt;&lt;font color="#000000"&gt; &lt;/font&gt;&lt;span style="color: blue;"&gt;If&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;            &lt;/font&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;Next&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 10pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;font color="#000000"&gt;&lt;span style=""&gt;            &lt;/span&gt;dtClaims.Rows.Add(dr)&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;        &lt;/font&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;Next&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&lt;span style=""&gt;&lt;font color="#000000"&gt;        &lt;/font&gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;Return&lt;/span&gt;&lt;font color="#000000"&gt; dtClaims&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt; &lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt; &lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;[2010-04-16] Update:&lt;/p&gt;
&lt;p style="margin: 0in 0in 0pt;" class="MsoNormal"&gt;The performance of this is good for a form with 30 columns (20 editable fields) for about 20 rows (a couple of seconds), but pretty bad for the same form with about 300 rows (1 minute).  This form was built with a couple of drop down list filters at the top of the page to filter result, so the general purpose is served.  This benchmark was done on P4 single core server with 3 GB RAM with default performance setting for the web server (and SQL on the same server).&lt;/p&gt; &lt;img src="http://geekswithblogs.net/LifeLongTechie/aggbug/138048.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Kevin Shyr</dc:creator>
            <guid>http://geekswithblogs.net/LifeLongTechie/archive/2010/02/19/convert-gridviewrows-into-a-datatable-in-asp-.net.aspx</guid>
            <pubDate>Fri, 19 Feb 2010 19:31:55 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/LifeLongTechie/comments/138048.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/LifeLongTechie/archive/2010/02/19/convert-gridviewrows-into-a-datatable-in-asp-.net.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/LifeLongTechie/comments/commentRss/138048.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/LifeLongTechie/services/trackbacks/138048.aspx</trackback:ping>
        </item>
        <item>
            <title>Getting a little annoyed at a website</title>
            <link>http://geekswithblogs.net/LifeLongTechie/archive/2010/01/05/getting-a-little-annoyed-at-a-website.aspx</link>
            <description>&lt;p&gt;I may not be a lawyer, but definition and how to properly excute a plan are very important to me.&lt;/p&gt;
&lt;p&gt;When you create a website and want to store something in a Config file, simply calling your class "ConfigFile" is NOT the way to do it.  This web projectI am looking at is so far down the wrong path that it needs a rebuild.&lt;/p&gt; &lt;img src="http://geekswithblogs.net/LifeLongTechie/aggbug/137352.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>LifeLongTechie</dc:creator>
            <guid>http://geekswithblogs.net/LifeLongTechie/archive/2010/01/05/getting-a-little-annoyed-at-a-website.aspx</guid>
            <pubDate>Tue, 05 Jan 2010 19:06:39 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/LifeLongTechie/comments/137352.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/LifeLongTechie/archive/2010/01/05/getting-a-little-annoyed-at-a-website.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/LifeLongTechie/comments/commentRss/137352.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/LifeLongTechie/services/trackbacks/137352.aspx</trackback:ping>
        </item>
        <item>
            <title>ASP .NET control library</title>
            <link>http://geekswithblogs.net/LifeLongTechie/archive/2009/12/15/asp-.net-control-library.aspx</link>
            <description>&lt;p&gt;Man, I feel angry that this is the first time I heard of this site:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.asp.net/community/control-gallery/"&gt;http://www.asp.net/community/control-gallery/&lt;/a&gt;&lt;/p&gt; &lt;img src="http://geekswithblogs.net/LifeLongTechie/aggbug/136997.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>LifeLongTechie</dc:creator>
            <guid>http://geekswithblogs.net/LifeLongTechie/archive/2009/12/15/asp-.net-control-library.aspx</guid>
            <pubDate>Tue, 15 Dec 2009 20:15:33 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/LifeLongTechie/comments/136997.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/LifeLongTechie/archive/2009/12/15/asp-.net-control-library.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/LifeLongTechie/comments/commentRss/136997.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/LifeLongTechie/services/trackbacks/136997.aspx</trackback:ping>
        </item>
        <item>
            <title>conditional page break inside the repeater on a dynamically created web user control</title>
            <link>http://geekswithblogs.net/LifeLongTechie/archive/2009/09/25/conditional-page-break-inside-the-repeater-on-a-dynamically-created.aspx</link>
            <description>&lt;p&gt;Business Scenario:&lt;/p&gt;
&lt;p&gt;The client wants to build a few reports (only in HTML format) that basically have the same format, but needs paging when the report is sent to the printer.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Solution:&lt;/p&gt;
&lt;p&gt;I built the report inside a user control to reuse the formatting, but had to solve the problem where hard-coding the page break at the UI side will give me an extra page in printing.  Code:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Inside ASCX:&lt;/p&gt;
&lt;p&gt;&amp;lt;%# InsertPageBreakIfNotLastPage(DataBinder.Eval(Container, "ItemIndex")) %&amp;gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Code behind (C #):&lt;/p&gt;
&lt;p&gt; public string InsertPageBreakIfNotLastPage(object o)&lt;br /&gt;
  {&lt;br /&gt;
   try&lt;br /&gt;
   {&lt;br /&gt;
    if(System.Convert.ToInt32(o) != (dsInd.Tables[0].Rows.Count - 1))&lt;br /&gt;
    {&lt;br /&gt;
     return "&amp;lt;p style='page-break-after: always'&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;";&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
     return "";&lt;br /&gt;
    }&lt;br /&gt;
   }&lt;br /&gt;
   catch(Exception)&lt;br /&gt;
   {&lt;br /&gt;
    return "";&lt;br /&gt;
   }&lt;br /&gt;
  }&lt;/p&gt; &lt;img src="http://geekswithblogs.net/LifeLongTechie/aggbug/135096.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>LifeLongTechie</dc:creator>
            <guid>http://geekswithblogs.net/LifeLongTechie/archive/2009/09/25/conditional-page-break-inside-the-repeater-on-a-dynamically-created.aspx</guid>
            <pubDate>Fri, 25 Sep 2009 17:27:48 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/LifeLongTechie/comments/135096.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/LifeLongTechie/archive/2009/09/25/conditional-page-break-inside-the-repeater-on-a-dynamically-created.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/LifeLongTechie/comments/commentRss/135096.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/LifeLongTechie/services/trackbacks/135096.aspx</trackback:ping>
        </item>
    </channel>
</rss>
