Server Error in '/' Application.

The source contains no DataRows.

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: The source contains no DataRows.

Source Error:


Line 60:                 int postID = Convert.ToInt32(Request.QueryString["postID"].ToString());
Line 61:                 DataRow[] tmpSingleDR = blogPosts.Tables[0].Select("BlogPostID = " + postID);
Line 62:                 postsToDisplay = tmpSingleDR.CopyToDataTable();
Line 63:                 Page.Title = postsToDisplay.Rows[0]["BlogPostTitle"].ToString() + " - News - " + ConfigurationManager.AppSettings["SiteName"].ToString();
Line 64: 				var hm1 = new HtmlMeta();

Source File: d:\inetpub\Sites\creativetaxrelief.sizzlesites.co.uk\news.aspx.cs    Line: 62

Stack Trace:


[InvalidOperationException: The source contains no DataRows.]
   System.Data.DataTableExtensions.LoadTableFromEnumerable(IEnumerable`1 source, DataTable table, Nullable`1 options, FillErrorEventHandler errorHandler) +1172
   System.Data.DataTableExtensions.CopyToDataTable(IEnumerable`1 source) +65
   _Default.Page_Load(Object sender, EventArgs e) in d:\inetpub\Sites\creativetaxrelief.sizzlesites.co.uk\news.aspx.cs:62
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
   System.Web.UI.Control.OnLoad(EventArgs e) +95
   System.Web.UI.Control.LoadRecursive() +59
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +678


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3905.0