惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Privacy & Cybersecurity Law Blog
V
V2EX
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The Register - Security
The Register - Security
MongoDB | Blog
MongoDB | Blog
P
Privacy International News Feed
The Last Watchdog
The Last Watchdog
Security Archives - TechRepublic
Security Archives - TechRepublic
美团技术团队
Stack Overflow Blog
Stack Overflow Blog
博客园 - 司徒正美
博客园 - 三生石上(FineUI控件)
V
Visual Studio Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
K
Kaspersky official blog
S
Secure Thoughts
T
Tenable Blog
Security Latest
Security Latest
The Cloudflare Blog
S
Security @ Cisco Blogs
H
Heimdal Security Blog
aimingoo的专栏
aimingoo的专栏
TaoSecurity Blog
TaoSecurity Blog
Blog — PlanetScale
Blog — PlanetScale
Microsoft Security Blog
Microsoft Security Blog
Schneier on Security
Schneier on Security
Webroot Blog
Webroot Blog
G
Google Developers Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Scott Helme
Scott Helme
IT之家
IT之家
Latest news
Latest news
The Hacker News
The Hacker News
C
Check Point Blog
T
The Exploit Database - CXSecurity.com
H
Hackread – Cybersecurity News, Data Breaches, AI and More
腾讯CDC
C
CERT Recently Published Vulnerability Notes
NISL@THU
NISL@THU
N
News | PayPal Newsroom
Forbes - Security
Forbes - Security
P
Palo Alto Networks Blog
S
Security Affairs
S
Securelist
Google Online Security Blog
Google Online Security Blog
WordPress大学
WordPress大学
Last Week in AI
Last Week in AI
C
Cybersecurity and Infrastructure Security Agency CISA
A
About on SuperTechFans

博客园 - laughterwym

edwin-wang.com GridView mouseover的高亮 GridView vs DataGrid 来句老套的~~~Happy 牛 Year !!! Grub vga模式 个人常用软件替代列表,支持开源 One more time, One more chance 获得Access数据表名列表 初面纪念 关于Windows 2003 ".." 表示父路径解决方法 Windows 2003 SD读卡器驱动方法 关于水晶报表分页统计的开发经验 残败的考试 一段时间的忙碌…… Standards: big benefits for small business 国庆、中秋快乐!!! 2 weeks later 2周,开始忙碌中适应这里的生活了……累 I Do Believe
Autopostback提示“该对象不支持此属性或方法”(Object doesn't support this property or method)
laughterwym · 2008-12-23 · via 博客园 - laughterwym

在公司调试没有问题,回家改了些许东西,居然DropDownList的Autopostback不起作用了。。。郁闷,google了下。。。

google到的一个问题问题找到了,原来是最后第二行有个  
  <asp:button   id="submit"   Runat="server"   Text="添   加"></asp:button>  
  <asp:Button   id="submit"..>     ====>       变成   <asp:button..>了  
  晕死,后台里又有   protected   System.Web.UI.WebControls.Button   submit;   这个东西的,而且   submit   按钮功能一切正常,谁会想到是这个原因。

 没找到目标。。。

 1    <div class="font">
 2        <asp:Label ID="Label1" runat="server" Text="Label" ForeColor="Aqua"></asp:Label><br />
 3        Test Project:
 4        <asp:DropDownList ID="listTestProj" runat="server" AutoPostBack="true">
 5        </asp:DropDownList>
 6        <br />
 7        Test Plan:
 8        <asp:DropDownList ID="listTestPlan" runat="server" AutoPostBack="true">
 9        </asp:DropDownList>
10        <br />
11        <asp:Button ID="submit" runat="server" Text="Submit" OnClick="Do_Click" />
12    </div>

最后一一比对了修改处,发现问题出在Button上,我定义其ID为submit,修改为Do就没有问题了。

 1   <div class="font">
 2       <asp:Label ID="Label1" runat="server" Text="Label" ForeColor="Aqua"></asp:Label><br />
 3       Test Project:
 4       <asp:DropDownList ID="listTestProj" runat="server" AutoPostBack="true">
 5       </asp:DropDownList>
 6       <br />
 7       Test Plan:
 8       <asp:DropDownList ID="listTestPlan" runat="server" AutoPostBack="true">
 9       </asp:DropDownList>
10       <br />
11       <asp:Button ID="Do" runat="server" Text="Submit" OnClick="Do_Click" />
12   </div>

估摸着应该是asp.net要求asp.net空间需要放在runat server的form,而form的提交默认为button的submit的缘故。莫名死了。。。