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 451:
Line 452:
Line 453:        string imgurl1 = lstimg(Convert.ToInt32(lblid.Text));
Line 454:        if (imgurl1 != "")
Line 455:        {

Source File: c:\inetpub\vhosts\lacapitaledubai.com\httpdocs\New_Projects.aspx.cs    Line: 453

Stack Trace:


[FormatException: Input string was not in a correct format.]
   System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +14524616
   System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +172
   System.Convert.ToInt32(String value) +60
   New_Projects.ListView1_ItemDataBound(Object sender, ListViewItemEventArgs e) in c:\inetpub\vhosts\lacapitaledubai.com\httpdocs\New_Projects.aspx.cs:453
   System.Web.UI.WebControls.ListView.OnItemDataBound(ListViewItemEventArgs e) +145
   System.Web.UI.WebControls.ListView.CreateItemsInGroups(ListViewPagedDataSource dataSource, Boolean dataBinding, InsertItemPosition insertPosition, ArrayList keyArray) +1576
   System.Web.UI.WebControls.ListView.CreateChildControls(IEnumerable dataSource, Boolean dataBinding) +892
   System.Web.UI.WebControls.ListView.PerformDataBinding(IEnumerable data) +53
   System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +165
   System.Web.UI.WebControls.ListView.PerformSelect() +125
   Utility.lstbind(ListView gd, String str) in c:\inetpub\vhosts\lacapitaledubai.com\httpdocs\App_Code\Utility.cs:1232
   New_Projects.searchproperty() in c:\inetpub\vhosts\lacapitaledubai.com\httpdocs\New_Projects.aspx.cs:440
   New_Projects.Page_Load(Object sender, EventArgs e) in c:\inetpub\vhosts\lacapitaledubai.com\httpdocs\New_Projects.aspx.cs:245
   System.Web.UI.Control.OnLoad(EventArgs e) +106
   System.Web.UI.Control.LoadRecursive() +68
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3785


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