Ajax Modal弹出窗口在asp.net 3.5 sp1中不起作用 [英] Ajax Modal popup not working in asp.net 3.5 sp1

查看:73
本文介绍了Ajax Modal弹出窗口在asp.net 3.5 sp1中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用asp.net Web应用程序
这是我的代码:-

I am working asp.net web application
Here is my code :-

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ModalPopup.aspx.cs" Inherits="ExpertSystem.ModalPopup" %>

<%@ Register  assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="ajaxToolkit"  %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Untitled Page</title>
    <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
    var styleToSelect;
    function onOk() {
    document.getElementById('Paragraph1').className = styleToSelect;
    }
</script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<br />
<asp:LinkButton ID="LinkButton1" runat="server">Please click to select an alternate text style.</asp:LinkButton><br />
<br />
<div>
   <p id="Paragraph1">
     <a href="http://joeon.net"><span style="color: #3366cc">Joe Stagner</span></a>,
      a member of the Microsoft product team, builds a CascadingDropDown sample application
      that demonstrates two fundamental benefits of AJAX-enabled web applications, namely
      web service integration and asynchronous page updates.
   </p>
   <asp:Panel EnableViewState="true" ID="Panel1" runat="server" CssClass="modalPopup" Style="display: none" Width="233px">
   <p>Choose the style you would like:</p>
   <input id="RadioA" name="Radio" onclick="styleToSelect = 'sampleStyleA';" type="radio" />
   <label class="sampleStyleA" for="RadioA">Choose THIS Style.</label><br />
   <input id="RadioB" name="Radio" onclick="styleToSelect = 'sampleStyleB';" type="radio" />
   <label class="sampleStyleB" for="RadioB">Choose THIS Style.</label><br />
   <input id="RadioC" name="Radio" onclick="styleToSelect = 'sampleStyleC';" type="radio" />
   <label class="sampleStyleC" for="RadioC">Choose THIS Style.</label><br />
   <input id="RadioD" name="Radio" onclick="styleToSelect = 'sampleStyleD';" type="radio" />
   <label class="sampleStyleD" for="RadioD">Choose THIS Style.</label><br />
   <br />
   <div align="center">
      <asp:Button ID="OkButton" runat="server" Text="OK" />
      <asp:Button ID="CancelButton" runat="server" Text="Cancel" />
   </div>
   </asp:Panel>
    <ajaxToolkit:ModalPopupExtender ID="Panel1_ModalPopupExtender1" runat="server"

        TargetControlID="LinkButton1"

             PopupControlID="Panel1"

             BackgroundCssClass="modalBackground"

             DropShadow="true"

             OkControlID="OkButton"

             OnOkScript="onOk()"

             CancelControlID="CancelButton"

             EnableViewState="true">

    </ajaxToolkit:ModalPopupExtender>
   <br />
   </div>
    </form>
</body>
</html>

推荐答案

删除DropShadow属性
是否有modalpopupclass
在CSS中
remove DropShadow property
is there modalpopupclass
in CSS


您是否正在Web应用程序中尝试?
are you try in webapplication?


这篇关于Ajax Modal弹出窗口在asp.net 3.5 sp1中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆