asp.net 2.0在使用了mater page的情况下Form defaultbutton无法设置的问题
2006-02-16 10:39
836 查看
问题如题
我尝试了下列方法,在页面程序中加入:
1 protected override void OnInit(EventArgs e)
2 {
3 base.OnInit(e);
4 Page.Form.DefaultButton = "btnSearch";
5 }
但是页面提示错误,宣告失败
Exception Details: System.InvalidOperationException: The DefaultButton of 'form1' must be the ID of a control of type IButtonControl.
Source Error:
Stack Trace:
不知道有没有哪位高人有好的解决方案?
我尝试了下列方法,在页面程序中加入:
1 protected override void OnInit(EventArgs e)
2 {
3 base.OnInit(e);
4 Page.Form.DefaultButton = "btnSearch";
5 }
但是页面提示错误,宣告失败
The DefaultButton of 'form1' must be the ID of a control of type IButtonControl.
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.InvalidOperationException: The DefaultButton of 'form1' must be the ID of a control of type IButtonControl.
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. |
不知道有没有哪位高人有好的解决方案?
相关文章推荐
- 设置页面的默认焦点控件和默认接受事件控件How Do I Set the DefaultFocus or DefaultButton in a Page Based on a Master Page in ASP.NET 2.0
- 问题.NET--win7 IIS唯一密钥属性“VALUE”设置为“DEFAULT.ASPX”时,无法添加类型为“add”的重复集合
- Scott Mitchell 的ASP.NET 2.0数据教程之十四:使用FormView 的模板
- Scott Mitchell 的ASP.NET 2.0数据教程之十四:使用FormView 的模板
- 使用ASP.NET 2.0 的一些问题!(11.22更新)
- asp.net 解决使用OLEDB导入excel数据时同时包含文本和数字的列无法正常读取情况
- 如何设置使 IIS 应用程序池使用 ASP.Net 3.5 而不是 2.0
- ASP.NET Core 2.0 集成测试无法执行的问题
- DataProtection设置问题引起不同ASP.NET Core站点无法共享用户验证Cookie
- asp.net 2.0 下设置和使用FCKeditor文本编辑器
- 解決 IE10 浏览器无法使用 ASP.NET 表单验证登录的问题
- asp.net 2.0 下设置和使用FCKeditor文本编辑器
- 在ASP.NET 2.0中使用RDLC格式的报表的问题
- 解決 IE10 浏览器无法使用 ASP.NET From 验证登录的问题
- 使用OpenFlashChart 2.0结合asp.net的问题(解疑)
- [翻译]Scott Mitchell 的ASP.NET 2.0数据教程之十四:使用FormView 的模板
- asp.net 2.0 下设置和使用FCKeditor文本编辑器
- 解决 asp.net 伪静态 IIS设置后 直正HTML无法显示的问题
- 解决 asp.net 伪静态 IIS设置后 直正HTML无法显示的问题
- ASP.NET 2.0发布之IIS设置问题