Server Error in '/' Application.

Incorrect syntax near ')'.

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: Incorrect syntax near ')'.

Source Error:


Line 55:         }
Line 56:         var caids = JsonConvert.SerializeObject(lsIds).Replace("[", "(").Replace("]", ")");
Line 57:         dtListProduct.DataSource = BProduct.GetProductByCaIDs(caids);
Line 58:         dtListProduct.DataBind();
Line 59:     }

Source File: g:\pleskvhosts\quangcaofacebookgiare.net\kimkhithanhphat.com\UserControl\ucSanpham.ascx.cs    Line: 57

Stack Trace:


[SqlException (0x80131904): Incorrect syntax near ')'.]
   BCM.TemplateDemo.DAL.CProduct.Get3ProductByCaIDs(String _caids) in CProduct.cs:46
   BCM.TemplateDemo.BLL.BProduct.GetProductByCaIDs(String _caids) in BProduct.cs:18
   UserControl_ucSanpham.GetProductByCate2a(Int32 _caid) in g:\pleskvhosts\quangcaofacebookgiare.net\kimkhithanhphat.com\UserControl\ucSanpham.ascx.cs:57
   UserControl_ucSanpham.Page_Load(Object sender, EventArgs e) in g:\pleskvhosts\quangcaofacebookgiare.net\kimkhithanhphat.com\UserControl\ucSanpham.ascx.cs:76
   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.Control.LoadRecursive() +134
   System.Web.UI.Control.LoadRecursive() +134
   System.Web.UI.Control.LoadRecursive() +134
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


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