2010-03-16 7 views
0

업데이트 패널이있는 asp.net 콘텐츠 페이지가 있고, asp.net 컨트롤이 ajax Extender와 연결되어 있고 이벤트 클릭으로 asp.net 버튼이 있습니다. 모든 것이 정상적으로 실행됩니다. CascadingDropDown Extender가있는 DropDownList가 3 개 있습니다. DropDownLists에서 아무 것도 선택하지 않고 버튼을 클릭하면 이벤트 클릭이 작동하는 버튼을 클릭합니다.하지만 버튼을 클릭하면 아무 것도 선택하지 않으면 내 페이지가 응답합니다.asp.net 콘텐츠 페이지가 CascadingDropDown에 문제가 있습니다.

나는 이미 클릭 버튼에 대한 트리거를 추가했습니다.

이 문제를 해결하려면 무엇인가를 확인해야합니까 ??? 나는이 문제를 해결할 수 있었다

<%@ Page Title="" Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="IMAM_APPLICATION.WebForm2" %> 

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> 

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"> 
</asp:Content> 
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> 
</asp:Content> 
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server"> 
    <asp:UpdatePanel ID="UPDDL" runat="server"> 
    <ContentTemplate> 
    <asp:Panel ID="PDDL" runat="server"> 
     <asp:DropDownList ID="cmbWorkField" runat="server" Style="top: 41px; left: 126px; 
        position: absolute; height: 22px; width: 126px"> 


       </asp:DropDownList> 

       <asp:DropDownList runat="server" ID="cmbOccupation" Style="top: 77px; left: 127px; 
        position: absolute; height: 22px; width: 77px"> 

       </asp:DropDownList> 
       <asp:DropDownList ID="cmbSubOccup" runat="server" 
        style="position:absolute; top: 116px; left: 126px;"> 

       </asp:DropDownList> 

       <cc1:CascadingDropDown ID="cmbWorkField_CascadingDropDown" runat="server" 
        TargetControlID="cmbWorkField" 
        Category="WorkField" 
        LoadingText="Please Wait ..." 
        PromptText="Select Wor kField ..." 
        ServiceMethod="GetWorkField" 
        ServicePath="ServiceTags.asmx"> 
       </cc1:CascadingDropDown> 

       <cc1:CascadingDropDown ID="cmbOccupation_CascadingDropDown" runat="server" 

        TargetControlID="cmbOccupation" 
        Category="Occup" 
        LoadingText="Please wait..." 
        PromptText="Select Occup ..." 
        ServiceMethod="GetOccup" 
        ServicePath="ServiceTags.asmx" 
        ParentControlID="cmbWorkField"> 
       </cc1:CascadingDropDown> 
       <cc1:CascadingDropDown ID="cmbSubOccup_CascadingDropDown" runat="server" 
        Category="SubOccup" 
        Enabled="True" 
        LoadingText="Please Wait..." 
        ParentControlID="cmbOccupation" 
        PromptText="Select Sub Occup" 
        ServiceMethod="GetSubOccup" 
        ServicePath="ServiceTags.asmx" 
        TargetControlID="cmbSubOccup"> 
       </cc1:CascadingDropDown> 
       </asp:Panel> 
     <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" /> 
     <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> 
    </ContentTemplate> 

     <Triggers> 
      <asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" /> 
     </Triggers> 

    </asp:UpdatePanel> 


</asp:Content> 

........................ 

here is the code behind: 

.................................................... 

protected void Button1_Click(object sender, EventArgs e) 
     { 
      Label1.Text = "you click me"; 
     } 

답변

0

:

여기 내 코드입니다.

내가 추가 한 것은 업데이트 패널을 제거하고 페이지에 EnableEventValidation = "False"를 설정하는 것이 었습니다.

0

보고있는 문제는 Codeplex에 있습니다. EventValidation을 끄지 않아도되는 두 가지 가능한 해결책에 대한 jlewicki의 글을 참고하십시오.

관련 문제