使用atlas遇到的问题,请教高手

lzq0207 2006-10-29 03:08:11
代码如下:
<tr><td height="30">
<atlas:ScriptManager ID="ScriptManager1" runat="server"
EnablePartialRendering="true" />
<asp:DropDownList ID="ddlType" runat="server" CssClass="input"
style="width:150px;">
<asp:ListItem Value="0">工作类别</asp:ListItem>
</asp:DropDownList></td>
</tr>
<tr><td height="30">
<atlas:UpdatePanel ID="id1" runat="server">
<ContentTemplate>
<asp:DropDownList ID="ddlJob" runat="server" CssClass="input" style="width:150px;">
<asp:ListItem Value="0">工作职位</asp:ListItem>
</asp:DropDownList>
</ContentTemplate>
<Triggers>
<atlas:ControlEventTrigger ControlID="ddlType"
EventName="onShowJob"/>
</Triggers>
</atlas:UpdatePanel></td></tr>

事件:
Sub onShowJob(ByVal obj As Object, ByVal e As EventArgs)
Call ShowJob(ddlType.SelectedValue)
End Sub
出错信息:
“/”应用程序中的服务器错误。
--------------------------------------------------------------------------------

The EventName must be set to a valid event name on the associated control.
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.InvalidOperationException: The EventName must be set to a valid event name on the associated control.

源错误:

执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。

堆栈跟踪:


[InvalidOperationException: The EventName must be set to a valid event name on the associated control.]
Microsoft.Web.UI.ControlEventTrigger.Initialize(Control ownerControl) +456
Microsoft.Web.UI.UpdatePanelTriggerCollection.Initialize(Control ownerControl) +65
Microsoft.Web.UI.UpdatePanel.Initialize() +35
Microsoft.Web.UI.UpdatePanel.OnLoad(EventArgs e) +79
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061




--------------------------------------------------------------------------------
版本信息: Microsoft .NET Framework 版本:2.0.50727.42; ASP.NET 版本:2.0.50727.210

...全文
253 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
codetian 2007-01-19
  • 打赏
  • 举报
回复
改成这样试试 应该就可以了
<Triggers>
<atlas:ControlEventTrigger ControlID="ddlType"
EventName="selectedvalue"/>
</Triggers>

<Triggers>
<atlas:ControlEventTrigger ControlID="ddlType"
EventName="selecteditem"/>
</Triggers>
lzq0207 2006-10-30
  • 打赏
  • 举报
回复
应该不是这个问题吧
我也试过了的
cat_hsfz 2006-10-29
  • 打赏
  • 举报
回复
看这两个
<asp:DropDownList ID="ddlJob" runat="server" CssClass="input" style="width:150px;">
<atlas:ControlEventTrigger ControlID="ddlType" EventName="onShowJob"/>
ddlType哪里有定义一个名为onShowJob的事件?虽然这个函数存在,但它没被定义为事件。

52,797

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 Ajax
社区管理员
  • Ajax
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧