Server Error in '/' Application.

Conversion failed when converting the varchar value 'product-detail.aspx' to data type int.

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.Data.SqlClient.SqlException: Conversion failed when converting the varchar value 'product-detail.aspx' to data type int.

Source Error:


Line 160:        SqlDataAdapter da = new SqlDataAdapter(qry, con);
Line 161:        DataTable dt = new DataTable();
Line 162:        da.Fill(dt);
Line 163:        if (dt.Rows.Count > 0)
Line 164:        {

Source File: c:\inetpub\vhosts\hindbiz.com\thebigbearstore.com\main-product.aspx.cs    Line: 162

Stack Trace:


[SqlException (0x80131904): Conversion failed when converting the varchar value 'product-detail.aspx' to data type int.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +2563890
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +5974984
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +285
   System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +4169
   System.Data.SqlClient.SqlDataReader.TryHasMoreRows(Boolean& moreRows) +240
   System.Data.SqlClient.SqlDataReader.TryReadInternal(Boolean setTimeout, Boolean& more) +268
   System.Data.SqlClient.SqlDataReader.Read() +34
   System.Data.Common.DataAdapter.FillLoadDataRow(SchemaMapping mapping) +211
   System.Data.Common.DataAdapter.FillFromReader(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue) +197
   System.Data.Common.DataAdapter.Fill(DataTable[] dataTables, IDataReader dataReader, Int32 startRecord, Int32 maxRecords) +311
   System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +170
   System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) +160
   System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) +108
   main_product.fnfillprdtids(String geturl_maincaturl, String geturl_subcaturl, String geturl_producturl, String geturl_productid) in c:\inetpub\vhosts\hindbiz.com\thebigbearstore.com\main-product.aspx.cs:162
   main_product.Page_Load(Object sender, EventArgs e) in c:\inetpub\vhosts\hindbiz.com\thebigbearstore.com\main-product.aspx.cs:55
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
   System.Web.UI.Control.OnLoad(EventArgs e) +95
   System.Web.UI.Control.LoadRecursive() +59
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +678


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