Server Error in '/' Application.

There is no row at position 0.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IndexOutOfRangeException: There is no row at position 0.

Source Error:


Line 97:         cha_tb_new48.Close();
Line 98:         
Line 99:         pageStr = pageStr.Replace("{$id}", dt.Rows[0]["id"].ToString());
Line 100:        
Line 101:        string mulu = get_url.Get_LineShow_mulu(id);

Source File: d:\www.zjj616.com\LineOrder.aspx.cs    Line: 99

Stack Trace:


[IndexOutOfRangeException: There is no row at position 0.]
   System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex) +115
   System.Data.RBTree`1.get_Item(Int32 index) +20
   System.Data.DataRowCollection.get_Item(Int32 index) +12
   _LineOrder.main() in d:\www.zjj616.com\LineOrder.aspx.cs:99
   _LineOrder.getCache() in d:\www.zjj616.com\LineOrder.aspx.cs:40
   ASP.lineorder_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in d:\www.zjj616.com\LineOrder.aspx:2
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +88
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +25
   System.Web.UI.Page.Render(HtmlTextWriter writer) +30
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +52
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +198
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +27
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5796


Version Information: Microsoft .NET Framework Version:2.0.50727.3634; ASP.NET Version:2.0.50727.3634