ajax页面中数据提交事件处理问题?
在页面中做ajax两级联下拉时,页面中同时想通过button事件,对二级下拉中的数据库项进行增加或删除,可是总是提示回调错误,该怎样处理比较好,请指点思路? --------------------编程问答-------------------- 那行代码出错onchage中通过AAJX获取数据ADD option --------------------编程问答-------------------- 用js事件,再到js方法里面用ajax调后台代码执行
--------------------编程问答-------------------- 具体该怎样做呀?
我的代码是这样的
一级下拉:<asp:DropDownList ID="DepartmentDrop" runat="server" OnSelectedIndexChanged="DepartmentDrop_SelectedIndexChanged"></asp:DropDownList>
<cc1:CascadingDropDown ID="department" runat="server" TargetControlID="DepartmentDrop" Category="department" PromptText="Select Item" LoadingText="Loading.." ServicePath="DepartmentService.asmx" ServiceMethod="GetDepartmentContents">
</cc1:CascadingDropDown>
二级下拉: <asp:DropDownList ID="personalLeaveEmployeeNameh" runat="server"></asp:DropDownList>
<cc1:CascadingDropDown ID="employeeByDepartment" runat="server" TargetControlID="personalLeaveEmployeeNameh"
Category="employee" PromptText="Select Item" ParentControlID="DepartmentDrop"
LoadingText="Loading.." ServicePath="DepartmentService.asmx"
ServiceMethod="GetEmployeeByDepartmentContents"></cc1:CascadingDropDown>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="删除" /></ContentTemplate></asp:UpdatePanel>
<asp:Label ID="Label2" runat="server" Font-Bold="False" Text=""></asp:Label>
<asp:TextBox ID="txtJcdw" runat="server" Width="200px"></asp:TextBox>
<asp:Button ID="tianJia" runat="server" Height="25px" Text="添加二级下拉" Width="41px" OnClick="tjJld_Clk" /> --------------------编程问答-------------------- 我是用AjaxControlToolkit控件实现级联的 --------------------编程问答-------------------- --------------------编程问答-------------------- 问题是:点button将数据提交至数据库时,发生回调错误.
怎样才能实现ajax级联下拉的页面中,同时实现button的数据提交不发生错误? --------------------编程问答-------------------- 是回发时候引起的 可以用隐藏域保存己选中的值! --------------------编程问答-------------------- 怎样用隐藏域保存己选中DropDownList的值,请给个实例吧!?
补充:.NET技术 , ASP.NET