System.Web.UI.Control 类型值

如何获取System.Web.UI.Control 类型值

mvc导出word文档时遇到

public void ExportControl(System.Web.UI.Control source, string DocumentType){}

1个回答

传你需要导出的控件,比如说你要导出的内容是Label或者一个Panel,直接写控件名

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
找不到方法:Void System.Web.UI.Control.set_ValidateRequestMode?

在服务器上用原文件没问题,但是用编译完的就不行 找不到方法:“Void System.Web.UI.Control.set_ValidateRequestMode(System.Web.UI.ValidateRequestMode)”。 说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.MissingMethodException: 找不到方法:“Void System.Web.UI.Control.set_ValidateRequestMode(System.Web.UI.ValidateRequestMode)”。 源错误: 执行当前 Web 请求期间生成了未经处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。 堆栈跟踪: [MissingMethodException: 找不到方法:“Void System.Web.UI.Control.set_ValidateRequestMode(System.Web.UI.ValidateRequestMode)”。] ASP.login_aspx.FrameworkInitialize() +0 System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +54 System.Web.UI.Page.ProcessRequest() +78 System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21 System.Web.UI.Page.ProcessRequest(HttpContext context) +49 ASP.login_aspx.ProcessRequest(HttpContext context) +4 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

'System.Data.DataRowView'没有包含此名称'ID'的属性.

提示信息 ``` DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'ID'. 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: DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'ID'. Source Error: Line 19: <asp:TemplateField HeaderStyle-CssClass="ID" HeaderText="ID" > Line 20: <ItemTemplate> Line 21: <div><a href='photo.aspx?id=<%#Eval("ID") %>'><%#Eval("ID") %></a></div> Line 22: </ItemTemplate> Line 23: Source File: d:\Files\Website\Akon\Akon\Akon\search.aspx Line: 21 Stack Trace: [HttpException (0x80004005): DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'ID'.] System.Web.UI.DataBinder.GetPropertyValue(Object container, String propName) +9558245 System.Web.UI.DataBinder.Eval(Object container, String[] expressionParts) +104 System.Web.UI.DataBinder.Eval(Object container, String expression) +93 System.Web.UI.TemplateControl.Eval(String expression) +43 ASP.search_aspx.__DataBind__control11(Object sender, EventArgs e) in d:\Files\Website\Akon\Akon\Akon\search.aspx:21 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.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 Akon.search.Page_Load(Object sender, EventArgs e) in d:\Files\Website\Akon\Akon\Akon\search.aspx.cs:22 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51 System.Web.UI.Control.OnLoad(EventArgs e) +92 System.Web.UI.Control.LoadRecursive() +54 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +772 ``` 源代码: ``` <div class="results"> <asp:GridView ID="results" runat="server" AutoGenerateColumns="False" GridLines="None" BorderColor="White" HorizontalAlign="Center" > <Columns> <asp:TemplateField HeaderStyle-CssClass="ID" HeaderText="ID" > <ItemTemplate> <div><a href='photo.aspx?id=<%#Eval("ID") %>'><%#Eval("ID") %></a></div> </ItemTemplate> <ControlStyle></ControlStyle> <HeaderStyle /> </asp:TemplateField> <asp:TemplateField HeaderStyle-CssClass="Name" HeaderText="Name"> <ItemTemplate> <div><a href='photo.aspx?id=<%#Eval("ID") %>'><%#Eval("Name") %></a></div> </ItemTemplate> <ControlStyle></ControlStyle> <HeaderStyle/> </asp:TemplateField> <asp:TemplateField HeaderStyle-CssClass="Brif" HeaderText="Brif"> <ItemTemplate> <div><a href='photo.aspx?id=<%#Eval("ID") %>'><%#Eval("Brif") %></a></div> </ItemTemplate> <ControlStyle></ControlStyle> <HeaderStyle/> </asp:TemplateField> <asp:TemplateField HeaderStyle-CssClass="Info" HeaderText="Info"> <ItemTemplate> <div><a href='photo.aspx?id=<%#Eval("ID") %>'><%#Eval("Info") %></a></div> </ItemTemplate> <ControlStyle></ControlStyle> <HeaderStyle/> </asp:TemplateField> </Columns> </asp:GridView> </div> ```

用户代码未处理 System.Data.OleDb.OleDbException HResult=-2147467259 Message=找不到文件

![图片说明](https://img-ask.csdn.net/upload/201904/27/1556335801_366681.jpg) 用户代码未处理 System.Data.OleDb.OleDbException HResult=-2147467259 Message=找不到文件 'C:\Users\Administrator\Documents\Visual Studio 2010\WebSites\WebSite3\App_Data\SMDB.mdb'。 Source=Microsoft JET Database Engine ErrorCode=-2147467259 StackTrace: 在 System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) 在 System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) 在 System.Data.ProviderBase.DbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) 在 System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions) 在 System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) 在 System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) 在 System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) 在 System.Data.ProviderBase.DbConnectionInternal.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) 在 System.Data.OleDb.OleDbConnection.Open() 在 _Default.CreateTable_Click(Object sender, EventArgs e) 位置 c:\Users\Administrator\Documents\Visual Studio 2010\WebSites\WebSite3\Default.aspx.cs:行号 21 在 System.Web.UI.WebControls.Button.OnClick(EventArgs e) 在 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) 在 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) InnerException:

Databind报错,datasource也有数据

用户代码未处理 System.InvalidOperationException HResult=-2146233079 Message=无法确定 MetaTable。无法为数据源“”确定 MetaTable,且无法从所请求的 URL 推断它。确保表映射到数据源,或数据源配置了有效的文本类型和表名称,或此请求是已注册的 DynamicDataRoute 的一部分。 Source=System.Web.DynamicData StackTrace: 在 System.Web.DynamicData.Util.MetaTableHelper.GetTableWithFullFallback(IDataSource dataSource, HttpContextBase context) 在 System.Web.DynamicData.Util.MetaTableHelper.FindMetaTable(Control current, HttpContextBase context) 在 System.Web.DynamicData.DynamicDataExtensions.FindMetaTable(Control current) 在 System.Web.DynamicData.DynamicField.get_Column() 在 System.Web.DynamicData.DynamicField.get_SortExpression() 在 System.Web.UI.WebControls.DataControlField.InitializeCell(DataControlFieldCell cell, DataControlCellType cellType, DataControlRowState rowState, Int32 rowIndex) 在 System.Web.DynamicData.DynamicField.InitializeCell(DataControlFieldCell cell, DataControlCellType cellType, DataControlRowState rowState, Int32 rowIndex) 在 System.Web.UI.WebControls.GridView.InitializeRow(GridViewRow row, DataControlField[] fields) 在 System.Web.UI.WebControls.GridView.CreateRow(Int32 rowIndex, Int32 dataSourceIndex, DataControlRowType rowType, DataControlRowState rowState, Boolean dataBind, Object dataItem, DataControlField[] fields, TableRowCollection rows, PagedDataSource pagedDataSource) 在 System.Web.UI.WebControls.GridView.CreateChildControls(IEnumerable dataSource, Boolean dataBinding) 在 System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) 在 System.Web.UI.WebControls.GridView.PerformDataBinding(IEnumerable data) 在 System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) 在 System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) 在 System.Web.UI.WebControls.DataBoundControl.PerformSelect() 在 System.Web.UI.WebControls.BaseDataBoundControl.DataBind() 在 System.Web.UI.WebControls.GridView.DataBind() 在 KFGLXTT.RoomInfo.Page_Load(Object sender, EventArgs e) 位置 e:\vs\KFGLXTT\KFGLXTT\RoomInfo.aspx.cs:行号 17 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) 在 System.Web.UI.Control.OnLoad(EventArgs e) 在 System.Web.UI.Control.LoadRecursive() 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) InnerException:

软件登录时提示System.NullReferenceException未被引用到实例

![图片说明](https://img-ask.csdn.net/upload/201904/19/1555644735_976122.png) 测试了很多电脑大部分可以登录,个别电脑登录时提示这个错误,重新装了NET插件和Access数据库还是不行,本人完全菜鸟一枚求大神帮帮忙啊,解决不了急死了~~~~ ee the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text ************** ee the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text ************** System.NullReferenceException: Object reference not set to an instance of an object. at Emergency.Module.setControls(Single newx, Single newy, Control cons) in d:\Users\Desktop\站务中心应急辅助系统测试版\Emergency\Class\Module.cs:line 2944 at Emergency.FormMain.FormMain_Resize(Object sender, EventArgs e) in d:\Users\Desktop\站务中心应急辅助系统测试版\Emergency\DataForm\FormMain.cs:line 49 at System.Windows.Forms.Control.OnResize(EventArgs e) at System.Windows.Forms.Form.OnResize(EventArgs e) at System.Windows.Forms.Control.OnSizeChanged(EventArgs e) at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight) at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height) at System.Windows.Forms.Control.SetBoundsCore(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified) at System.Windows.Forms.Form.SetBoundsCore(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified) at System.Windows.Forms.Control.ScaleControl(SizeF factor, BoundsSpecified specified) at System.Windows.Forms.ScrollableControl.ScaleControl(SizeF factor, BoundsSpecified specified) at System.Windows.Forms.Form.ScaleControl(SizeF factor, BoundsSpecified specified) at System.Windows.Forms.Control.ScaleControl(SizeF includedFactor, SizeF excludedFactor, Control requestingControl) at System.Windows.Forms.ContainerControl.Scale(SizeF includedFactor, SizeF excludedFactor, Control requestingControl) at System.Windows.Forms.ContainerControl.PerformAutoScale(Boolean includedBounds, Boolean excludedBounds) at System.Windows.Forms.ContainerControl.PerformNeededAutoScaleOnLayout() at System.Windows.Forms.ContainerControl.OnLayoutResuming(Boolean performLayout) at System.Windows.Forms.Control.ResumeLayout(Boolean performLayout) at Emergency.FormMain.InitializeComponent() in d:\Users\Desktop\站务中心应急辅助系统测试版\Emergency\DataForm\FormMain.Designer.cs:line 2355 at Emergency.FormMain..ctor() in d:\Users\Desktop\站务中心应急辅助系统测试版\Emergency\DataForm\FormMain.cs:line 17 at Emergency.FormLogin.button1_Click(Object sender, EventArgs e) in d:\Users\Desktop\站务中心应急辅助系统测试版\Emergency\DataForm\FormLogin.cs:line 47 at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) ************** Loaded Assemblies ************** mscorlib Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll ---------------------------------------- Emergency Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///G:/%E9%99%84%E4%BB%B61%EF%BC%9A%E5%BA%94%E6%80%A5%E8%BE%85%E5%8A%A9%E7%B3%BB%E7%BB%9FV1.0%E5%AE%89%E8%A3%85%E5%8C%85/%E5%BA%94%E6%80%A5%E8%BE%85%E5%8A%A9%E7%B3%BB%E7%BB%9FV1.0%E5%AE%89%E8%A3%85%E5%8C%85/%E5%BA%94%E6%80%A5%E8%BE%85%E5%8A%A9%E7%B3%BB%E7%BB%9FV1.0/%E5%BA%94%E6%80%A5%E8%BE%85%E5%8A%A9%E7%B3%BB%E7%BB%9FV1.0.exe ---------------------------------------- System.Windows.Forms Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll ---------------------------------------- System.Drawing Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll ---------------------------------------- System Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll ---------------------------------------- System.Data Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll ---------------------------------------- System.Core Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll ---------------------------------------- System.Transactions Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll ---------------------------------------- System.EnterpriseServices Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.EnterpriseServices/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll ---------------------------------------- System.Configuration Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll ---------------------------------------- System.Xml Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll ---------------------------------------- ************** JIT Debugging ************** To enable just-in-time (JIT) debugging, the .config file for this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section.: Object reference not set to an instance of an object. at Emergency.Module.setControls(Single newx, Single newy, Control cons) in d:\Users\Desktop\站务中心应急辅助系统测试版\Emergency\Class\Module.cs:line 2944 at Emergency.FormMain.FormMain_Resize(Object sender, EventArgs e) in d:\Users\Desktop\站务中心应急辅助系统测试版\Emergency\DataForm\FormMain.cs:line 49 at System.Windows.Forms.Control.OnResize(EventArgs e) at System.Windows.Forms.Form.OnResize(EventArgs e) at System.Windows.Forms.Control.OnSizeChanged(EventArgs e) at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight) at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height) at System.Windows.Forms.Control.SetBoundsCore(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified) at System.Windows.Forms.Form.SetBoundsCore(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified) at System.Windows.Forms.Control.ScaleControl(SizeF factor, BoundsSpecified specified) at System.Windows.Forms.ScrollableControl.ScaleControl(SizeF factor, BoundsSpecified specified) at System.Windows.Forms.Form.ScaleControl(SizeF factor, BoundsSpecified specified) at System.Windows.Forms.Control.ScaleControl(SizeF includedFactor, SizeF excludedFactor, Control requestingControl) at System.Windows.Forms.ContainerControl.Scale(SizeF includedFactor, SizeF excludedFactor, Control requestingControl) at System.Windows.Forms.ContainerControl.PerformAutoScale(Boolean includedBounds, Boolean excludedBounds) at System.Windows.Forms.ContainerControl.PerformNeededAutoScaleOnLayout() at System.Windows.Forms.ContainerControl.OnLayoutResuming(Boolean performLayout) at System.Windows.Forms.Control.ResumeLayout(Boolean performLayout) at Emergency.FormMain.InitializeComponent() in d:\Users\Desktop\站务中心应急辅助系统测试版\Emergency\DataForm\FormMain.Designer.cs:line 2355 at Emergency.FormMain..ctor() in d:\Users\Desktop\站务中心应急辅助系统测试版\Emergency\DataForm\FormMain.cs:line 17 at Emergency.FormLogin.button1_Click(Object sender, EventArgs e) in d:\Users\Desktop\站务中心应急辅助系统测试版\Emergency\DataForm\FormLogin.cs:line 47 at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) ************** Loaded Assemblies ************** mscorlib Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll ---------------------------------------- Emergency Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///G:/%E9%99%84%E4%BB%B61%EF%BC%9A%E5%BA%94%E6%80%A5%E8%BE%85%E5%8A%A9%E7%B3%BB%E7%BB%9FV1.0%E5%AE%89%E8%A3%85%E5%8C%85/%E5%BA%94%E6%80%A5%E8%BE%85%E5%8A%A9%E7%B3%BB%E7%BB%9FV1.0%E5%AE%89%E8%A3%85%E5%8C%85/%E5%BA%94%E6%80%A5%E8%BE%85%E5%8A%A9%E7%B3%BB%E7%BB%9FV1.0/%E5%BA%94%E6%80%A5%E8%BE%85%E5%8A%A9%E7%B3%BB%E7%BB%9FV1.0.exe ---------------------------------------- System.Windows.Forms Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll ---------------------------------------- System.Drawing Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll ---------------------------------------- System Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll ---------------------------------------- System.Data Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll ---------------------------------------- System.Core Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll ---------------------------------------- System.Transactions Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll ---------------------------------------- System.EnterpriseServices Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.EnterpriseServices/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll ---------------------------------------- System.Configuration Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll ---------------------------------------- System.Xml Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll ---------------------------------------- ************** JIT Debugging ************** To enable just-in-time (JIT) debugging, the .config file for this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section.

部署网站服务器问题求解答ArgumentException: 不支持关键字: “dserver”

“/”应用程序中的服务器错误。 不支持关键字: “dserver”。 说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.ArgumentException: 不支持关键字: “dserver”。 源错误: 执行当前 Web 请求期间生成了未经处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。 堆栈跟踪: [ArgumentException: 不支持关键字: “dserver”。] System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey) +5384504 System.Data.Common.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms, Boolean useOdbcRules) +95 System.Data.SqlClient.SqlConnectionString..ctor(String connectionString) +59 System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous) +24 System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(DbConnectionPoolKey key, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions) +167 System.Data.SqlClient.SqlConnection.ConnectionString_Set(DbConnectionPoolKey key) +61 System.Data.SqlClient.SqlConnection.set_ConnectionString(String value) +66 System.Data.SqlClient.SqlConnection..ctor(String connectionString, SqlCredential credential) +26 System.Data.SqlClient.SqlConnection..ctor(String connectionString) +6 bigCreate.WebForm1.Button2_Click(Object sender, EventArgs e) +246 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9750842 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +196 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724

页面打开时没有报错,点击别的链接后会报错~

在 NDQE.Application.Client.QNZX.QNZX_Index.Page_Load(Object sender, EventArgs e) 位置 F:\项目\01Project\NDQE\NDQE\Application\Client\QNZX\QNZX_Index.aspx.cs:行号 17 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) 在 System.Web.UI.Control.OnLoad(EventArgs e) 在 System.Web.UI.Control.LoadRecursive() 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 这是错误的堆栈信息! object reference not set to an instance of an object 页面加载的时候没有报错,但是链接点击后会报错~

无法将类型为LiteralControl的对象强制转换为类型.Label

我的代码: int index = 0; for ( index = 0; index < this.panel.Controls.Count; index++) { if (this.panel.Controls[index].ID==Session["vote"].ToString()) { Response.Write(this.panel.Controls[index].ID); _Label lab = (Label)this.panel.Controls[index];_ sum++; break; } } int j = 0; for (j=0; j < this.panel.Controls.Count; j++) { if (j == index + 1) { Response.Write(this.panel.Controls[j].ID); _Label lab = (Label)this.panel.Controls[j];_ Response.Write(lab.ID); lab.Text = (Double.Parse(lab.Text) + 1).ToString(); //Response.Redirect("VoteResult.aspx"); } } 问题:第一个强制转换label就没有毛病,第二个就出错,为什么?怎么解决这个问题?

未提示错误,但是运行时出错

异常详细信息: System.NullReferenceException: 未将对象引用设置到对象的实例。 堆栈跟踪: * [NullReferenceException: 未将对象引用设置到对象的实例。] studentregister.btnSubmit_Click(Object sender, EventArgs e) +84 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563 怎么破?在线等!急!

Data Error????????急

Data error. 说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.ApplicationException: Data error. 源错误: 执行当前 Web 请求期间生成了未经处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。 堆栈跟踪: [ApplicationException: Data error.] DatabaseComponent.EmployeeDB.GetEmployees() in D:\Code\Pro ASP.NET 4\Chapter09\DatabaseComponent\EmployeeDB.cs:232 [TargetInvocationException: 调用的目标发生了异常。] System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0 System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +192 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +108 System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object& instance) +487 System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1609 System.Web.UI.WebControls.ListControl.OnDataBinding(EventArgs e) +101 System.Web.UI.WebControls.ListControl.PerformSelect() +34 System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +30 System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +105 System.Web.UI.WebControls.ListControl.OnPreRender(EventArgs e) +23 System.Web.UI.WebControls.ListBox.OnPreRender(EventArgs e) +12 System.Web.UI.Control.PreRenderRecursiveInternal() +83 System.Web.UI.Control.PreRenderRecursiveInternal() +155 System.Web.UI.Control.PreRenderRecursiveInternal() +155 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +974

asp.net实现天气接口 报错 远程服务器返回错误: (500) 内部服务器错误。

string str = client.DownloadString("http://www.webxml.com.cn/WebServices/WeatherWebService.asmx/getWeatherbyCityName?theCityName=57494"); [WebException: 远程服务器返回错误: (500) 内部服务器错误。] System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request) +283 System.Net.WebClient.DownloadString(Uri address) +100 System.Net.WebClient.DownloadString(String address) +29 weather.Bnn_Weather.Get_3day_weather(String CityName) in d:\专业操作信息库\WPF\weather\weather\Bnn_Weather.cs:52 weather.WeatherWeb.disp_weather(String city) in d:\专业操作信息库\WPF\weather\weather\WeatherWeb.aspx.cs:56 weather.WeatherWeb.Button1_Click(Object sender, EventArgs e) in d:\专业操作信息库\WPF\weather\weather\WeatherWeb.aspx.cs:64 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9628722 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +103 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724

执行当前 Web 请求期间,出现未经处理的异常。

用动软生成了增删改查 上传服务器可以查询 但是增删改就成这样子了,我实在找不出问题所在。 求大神们帮帮忙 ,毕竟刚学没多久 “/”应用程序中的服务器错误。 -------------------------------------------------------------------------------- 列名 'SQL2012TypeTitle' 无效。 列名 'SQL2012TypeParentId' 无效。 说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.Data.SqlClient.SqlException: 列名 'SQL2012TypeTitle' 无效。 列名 'SQL2012TypeParentId' 无效。 源错误: 行 798: catch (System.Data.SqlClient.SqlException e) 行 799: { 行 800: throw e; 行 801: } 行 802: } 源文件: C:\CodematicDemo\Itcast\DBUtility\DbHelperSQL.cs 行: 800 堆栈跟踪: [SqlException (0x80131904): 列名 'SQL2012TypeTitle' 无效。 列名 'SQL2012TypeParentId' 无效。] Maticsoft.DBUtility.DbHelperSQL.GetSingle(String SQLString, SqlParameter[] cmdParms) in C:\CodematicDemo\Itcast\DBUtility\DbHelperSQL.cs:800 shop.DAL.BookType.Add(BookType model) in C:\CodematicDemo\Itcast\DAL\BookType.cs:59 shop.BLL.BookType.Add(BookType model) in C:\CodematicDemo\Itcast\BLL\BookType.cs:39 [TargetInvocationException: 调用的目标发生了异常。] System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0 System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +92 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +136 System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object& instance) +660 System.Web.UI.WebControls.ObjectDataSourceView.ExecuteInsert(IDictionary values) +872 System.Web.UI.DataSourceView.Insert(IDictionary values, DataSourceViewOperationCallback callback) +100 System.Web.UI.WebControls.ListView.HandleInsert(ListViewItem item, Boolean causesValidation) +382 System.Web.UI.WebControls.ListView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +623 System.Web.UI.WebControls.ListView.OnBubbleEvent(Object source, EventArgs e) +246 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37 System.Web.UI.WebControls.ListViewItem.OnBubbleEvent(Object source, EventArgs e) +126 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37 System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +114 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +164 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +12 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +15 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3562 ![图片说明](https://img-ask.csdn.net/upload/201605/19/1463665160_615669.png)

应用程序中的服务器错误,未将对象引用设置到对象的实例。应该怎么改,我是一个小白。谢谢大家

说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.NullReferenceException: 未将对象引用设置到对象的实例。 源错误: 行 33: DataSet result = new DataSet(); 行 34: result = new Class1().hsggetdata(sql); 行 35: ngg = result.Tables[0].Rows[0][0].ToString(); 行 36: } 行 37: string sqllb = "select distinct(leibie) from allgonggao"; 堆栈跟踪: [NullReferenceException: 未将对象引用设置到对象的实例。] qtleft.Page_Load(Object sender, EventArgs e) in c:\Users\qtleft.ascx.cs:35 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35 System.Web.UI.Control.OnLoad(EventArgs e) +99 System.Web.UI.Control.LoadRecursive() +50 System.Web.UI.Control.LoadRecursive() +141 System.Web.UI.Control.LoadRecursive() +141 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

好烦,为什么总是连接不上数据库

说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.ComponentModel.Win32Exception: 找不到网络路径。 源错误: 执行当前 Web 请求期间生成了未经处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。 堆栈跟踪: [Win32Exception (0x80004005): 找不到网络路径。] [SqlException (0x80131904): 在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器。请验证实例名称是否正确并且 SQL Server 已配置为允许远程连接。 (provider: Named Pipes Provider, error: 40 - 无法打开到 SQL Server 的连接)] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +5352431 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +244 System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean withFailover) +5363103 System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover) +145 System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout) +891 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance) +307 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData) +518 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) +278 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) +38 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) +732 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) +85 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) +1057 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) +78 System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) +196 System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +146 System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +16 System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) +94 System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) +110 System.Data.SqlClient.SqlConnection.Open() +96 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +316 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +86 System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1481 System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +21 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.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +974

pb11.5 cs转bs,浏览时报错。

[FileNotFoundException: 找不到指定的模块。 (异常来自 HRESULT:0x8007007E)] Sybase.PowerBuilder.PBSessionBase..ctor(String liblist) +0 Sybase.PowerBuilder.Web.PBSession..ctor(String liblist) +246 Sybase.PowerBuilder.Web.PBSession.CreateSession(Type appType) +131 PBWebApp._Default_Sy.CreateSession() in d:\source_11.5\pb11webtest_webform.pbt_build\pb11webtest\default_sy.aspx.cs:23 Sybase.PowerBuilder.Web.PBMainPage.a() +41 Sybase.PowerBuilder.Web.PBMainPage.OnInit(EventArgs e) +819 System.Web.UI.Control.InitRecursive(Control namingContainer) +333 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +378

使用asp.NET连接字符串登录MySQL数据库失败

<div class="post-text" itemprop="text"> <p>I'm trying to access a database that I created through phpMyAdmin. All I want to do is display one of the tables though a gridview. However when I try to create a connection string through my web.config file I get this error:</p> <pre><code>[ArgumentException: Format of the initialization string does not conform to specification starting at index 0.] System.Data.Common.DbConnectionOptions.GetKeyValuePair(String connectionString, Int32 currentPosition, StringBuilder buffer, Boolean useOdbcRules, String&amp; keyname, String&amp; keyvalue) +5360365 System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey) +124 System.Data.Common.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms, Boolean useOdbcRules) +95 System.Data.SqlClient.SqlConnectionString..ctor(String connectionString) +59 System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous) +24 System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(DbConnectionPoolKey key, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions&amp; userConnectionOptions) +167 System.Data.SqlClient.SqlConnection.ConnectionString_Set(DbConnectionPoolKey key) +61 System.Data.SqlClient.SqlConnection.set_ConnectionString(String value) +66 System.Web.UI.WebControls.SqlDataSource.CreateConnection(String connectionString) +34 System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +113 System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +21 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.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +974 </code></pre> <p>I don't have access to the error log, although I have contacted the database administrators and am waiting on a response from them to see if I can get access.</p> <p>My connection string is:</p> <pre><code>&lt;connectionStrings&gt; &lt;add name="TheRegistrationConnectionString" connectionString="Server=127.0.0.1;Database=faltesek__dahcookiejar;Uid=falte_aaron;Pwd=xxxxx;" providerName="System.Data.MySqlClient" /&gt; </code></pre> <p></p> <p>The database server info is:</p> <p>Server version: 5.1.73-community - MySQL Community Server (GPL)</p> <p>I've tried looking around to make sure my connection string is formatted correctly. I tried a dozen different formats and can't seem to get anything to work. Until I get access to the server error logs, I thought maybe someone could see an obvious problem with what I'm doing.</p> <p>Thanks in advance!</p> </div>

未将对象引用设置到对象的实例。

未将对象引用设置到对象的实例。 说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.NullReferenceException: 未将对象引用设置到对象的实例。 源错误: 行 20: string userName = StrHelper.ConvertSql(UserName.Text.ToString()); 行 21: string userPwd = StrHelper.EncryptPassword(PassWord.Text.ToString(), StrHelper.PasswordType.MD5); 行 22: if (bs.isLoginValidate(userName, userPwd)) 行 23: { 行 24: 源文件: d:\wgm\vs\text\web\Login.aspx.cs 行: 22 堆栈跟踪: [NullReferenceException: 未将对象引用设置到对象的实例。] Leyp.SQLServerDAL.UserDAL.isExistsUserName(String UserName) in C:\Users\yuqin\Desktop\Leyipai\SQLServerDAL\UserDAL.cs:181 Leyp.SQLServerDAL.UserDAL.isLoginValidate(String UserName, String PassWord) in C:\Users\yuqin\Desktop\Leyipai\SQLServerDAL\UserDAL.cs:207 Login.LoginButton_Click(Object sender, ImageClickEventArgs e) in d:\wgm\vs\text\web\Login.aspx.cs:22 System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +115 System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +120 System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563 #**_在这里分享一下我这问题的原因:是因为我的数据库表不全。希望能帮到后来人。_**#

asp.net 总是出错 求大神指点啊

文件名不能为空。 参数名: sourceFileName 说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.ArgumentNullException: 文件名不能为空。 参数名: sourceFileName 源错误: 行 190: if (!File.Exists(sPhoPath)) 行 191: { 行 192: File.Move(sTempPath, sPhoPath); 行 193: File.Delete(sTempPath); 行 194: } 源文件: f:\SurveyingPractice\Project\Register.aspx.cs 行: 192 堆栈跟踪: [ArgumentNullException: 文件名不能为空。 参数名: sourceFileName] System.IO.File.Move(String sourceFileName, String destFileName) +2212120 Project_Register.Btn_Register_Click(Object sender, EventArgs e) in f:\SurveyingPractice\Project\Register.aspx.cs:192 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

c#调用webservice 服务器无法处理请求。 ---> 未将对象引用设置到对象的实例

“/”应用程序中的服务器错误。 服务器无法处理请求。 ---> 未将对象引用设置到对象的实例。 说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.ServiceModel.FaultException: 服务器无法处理请求。 ---> 未将对象引用设置到对象的实例。 源错误: 行 128: 行 129: public string[] getWeather(string theCityCode, string theUserID) { 行 130: return base.Channel.getWeather(theCityCode, theUserID); 行 131: } 行 132: 源文件: c:\Users\Administrator\Desktop\WebApplication2\Service References\WeatherWS\Reference.cs 行: 130 堆栈跟踪: [FaultException: 服务器无法处理请求。 ---> 未将对象引用设置到对象的实例。] System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) +10733331 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) +336 WebApplication2.WeatherWS.WeatherWSSoap.getWeather(String theCityCode, String theUserID) +0 WebApplication2.WeatherWS.WeatherWSSoapClient.getWeather(String theCityCode, String theUserID) in c:\Users\Administrator\Desktop\WebApplication2\Service References\WeatherWS\Reference.cs:130 WebApplication2.WebForm1.test() in c:\Users\Administrator\Desktop\WebApplication2\WebForm1.aspx.cs:19 WebApplication2.WebForm1.Page_Load(Object sender, EventArgs e) in c:\Users\Administrator\Desktop\WebApplication2\WebForm1.aspx.cs:34 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51 System.Web.UI.Control.OnLoad(EventArgs e) +92 System.Web.UI.Control.LoadRecursive() +54 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +772 namespace WebApplication2 { public partial class WebForm1 : System.Web.UI.Page { protected void test() { WeatherWS.WeatherWSSoapClient w = new WeatherWS.WeatherWSSoapClient("WeatherWSSoap"); string[] infos = new string[50]; if(w.getWeather("天津","")!=null) infos = w.getWeather("天津", " "); } protected void Page_Load(object sender, EventArgs e) { test(); }

在中国程序员是青春饭吗?

今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...

程序员请照顾好自己,周末病魔差点一套带走我。

程序员在一个周末的时间,得了重病,差点当场去世,还好及时挽救回来了。

和黑客斗争的 6 天!

互联网公司工作,很难避免不和黑客们打交道,我呆过的两家互联网公司,几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口,有的是寻找线上服务器可能存在的漏洞,大部分都...

点沙成金:英特尔芯片制造全过程揭密

“亚马逊丛林里的蝴蝶扇动几下翅膀就可能引起两周后美国德州的一次飓风……” 这句人人皆知的话最初用来描述非线性系统中微小参数的变化所引起的系统极大变化。 而在更长的时间尺度内,我们所生活的这个世界就是这样一个异常复杂的非线性系统…… 水泥、穹顶、透视——关于时间与技艺的蝴蝶效应 公元前3000年,古埃及人将尼罗河中挖出的泥浆与纳特龙盐湖中的矿物盐混合,再掺入煅烧石灰石制成的石灰,由此得来了人...

上班一个月,后悔当初着急入职的选择了

最近有个老铁,告诉我说,上班一个月,后悔当初着急入职现在公司了。他之前在美图做手机研发,今年美图那边今年也有一波组织优化调整,他是其中一个,在协商离职后,当时捉急找工作上班,因为有房贷供着,不能没有收入来源。所以匆忙选了一家公司,实际上是一个大型外包公司,主要派遣给其他手机厂商做外包项目。**当时承诺待遇还不错,所以就立马入职去上班了。但是后面入职后,发现薪酬待遇这块并不是HR所说那样,那个HR自...

女程序员,为什么比男程序员少???

昨天看到一档综艺节目,讨论了两个话题:(1)中国学生的数学成绩,平均下来看,会比国外好?为什么?(2)男生的数学成绩,平均下来看,会比女生好?为什么?同时,我又联想到了一个技术圈经常讨...

副业收入是我做程序媛的3倍,工作外的B面人生是怎样的?

提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...

如果你是老板,你会不会踢了这样的员工?

有个好朋友ZS,是技术总监,昨天问我:“有一个老下属,跟了我很多年,做事勤勤恳恳,主动性也很好。但随着公司的发展,他的进步速度,跟不上团队的步伐了,有点...

我入职阿里后,才知道原来简历这么写

私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...

外包程序员的幸福生活

今天给你们讲述一个外包程序员的幸福生活。男主是Z哥,不是在外包公司上班的那种,是一名自由职业者,接外包项目自己干。接下来讲的都是真人真事。 先给大家介绍一下男主,Z哥,老程序员,是我十多年前的老同事,技术大牛,当过CTO,也创过业。因为我俩都爱好喝酒、踢球,再加上住的距离不算远,所以一直也断断续续的联系着,我对Z哥的状况也有大概了解。 Z哥几年前创业失败,后来他开始干起了外包,利用自己的技术能...

C++11:一些微小的变化(新的数据类型、template表达式内的空格、nullptr、std::nullptr_t)

本文介绍一些C++的两个新特性,它们虽然微小,但对你的编程十分重要 一、Template表达式内的空格 C++11标准之前建议在“在两个template表达式的闭符之间放一个空格”的要求已经过时了 例如: vector&lt;list&lt;int&gt; &gt;; //C++11之前 vector&lt;list&lt;int&gt;&gt;; //C++11 二、nullptr ...

优雅的替换if-else语句

场景 日常开发,if-else语句写的不少吧??当逻辑分支非常多的时候,if-else套了一层又一层,虽然业务功能倒是实现了,但是看起来是真的很不优雅,尤其是对于我这种有强迫症的程序"猿",看到这么多if-else,脑袋瓜子就嗡嗡的,总想着解锁新姿势:干掉过多的if-else!!!本文将介绍三板斧手段: 优先判断条件,条件不满足的,逻辑及时中断返回; 采用策略模式+工厂模式; 结合注解,锦...

深入剖析Springboot启动原理的底层源码,再也不怕面试官问了!

大家现在应该都对Springboot很熟悉,但是你对他的启动原理了解吗?

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...

为什么你不想学习?只想玩?人是如何一步一步废掉的

不知道是不是只有我这样子,还是你们也有过类似的经历。 上学的时候总有很多光辉历史,学年名列前茅,或者单科目大佬,但是虽然慢慢地长大了,你开始懈怠了,开始废掉了。。。 什么?你说不知道具体的情况是怎么样的? 我来告诉你: 你常常潜意识里或者心理觉得,自己真正的生活或者奋斗还没有开始。总是幻想着自己还拥有大把时间,还有无限的可能,自己还能逆风翻盘,只不是自己还没开始罢了,自己以后肯定会变得特别厉害...

为什么程序员做外包会被瞧不起?

二哥,有个事想询问下您的意见,您觉得应届生值得去外包吗?公司虽然挺大的,中xx,但待遇感觉挺低,马上要报到,挺纠结的。

当HR压你价,说你只值7K,你该怎么回答?

当HR压你价,说你只值7K时,你可以流畅地回答,记住,是流畅,不能犹豫。 礼貌地说:“7K是吗?了解了。嗯~其实我对贵司的面试官印象很好。只不过,现在我的手头上已经有一份11K的offer。来面试,主要也是自己对贵司挺有兴趣的,所以过来看看……”(未完) 这段话主要是陪HR互诈的同时,从公司兴趣,公司职员印象上,都给予对方正面的肯定,既能提升HR的好感度,又能让谈判气氛融洽,为后面的发挥留足空间。...

面试:第十六章:Java中级开发(16k)

HashMap底层实现原理,红黑树,B+树,B树的结构原理 Spring的AOP和IOC是什么?它们常见的使用场景有哪些?Spring事务,事务的属性,传播行为,数据库隔离级别 Spring和SpringMVC,MyBatis以及SpringBoot的注解分别有哪些?SpringMVC的工作原理,SpringBoot框架的优点,MyBatis框架的优点 SpringCould组件有哪些,他们...

面试阿里p7,被按在地上摩擦,鬼知道我经历了什么?

面试阿里p7被问到的问题(当时我只知道第一个):@Conditional是做什么的?@Conditional多个条件是什么逻辑关系?条件判断在什么时候执...

面试了一个 31 岁程序员,让我有所触动,30岁以上的程序员该何去何从?

最近面试了一个31岁8年经验的程序猿,让我有点感慨,大龄程序猿该何去何从。

【阿里P6面经】二本,curd两年,疯狂复习,拿下阿里offer

二本的读者,在老东家不断学习,最后逆袭

大三实习生,字节跳动面经分享,已拿Offer

说实话,自己的算法,我一个不会,太难了吧

程序员垃圾简历长什么样?

已经连续五年参加大厂校招、社招的技术面试工作,简历看的不下于万份 这篇文章会用实例告诉你,什么是差的程序员简历! 疫情快要结束了,各个公司也都开始春招了,作为即将红遍大江南北的新晋UP主,那当然要为小伙伴们做点事(手动狗头)。 就在公众号里公开征简历,义务帮大家看,并一一点评。《启舰:春招在即,义务帮大家看看简历吧》 一石激起千层浪,三天收到两百多封简历。 花光了两个星期的所有空闲时...

《经典算法案例》01-08:如何使用质数设计扫雷(Minesweeper)游戏

我们都玩过Windows操作系统中的经典游戏扫雷(Minesweeper),如果把质数当作一颗雷,那么,表格中红色的数字哪些是雷(质数)?您能找出多少个呢?文中用列表的方式罗列了10000以内的自然数、质数(素数),6的倍数等,方便大家观察质数的分布规律及特性,以便对算法求解有指导意义。另外,判断质数是初学算法,理解算法重要性的一个非常好的案例。

《Oracle Java SE编程自学与面试指南》最佳学习路线图(2020最新版)

正确选择比瞎努力更重要!

面试官:你连SSO都不懂,就别来面试了

大厂竟然要考我SSO,卧槽。

微软为一人收购一公司?破解索尼程序、写黑客小说,看他彪悍的程序人生!...

作者 | 伍杏玲出品 | CSDN(ID:CSDNnews)格子衬衫、常掉发、双肩包、修电脑、加班多……这些似乎成了大众给程序员的固定标签。近几年流行的“跨界风”开始刷新人们对程序员的...

终于,月薪过5万了!

来看几个问题想不想月薪超过5万?想不想进入公司架构组?想不想成为项目组的负责人?想不想成为spring的高手,超越99%的对手?那么本文内容是你必须要掌握的。本文主要详解bean的生命...

我说我懂多线程,面试官立马给我发了offer

不小心拿了几个offer,有点烦

自从喜欢上了B站这12个UP主,我越来越觉得自己是个废柴了!

不怕告诉你,我自从喜欢上了这12个UP主,哔哩哔哩成为了我手机上最耗电的软件,几乎每天都会看,可是吧,看的越多,我就越觉得自己是个废柴,唉,老天不公啊,不信你看看…… 间接性踌躇满志,持续性混吃等死,都是因为你们……但是,自己的学习力在慢慢变强,这是不容忽视的,推荐给你们! 都说B站是个宝,可是有人不会挖啊,没事,今天咱挖好的送你一箩筐,首先啊,我在B站上最喜欢看这个家伙的视频了,为啥 ,咱撇...

立即提问
相关内容推荐