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 14: 	<head>
Line 15: 		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Line 16: 		<title>面試活動 - <%=dr["Title"].ToString()%></title>
Line 17: 		<meta name="viewport" content="width=device-width, initial-scale=0.937, maximum-scale=1.0, user-scalable=0" />
Line 18: 		<meta name="format-detection" content="telephone=no" />

Source File: c:\inetpub\vhosts\sql2008b.smartinfo.com.hk\httpdocs\website\mobile\activity.aspx    Line: 16

Stack Trace:


[InvalidOperationException: Invalid attempt to read when no data is present.]
   System.Data.SqlClient.SqlDataReader.GetValue(Int32 i) +185
   ASP.activity_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in c:\inetpub\vhosts\sql2008b.smartinfo.com.hk\httpdocs\website\mobile\activity.aspx:16
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +115
   System.Web.UI.Page.Render(HtmlTextWriter writer) +38
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4240


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