Server Error in '/' Application.

Input string was not in a correct format.

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.FormatException: Input string was not in a correct format.

Source Error:


Line 49:                 </div>
Line 50:                 <div class="info">
Line 51:                 <span class='<%# iif(eval("bedrooms").tostring() = 0 ,"bedrooms1","bedrooms") %>'>
Line 52:                     <asp:Literal ID="Literal1" runat="server" Text='<%# iif(eval("bedrooms").tostring() = 0 ,"Studio",eval("bedrooms").tostring()) %>' />
Line 53:                 </span>

Source File: c:\inetpub\wwwroot\TASRealty\TasRealty\App_Template\PrintListing.ascx    Line: 51

Stack Trace:


[FormatException: Input string was not in a correct format.]
   Microsoft.VisualBasic.CompilerServices.Conversions.ParseDouble(String Value, NumberFormatInfo NumberFormat) +299
   Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(String Value, NumberFormatInfo NumberFormat) +83

[InvalidCastException: Conversion from string "" to type 'Double' is not valid.]
   Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(String Value, NumberFormatInfo NumberFormat) +248
   ASP.app_template_printlisting_ascx.__DataBind__control17(Object sender, EventArgs e) in c:\inetpub\wwwroot\TASRealty\TasRealty\App_Template\PrintListing.ascx:51
   System.Web.UI.Control.OnDataBinding(EventArgs e) +98
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +174
   System.Web.UI.Control.DataBindChildren() +246
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +191
   System.Web.UI.Control.DataBindChildren() +246
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +191
   System.Web.UI.WebControls.GridView.CreateRow(Int32 rowIndex, Int32 dataSourceIndex, DataControlRowType rowType, DataControlRowState rowState, Boolean dataBind, Object dataItem, DataControlField[] fields, TableRowCollection rows, PagedDataSource pagedDataSource) +244
   System.Web.UI.WebControls.GridView.CreateChildControls(IEnumerable dataSource, Boolean dataBinding) +5059
   System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +97
   System.Web.UI.WebControls.GridView.PerformDataBinding(IEnumerable data) +18
   System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +165
   App_Template_PrintListing.BindGrid(DataTable Datatbl) in c:\inetpub\wwwroot\TASRealty\TasRealty\App_Template\PrintListing.ascx.vb:80
   App_Template_PrintListing.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\TASRealty\TasRealty\App_Template\PrintListing.ascx.vb:42
   System.Web.UI.Control.OnLoad(EventArgs e) +106
   System.Web.UI.Control.LoadRecursive() +68
   System.Web.UI.Control.LoadRecursive() +162
   System.Web.UI.Control.LoadRecursive() +162
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3785


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