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 171:                                                    <asp:TemplateField SortExpression="id">
Line 172:                                                        <ItemTemplate>
Line 173:                                                            <span class="price"><%# string.Format("{0:N0}", Convert.ToInt32(pricee(Eval("id").ToString()))) %> تومان</span>
Line 174:                                                        </ItemTemplate>
Line 175:                                                        <ItemStyle HorizontalAlign="Right" />

Source File: c:\inetpub\vhosts\babest.ir\httpdocs\productdetails.aspx    Line: 173

Stack Trace:


[FormatException: Input string was not in a correct format.]
   System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +13033239
   System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +122
   System.Convert.ToInt32(String value) +48
   ASP.productdetails_aspx.__DataBind__control25(Object sender, EventArgs e) in c:\inetpub\vhosts\babest.ir\httpdocs\productdetails.aspx:173
   System.Web.UI.Control.OnDataBinding(EventArgs e) +86
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +154
   System.Web.UI.Control.DataBind() +17
   System.Web.UI.Control.DataBindChildren() +187
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +164
   System.Web.UI.Control.DataBind() +17
   System.Web.UI.Control.DataBindChildren() +187
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +164
   System.Web.UI.Control.DataBind() +17
   System.Web.UI.WebControls.GridView.CreateRow(Int32 rowIndex, Int32 dataSourceIndex, DataControlRowType rowType, DataControlRowState rowState, Boolean dataBind, Object dataItem, DataControlField[] fields, TableRowCollection rows, PagedDataSource pagedDataSource) +170
   System.Web.UI.WebControls.GridView.CreateChildControls(IEnumerable dataSource, Boolean dataBinding) +3839
   System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +67
   System.Web.UI.WebControls.GridView.PerformDataBinding(IEnumerable data) +15
   System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +133
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +34
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +151
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +76
   System.Web.UI.WebControls.GridView.DataBind() +10
   productdetails.pricee() in c:\inetpub\vhosts\babest.ir\httpdocs\productdetails.aspx.cs:186
   productdetails.Page_Load(Object sender, EventArgs e) in c:\inetpub\vhosts\babest.ir\httpdocs\productdetails.aspx.cs:136
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +52
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


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