DropDownExtender在Ajax中

时间:2009-12-23 05:53:21

标签: c# asp.net ajax

在我的网页中,我想放置ajax Dropdownextender。但这不是很好,这是我的代码:

<form id="form1" runat="server">

        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:Label  ID="lbldrp" runat ="Server" Text ="MyDropDown"></asp:Label>
        <asp:Panel ID="Mypanel" runat ="Server" >
          <asp:LinkButton ID ="linkmsn" runat ="Server" Text ="www.stackoverflow.com"></asp:LinkButton><br />
          <asp:LinkButton ID ="linkgoogle" runat ="Server" Text ="www.google.com"></asp:LinkButton>
        </asp:Panel>

        <cc1:DropDownExtender ID="DropDownExtender1" TargetControlID ="lbldrp" DropDownControlID ="Mypanel"  runat="server" >                 

        </cc1:DropDownExtender>
        <cc1:AnimationExtender ID="AnimationExtender1"  TargetControlID ="Mypanel"    runat="server">
        <Animations>
          <OnShow>
            <HideAction Visible="true" />
          </OnShow>
          <OnHide>
            <HideAction Visible="false" />
          </OnHide>
        </Animations>          
        </cc1:AnimationExtender>            

    </form>

它给出了一些错误,如

"Animation on TargetControlID="Mypanel" uses property AjaxControlToolkit.AnimationExtender.OnShow that does not exist or cannot be set"

帮我谢谢。

1 个答案:

答案 0 :(得分:0)

Hai Sasidhar OnShow Onhide 不是 ajaxcontroltoolkit:animationExtender 的有效属性,而是可以使用 OnMouseOver for OnShow OnMouseOut for OnHide

看看这个http://www.c-sharpcorner.com/UploadFile/raj1979/AnimationExtender01242008065540AM/AnimationExtender.aspx

http://www.asp.net/AJAX/AjaxControlToolkit/Samples/Animation/Animation.aspx并检查其属性