سلام دوستان میتونید راهنمایی کنید این خطا بخاطر چیه
Server Error in '/' Application. A field or property with the name 'userid' was not found on the selected data source. 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.Web.HttpException: A field or property with the name 'userid' was not found on the selected data source. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [HttpException (0x80004005): A field or property with the name 'userid' was not found on the selected data source.] System.Web.UI.WebControls.BoundField.TryGetSimplePropertyValue(Object dataItem, Object& data) +3243867 System.Web.UI.WebControls.BoundField.GetValue(Control controlContainer) +209 System.Web.UI.WebControls.BoundField.OnDataBindField(Object sender, EventArgs e) +58 System.Web.UI.Control.OnDataBinding(EventArgs e) +92 System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +85 System.Web.UI.Control.DataBind() +15 System.Web.UI.Control.DataBindChildren() +187 System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +94 System.Web.UI.Control.DataBind() +15 System.Web.UI.WebControls.GridView.CreateRow(Int32 rowIndex, Int32 dataSourceIndex, DataControlRowType rowType, DataControlRowState rowState, Boolean dataBind, Object dataItem, DataControlField[] fields, TableRowCollection rows, PagedDataSource pagedDataSource) +167 System.Web.UI.WebControls.GridView.CreateChildControls(IEnumerable dataSource, Boolean dataBinding) +3724 System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +67 System.Web.UI.WebControls.GridView.PerformDataBinding(IEnumerable data) +14 System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +123 System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +33 System.Web.UI.WebControls.DataBoundControl.PerformSelect() +138 System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +30 System.Web.UI.WebControls.GridView.DataBind() +4 System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +105 System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +75 System.Web.UI.Control.EnsureChildControls() +83 System.Web.UI.Control.PreRenderRecursiveInternal() +42 System.Web.UI.Control.PreRenderRecursiveInternal() +155 System.Web.UI.Control.PreRenderRecursiveInternal() +155 System.Web.UI.Control.PreRenderRecursiveInternal() +155 System.Web.UI.Control.PreRenderRecursiveInternal() +155 System.Web.UI.Control.PreRenderRecursiveInternal() +155 System.Web.UI.Control.PreRenderRecursiveInternal() +155 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +974 Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34248
کدی که این خطا رو میده هم اینجا قرار بدید. این خطا ظاهرا برای پر نشدن یا نبودن فیلد userid داخل دیتاسورس شما رخ داده.
ممنون برای وقتتون ، مشکل رفع شد
هیچ کاربری تا کنون از این پست تشکر نکرده است
با ما تماس بگیرید تا در این مسیر همراهتان باشیم :)