gpt4 book ai didi

c# - 如何在我的 Web 应用程序中使用 ajax 工具包控件?

转载 作者:太空宇宙 更新时间:2023-11-03 15:56:02 25 4
gpt4 key购买 nike

我试图在我的 ASP .net 应用程序中使用一些 Ajax 工具包控件,但它似乎不起作用。
我想在我的表单中使用模态弹出窗口,但必须在弹出窗口中显示的面板、在浏览器中显示的面板和按钮什么都不做。为什么它不起作用?
我在 VB .net 中编码并且有我的示例:

    <%@ Control Language="vb" AutoEventWireup="false" CodeBehind="FieldItem.ascx.vb" Inherits="DataBaseWorker.FieldItem" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<link href="../Styles/FieldItem.css" rel="stylesheet" type="text/css" />
<div class="TitleDiv">

<span runat="server" id="lblIndex" class="IndexSpan">111</span>
<span runat="server" id="lblDelimeter" class="IndexSpan"> ) </span>
<span runat="server" id="lblTitle" class="TitleSpan">test</span>
<span runat="server" id="lblActiveState" class="TitleSpan">test</span>
<span runat="server" id="lblAlias" class="TitleSpan">test</span>
<asp:Button CssClass="buttonControl" ID="btnDelete" runat="server" Text="test" />
<asp:Button CssClass="buttonControl" ID="btnEdit" runat="server" Text="test" />
<asp:Button CssClass="buttonControl" ID="btnAddAlias" runat="server" Text="test" />
<asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server"
CancelControlID="btnCancel" OkControlID="btnSubmitAlias" TargetControlID="btnAddAlias"
PopupControlID="addAliasPlace" Drag="false">

<Animations>
<OnShowing>
<Sequence>
<StyleAction AnimationTarget="CloseButton" Attribute="display" Value="none" />
<Resize Duration="0" Height="50px" Width="50px" />
</Sequence>
</OnShowing>
<OnShown>
<Sequence>
<Parallel>
<FadeIn />
<Scale ScaleFactor="5" Center="True" />
</Parallel>
<StyleAction AnimationTarget="CloseButton" Attribute="display" Value="" />
</Sequence>
</OnShown>
<OnHiding>
<Sequence>
<StyleAction AnimationTarget="CloseButton" Attribute="display" Value="none" />
<Parallel>
<FadeOut />
<Scale ScaleFactor="5" Center="True" />
</Parallel>
</Sequence>
</OnHiding>
</Animations>

</asp:ModalPopupExtender>

</div>
<asp:Panel Visible="false" runat="server" id="addAliasPlace" >

<div class="AddAliasDiv">
<asp:TextBox ID="txtAliasName" CssClass="TitleSpan" runat="server"></asp:TextBox>
<asp:Button CssClass="buttonControl" ID="btnSubmitAlias" runat="server" Text="ثبت" />
<asp:Button CssClass="buttonControl" ID="btnCancel" runat="server" Text="بازگشت" />
</div>
</asp:Panel>

最佳答案

我可以描述当我使用模态弹出窗口时我做了什么。

<asp:Button ID="btnshowpopup" runat="server" Style="display: none;" />


<act:ModalPopupExtender ID="test" runat="server"
TargetControlID="btnshowpopup"
PopupControlID="addAliasPlace"
CancelControlID="btnModalCancel"
BackgroundCssClass="modalBackground"
BehaviorID="addAliasPlace">
</act:ModalPopupExtender>

在我使用 js 显示模式后,例如:

$find("addAliasPlace").show();

关于c# - 如何在我的 Web 应用程序中使用 ajax 工具包控件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23545486/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com