Dear Sir,
I unable to display difference of two GridView cell datetime in another cell.
How to display subtraction of two date time in GridView using ASP.Net in C#
please help me sir.
Server Error in '/NEW_OCMS' 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 223: <asp:TemplateField HeaderText="Lodge Date">
Line 224: <ItemTemplate>
Line 225: <asp:Label ID="Label6" runat="server" Text='<%#Convert.ToInt32(Eval("COMP_LODGE_DATE")) -Convert.ToInt32(Eval("COMP_LODGE_DATE")) %>'></asp:Label>
Line 226:
Line 227:
|
Source File: c:\inetpub\wwwroot\OCMS\OCMS\comp_rd_only.aspx Line: 225
Stack Trace:
[FormatException: Input string was not in a correct format.]
System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +12516991
System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +122
System.String.System.IConvertible.ToInt32(IFormatProvider provider) +49
System.Convert.ToInt32(Object value) +31
ASP.comp_rd_only_aspx.__DataBinding__control62(Object sender, EventArgs e) in c:\inetpub\wwwroot\OCMS\OCMS\comp_rd_only.aspx:225
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
OCMS.comp_rd_only.refreshdata() in c:\inetpub\wwwroot\OCMS\OCMS\comp_rd_only.aspx.cs:99
OCMS.comp_rd_only.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\OCMS\OCMS\comp_rd_only.aspx.cs:30
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.9206.0