Server Error in '/' Application.

Invalid attempt to read when no data is present.

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.InvalidOperationException: Invalid attempt to read when no data is present.

Source Error:


Line 252:
Line 253:        lblPageNo.Text = "" 'PageIndex
Line 254:        lblSearchTerm.Text = TDUI.MemberUI.GetDisplayName(CurrentSearch)
Line 255:        lblPrevious.Text = "" 'PreviousSearch
Line 256:        'lblPageInfo.Text = "Page " & PageIndex.ToString & " of " & PageCount.ToString

Source File: D:\Webroot\td2k8r2-64\tdcpreview.dytelworld.com\MyRecipes.aspx.vb    Line: 254

Stack Trace:


[InvalidOperationException: Invalid attempt to read when no data is present.]
   System.Data.SqlClient.SqlDataReader.GetValue(Int32 i) +118
   System.Data.SqlClient.SqlDataReader.get_Item(String name) +27
   TDUI.MemberUI.GetDisplayName(Int64 MemberId) +188
   MyRecipes.Page_Load(Object sender, EventArgs e) in D:\Webroot\td2k8r2-64\tdcpreview.dytelworld.com\MyRecipes.aspx.vb:254
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627


Version Information: Microsoft .NET Framework Version:2.0.50727.5485; ASP.NET Version:2.0.50727.5491