<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/karskip/category/7331.aspx</link>
        <description>ASP.NET</description>
        <language>en-US</language>
        <copyright>Peter K</copyright>
        <managingEditor>karskipspam@gmail.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <item>
            <title>Dynamically Creating HTML Elements Using Javascript</title>
            <link>http://geekswithblogs.net/karskip/archive/2007/11/26/117137.aspx</link>
            <description>Suppose you want your users to submit a list of items through your web page. These items could be inputted through many means such as a text box, combobox, listbox, etc. There are many ghetto solutions you could use to implement this like comma delimited lists or multiple postbacks. There are however much more elegant, and suprisingly easier ways of doing this using javascript. As an example we will start with an input box with a link below it that allows you to spawn several more input boxes. In addition, each spawned input box comes with its own delete link, allowing the user to remove items if they choose to. Each input box is given a unique incremented ID that can be easily accessed later on through postback.&lt;br /&gt;
&lt;br /&gt;
Here's the javascript that makes it work:
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;="text/javascript"&lt;/span&gt; &lt;span class="attr"&gt;language&lt;/span&gt;&lt;span class="kwrd"&gt;="javascript"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;     &lt;br /&gt;    &lt;span class="kwrd"&gt;&lt;/span&gt;&lt;span class="kwrd"&gt;var&lt;/span&gt; software_number = 1;&lt;br /&gt;    &lt;span class="kwrd"&gt;function&lt;/span&gt; addSoftwareInput() &lt;br /&gt;    {&lt;br /&gt;        &lt;span class="kwrd"&gt;var&lt;/span&gt; d = document.createElement(&lt;span class="str"&gt;"div"&lt;/span&gt;);&lt;br /&gt;        &lt;span class="kwrd"&gt;var&lt;/span&gt; l = document.createElement(&lt;span class="str"&gt;"a"&lt;/span&gt;);&lt;br /&gt;        &lt;span class="kwrd"&gt;var&lt;/span&gt; software = document.createElement(&lt;span class="str"&gt;"input"&lt;/span&gt;);&lt;br /&gt;        software.setAttribute(&lt;span class="str"&gt;"type"&lt;/span&gt;, &lt;span class="str"&gt;"text"&lt;/span&gt;);&lt;br /&gt;        software.setAttribute(&lt;span class="str"&gt;"id"&lt;/span&gt;, &lt;span class="str"&gt;"software"&lt;/span&gt;+software_number);&lt;br /&gt;        software.setAttribute(&lt;span class="str"&gt;"name"&lt;/span&gt;, &lt;span class="str"&gt;"software"&lt;/span&gt;+software_number);&lt;br /&gt;        software.setAttribute(&lt;span class="str"&gt;"size"&lt;/span&gt;, &lt;span class="str"&gt;"50"&lt;/span&gt;);&lt;br /&gt;        software.setAttribute(&lt;span class="str"&gt;"maxlength"&lt;/span&gt;, &lt;span class="str"&gt;"74"&lt;/span&gt;);&lt;br /&gt;        l.setAttribute(&lt;span class="str"&gt;"href"&lt;/span&gt;, &lt;span class="str"&gt;"javascript:removeSoftwareInput('s"&lt;/span&gt;+software_number+&lt;span class="str"&gt;"');"&lt;/span&gt;);&lt;br /&gt;        d.setAttribute(&lt;span class="str"&gt;"id"&lt;/span&gt;, &lt;span class="str"&gt;"s"&lt;/span&gt;+software_number); &lt;br /&gt;        &lt;br /&gt;        &lt;span class="kwrd"&gt;var&lt;/span&gt; image = document.createTextNode(&lt;span class="str"&gt;"Delete"&lt;/span&gt;);&lt;br /&gt;        l.appendChild(image);&lt;br /&gt;        &lt;br /&gt;        &lt;br /&gt;        d.appendChild(software);&lt;br /&gt;        d.appendChild(l);&lt;br /&gt;        &lt;br /&gt;        document.getElementById(&lt;span class="str"&gt;"moreSoftware"&lt;/span&gt;).appendChild(d);&lt;br /&gt;        software_number++;&lt;br /&gt;        software.focus();&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    &lt;span class="kwrd"&gt;function&lt;/span&gt; removeSoftwareInput(i) &lt;br /&gt;    { &lt;br /&gt;        &lt;span class="kwrd"&gt;var&lt;/span&gt; elm = document.getElementById(i); &lt;br /&gt;        document.getElementById(&lt;span class="str"&gt;"moreSoftware"&lt;/span&gt;).removeChild(elm); &lt;br /&gt;    }&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
And the tiny amount of html to get it to show up:
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;="text"&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;="software0"&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="software0"&lt;/span&gt; &lt;span class="attr"&gt;size&lt;/span&gt;&lt;span class="kwrd"&gt;="50"&lt;/span&gt; &lt;span class="attr"&gt;maxlength&lt;/span&gt;&lt;span class="kwrd"&gt;="74"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;                &lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="moreSoftware"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="moreSoftwareLink"&lt;/span&gt; &lt;span class="attr"&gt;style&lt;/span&gt;&lt;span class="kwrd"&gt;="display:block;"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt; &lt;span class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;="javascript:addSoftwareInput();"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Add Another Item&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
You can paste the above HTML and javascript into your own webpage to see it in action. &lt;br /&gt;
&lt;br /&gt;
In some languages such as PHP, accessing these dynamically created elements after postback isn't an issue, it's a simple matter of using a for loop to iterate through each element. However this becomes a challenge if you're using ASP.NET. The problem is that these new elements are created on the client side, and once submitted, the server no longer sees them. The workaround is to use javascript to collect the contents of each element and stuff them into a hidden element in a delimited format. In the case of ASP.NET this hidden element would have to be declared within the page that is originally sent to the client. Then on postback we can collect the contents of this single element, break up each list item by the delimiter and deal with them as we normally would.  First we create our hidden attribute to dump our item contents on submit:
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="ninjainput"&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;="hidden"&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;="ninjainput"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
We'll call it "ninjainput", because it's stealthy and mysterious, like a ninja. Next, we'll insert an additional javascript function that will populate our ninjainput when the user submits the page.
&lt;pre class="csharpcode"&gt;function populateStaticInput()&lt;br /&gt;{&lt;br /&gt;    var n = document.getElementById("ninjainput");&lt;br /&gt;    var allsoftware = "";&lt;br /&gt;    for( var i = 0; i &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt; software_number; i++)&lt;br /&gt;    {&lt;br /&gt;        var currentele = document.getElementById("software"+i);&lt;br /&gt;        if(currentele != null)&lt;br /&gt;        {&lt;br /&gt;            if(currentele.value.length &lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 0)&lt;br /&gt;            {&lt;br /&gt;                if(currentele.value.length &lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; 74)&lt;br /&gt;                    currentele.value = currentele.value.substring(0, 74);&lt;br /&gt;                allsoftware = allsoftware + "~&lt;span class="kwrd"&gt;&amp;lt;&amp;gt;&lt;/span&gt;~" + currentele.value;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    n.value = allsoftware;     &lt;br /&gt;}&lt;/pre&gt;
Notice that we are delimiting each item with a "~&amp;lt;&amp;gt;~". Make sure to add this attribute to your form tag: onsubmit="javascript:populateStaticInput();" This way the javascript will run and populate our ninjainput control before the page is sent to the server. Lastly, we will need a function (the example below is in C#) that will cut up the submitted list of items into a usable format, in this case an array of strings.
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt;[] GetAllSoftwareInList(&lt;span class="kwrd"&gt;string&lt;/span&gt; rawsoftlist)&lt;br /&gt;{&lt;br /&gt;    &lt;span class="kwrd"&gt;string&lt;/span&gt;[] asoft = rawsoftlist.Split(&lt;span class="str"&gt;"~&amp;lt;&amp;gt;~"&lt;/span&gt;.ToCharArray(), System.StringSplitOptions.RemoveEmptyEntries);&lt;br /&gt;    &lt;span class="kwrd"&gt;return&lt;/span&gt; asoft;&lt;br /&gt;}&lt;/pre&gt;
And there you have it, the user doesn't have to endure multiple postbacks or keep track of a comma delimited list. It's presented in an organized and intuitive manner to the user and not too painful to implement for the developer.&lt;br /&gt;
&lt;div class="techtags"&gt;Tech Tags: &lt;a href="http://technorati.com/tag/javascript" rel="tag" class="techtag"&gt;javascript&lt;/a&gt; &lt;a href="http://technorati.com/tag/ASP.NET" rel="tag" class="techtag"&gt;ASP.NET&lt;/a&gt; &lt;a href="http://technorati.com/tag/dynamic+HTML" rel="tag" class="techtag"&gt;dynamic+HTML&lt;/a&gt; &lt;/div&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=117137"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=117137" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/karskip/aggbug/117137.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Peter K</dc:creator>
            <guid>http://geekswithblogs.net/karskip/archive/2007/11/26/117137.aspx</guid>
            <pubDate>Mon, 26 Nov 2007 22:59:01 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/karskip/comments/117137.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/karskip/archive/2007/11/26/117137.aspx#feedback</comments>
            <slash:comments>3</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/karskip/comments/commentRss/117137.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/karskip/services/trackbacks/117137.aspx</trackback:ping>
        </item>
        <item>
            <title>Silently Getting Exception Details From Your Users in ASP.NET</title>
            <link>http://geekswithblogs.net/karskip/archive/2007/11/22/117053.aspx</link>
            <description>Say you have an ASP web site that you've deployed and want to be notified when and why your website craps the bed. Since it's live you probably have something like this in your web.config file:
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;customErrors&lt;/span&gt; &lt;span class="attr"&gt;mode&lt;/span&gt;&lt;span class="kwrd"&gt;="RemoteOnly"&lt;/span&gt; &lt;span class="attr"&gt;defaultRedirect&lt;/span&gt;&lt;span class="kwrd"&gt;="error.aspx"&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
And while it hides all the exception details from your users, serving them a pretty error page, it has the side effect of returning the generic and completely useless System.Web.HttpUnhandledException.  So the question is how do you, the developer, recieve the full stack trace and exception details when a user happens to come upon an error using your application? You might feel tempted to use the Application_Error event in Global.asax to catch the exception, parse out all the exception details and email them to yourself. Unfortunately that won't work because ASP will still hide the stack trace from you. Instead of wasting your time writing code from scratch that will do this, you can accomplish the same thing by adding a few lines to your web.config file.
&lt;pre class="csharpcode"&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;system.net&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;mailSettings&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;smtp&lt;/span&gt; &lt;span class="attr"&gt;deliveryMethod&lt;/span&gt;&lt;span class="kwrd"&gt;="Network"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;network&lt;/span&gt; &lt;span class="attr"&gt;host&lt;/span&gt;&lt;span class="kwrd"&gt;="yoursmtpserver"&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;smtp&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;mailSettings&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;system.net&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;system.web&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;healthMonitoring&lt;/span&gt; &lt;span class="attr"&gt;enabled&lt;/span&gt;&lt;span class="kwrd"&gt;="true"&lt;/span&gt; &lt;span class="attr"&gt;heartbeatInterval&lt;/span&gt;&lt;span class="kwrd"&gt;="0"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;providers&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;add&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;="ErrorEmailProvider"&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;="System.Web.Management.SimpleMailWebEventProvider"&lt;/span&gt; &lt;span class="attr"&gt;to&lt;/span&gt;&lt;span class="kwrd"&gt;="you@email.com"&lt;/span&gt; &lt;span class="attr"&gt;from&lt;/span&gt;&lt;span class="kwrd"&gt;="donotreply@you.com"&lt;/span&gt; &lt;span class="attr"&gt;buffer&lt;/span&gt;&lt;span class="kwrd"&gt;="false"&lt;/span&gt; &lt;span class="attr"&gt;subjectPrefix&lt;/span&gt;&lt;span class="kwrd"&gt;="[APP ERROR]"&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;providers&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;rules&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;add&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;="EmailErrors"&lt;/span&gt; &lt;span class="attr"&gt;eventName&lt;/span&gt;&lt;span class="kwrd"&gt;="All Errors"&lt;/span&gt; &lt;span class="attr"&gt;provider&lt;/span&gt;&lt;span class="kwrd"&gt;="ErrorEmailProvider"&lt;/span&gt; &lt;span class="attr"&gt;profile&lt;/span&gt;&lt;span class="kwrd"&gt;="Default"&lt;/span&gt; &lt;span class="attr"&gt;minInstances&lt;/span&gt;&lt;span class="kwrd"&gt;="1"&lt;/span&gt; &lt;span class="attr"&gt;maxLimit&lt;/span&gt;&lt;span class="kwrd"&gt;="Infinite"&lt;/span&gt; &lt;span class="attr"&gt;minInterval&lt;/span&gt;&lt;span class="kwrd"&gt;="00:01:00"&lt;/span&gt; &lt;span class="attr"&gt;custom&lt;/span&gt;&lt;span class="kwrd"&gt;=""&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;rules&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;healthMonitoring&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
With those blocks in your web.config file you will recieve an email containing all the information you need to track down which section of code failed. And at the same time your user recieves a friendly error page and is none the wiser. Here's a sample of a simple IndexOutOfRangeException.
&lt;pre class="csharpcode"&gt;** Application Information **&lt;br /&gt;---------------&lt;br /&gt;Application domain: /LM/W3SVC/1/Root/HSR-1-128402415931345878&lt;br /&gt;Trust level: Full&lt;br /&gt;Application Virtual Path: /HSR&lt;br /&gt;Application Path: C:\Inetpub\wwwroot\HSR\ Machine name: myserver&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;** Events **&lt;br /&gt;---------------&lt;br /&gt;Event code: 3005&lt;br /&gt;Event message: An unhandled exception has occurred.&lt;br /&gt;Event time: 11/22/2007 2:47:40 PM&lt;br /&gt;Event time (UTC): 11/22/2007 9:47:40 PM&lt;br /&gt;Event ID: 051ece02de474c8ea153eb0ffc058f25 Event sequence: 6 Event occurrence: 1 Event detail code: 0&lt;br /&gt;&lt;br /&gt;Process information:&lt;br /&gt;    Process ID: 4092&lt;br /&gt;    Process name: w3wp.exe&lt;br /&gt;    Account name: NT AUTHORITY\NETWORK SERVICE&lt;br /&gt;&lt;br /&gt;Exception information:&lt;br /&gt;    Exception type: System.IndexOutOfRangeException&lt;br /&gt;    Exception message: Index 0 is either negative or above rows count.&lt;br /&gt;&lt;br /&gt;Request information:&lt;br /&gt;    Request URL: http://myserver/HSR/requeststatus.aspx?request=22&lt;br /&gt;    Request path: /HSR/requeststatus.aspx&lt;br /&gt;    User host address: 000.000.000.000&lt;br /&gt;    User: someuser&lt;br /&gt;    Is authenticated: True&lt;br /&gt;    Authentication Type: Negotiate&lt;br /&gt;    Thread account name: NT AUTHORITY\NETWORK SERVICE&lt;br /&gt;&lt;br /&gt;Thread information:&lt;br /&gt;    Thread ID: 1&lt;br /&gt;    Thread account name: NT AUTHORITY\NETWORK SERVICE&lt;br /&gt;    Is impersonating: False&lt;br /&gt;    Stack trace:    at System.Data.DataView.GetElement(Int32 index)&lt;br /&gt;   at System.Data.DataView.get_Item(Int32 recordIndex)&lt;br /&gt;   at requeststatus.Page_Load(Object sender, EventArgs e) in c:\Inetpub\wwwroot\HSR\requeststatus.aspx.cs:line 27&lt;br /&gt;   at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)&lt;br /&gt;   at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)&lt;br /&gt;   at System.Web.UI.Control.OnLoad(EventArgs e)&lt;br /&gt;   at System.Web.UI.Control.LoadRecursive()&lt;br /&gt;   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)&lt;/pre&gt;
&lt;div class="techtags"&gt;Tech Tags: &lt;a class="techtag" rel="tag" href="http://technorati.com/tag/ASP"&gt;ASP&lt;/a&gt; &lt;a class="techtag" rel="tag" href="http://technorati.com/tag/ASP.NET"&gt;ASP.NET&lt;/a&gt; &lt;a class="techtag" rel="tag" href="http://technorati.com/tag/Exception"&gt;Exception&lt;/a&gt; &lt;a class="techtag" rel="tag" href="http://technorati.com/tag/Email"&gt;Email&lt;/a&gt; &lt;a class="techtag" rel="tag" href="http://technorati.com/tag/Web.Config"&gt;Web.Config&lt;/a&gt; &lt;/div&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=117053"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=117053" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/karskip/aggbug/117053.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Peter K</dc:creator>
            <guid>http://geekswithblogs.net/karskip/archive/2007/11/22/117053.aspx</guid>
            <pubDate>Fri, 23 Nov 2007 02:14:32 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/karskip/comments/117053.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/karskip/archive/2007/11/22/117053.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/karskip/comments/commentRss/117053.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/karskip/services/trackbacks/117053.aspx</trackback:ping>
        </item>
    </channel>
</rss>