none
asp.net ajax应用程序 发布到window server2003上之后,ModalPopup弹出窗口上面服务器控件回发会使弹出窗口闪一下? RRS feed

  • 问题

  • asp.net ajax应用程序 发布到window server2003上之后,ModalPopup弹出窗口上面控件回发会使弹出窗口闪一下,然而在本地开发环境里面运行浏览不会出现这种情况,在本地IIS部署后,浏览也不会出现这种情况。
    开发环境是VS2008
    本地IIS5.1
    ModalPopup弹出窗口上面有一个GridView,点击这个GridView里面内容行的CheckBox(触发oncheckedchanged方法),这个弹出窗口就会闪一下。而我在本地VS或者IIS里面都不会闪现???
    整个ModalPopup弹出窗口我是放到一个updatepanel里面的,而在这外面还嵌套了一个updatepanel。
    发布到服务器上之后ModalPopup弹出窗口上面的下拉列表框选择也会导致使弹出窗口闪一下。郁闷之极。。。。请大家帮帮我?

    此问题困扰我很久了一直找不到解决方法。
    2010年1月8日 4:52

答案

  • 多谢各位,问题已经解决了!并不是以上原因导致的。
    而是我在页面上使用了updatepanel嵌套,弹出窗口里面的控件事件导致了弹出窗口外面的updatepanel刷新,一旦外面的updatepanel刷新的时候就会调用pageLoad事件,一旦回发之后弹出窗口就会被关闭。所以我在页面pageLoad事件中做了判断,弹出窗口的时候设置一个标志位为shown,关闭的时候设置为hiden,窗口回发的时候会去判断,如果之前的标志位为shown,那么我就显示该窗口。除非是调用hiden()方法重设标志位为hiden,那么窗口才不会被弹出。所以才会出现窗口打开一下然后关闭再打开的问题。(但是在本地VS环境或者IIS离不会出现,只有发布到服务器上才会出现)

    具体为什么我还不得而知。。。

    2010年1月13日 8:17

全部回复

  • http://www.charlies-angels.com.cn/show.aspx?id=0800403483&cp=XL我写的页面中也存在这个问题 在show页面中 大约有4-5个ModalPopup控件,点击按钮弹出的时候页面都会刷新,试过很多方法,都没有用。
    代码如下:
    <%@ Page Language="C#" MasterPageFile="~/Show.master" AutoEventWireup="true" CodeFile="show.aspx.cs" Inherits="show" Title="查理的天使" Theme="Default" %>
    
    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
    <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    
    <div class="bdm">
        <div class="bdl">
    	  
    	  <div class="menu">
    	    <br/>
    	    
    		<h2>
    		
    		   <h3>+&nbsp;&nbsp;<asp:LinkButton ID="Lb_bestsellers" runat="server" PostBackUrl="~/bestsellers2.aspx" ValidationGroup="6666">排行榜</asp:LinkButton></h3>
    		   <h3>+&nbsp;&nbsp;<asp:LinkButton ID="Lball" runat="server" PostBackUrl="~/necklaces.aspx" ValidationGroup="6666">项链</asp:LinkButton></h3>
    		   <h3>+&nbsp;&nbsp;<asp:LinkButton ID="Lb0_200" runat="server" PostBackUrl="~/earrings.aspx" ValidationGroup="6666">耳环</asp:LinkButton></h3>
    		   <h3>+&nbsp;&nbsp;<asp:LinkButton ID="Lb200_300" runat="server" PostBackUrl="~/bracelets.aspx" ValidationGroup="6666">手链</asp:LinkButton></h3>
    		   <h3>+&nbsp;&nbsp;<asp:LinkButton ID="Lb300_400" runat="server" PostBackUrl="~/latestnecklaces.aspx" ValidationGroup="6666">新品项链</asp:LinkButton></h3>
    		   <h3>+&nbsp;&nbsp;<asp:LinkButton ID="Lb400_600" runat="server" PostBackUrl="~/latestearrings.aspx" ValidationGroup="6666">新品耳环</asp:LinkButton></h3>
    		   <h3>+&nbsp;&nbsp;<asp:LinkButton ID="Lb600_800" runat="server" PostBackUrl="~/latestbracelets.aspx" ValidationGroup="6666">新品手链</asp:LinkButton></h3>
    		   <h3>+&nbsp;&nbsp;<asp:LinkButton ID="Lb_latest" runat="server" PostBackUrl="~/sale.aspx" ValidationGroup="6666">促销活动</asp:LinkButton></h3>
    		</h2>
    	  </div>
    	</div>
    	<div class="bdr">
    	  <div class="bdrt">
    	    <h1>产品详情</h1>
    	  </div>
    	  <div class="bdrm">  
              <table cellpadding="0" cellspacing="0" border="0" width="98%">
                  <tr>
                      <td style="width:49%;" rowspan="8">
                          <asp:Image ID="show_img" runat="server" Width="310px" Height="310px" ImageAlign="Middle" /></td>
                      <td style="width:2%;" rowspan="8">
                          </td>
                      <td style="width:49%;">
                          风格:<asp:Label ID="Tb_name" runat="server"></asp:Label>
                          </td>
                  </tr>
                  <tr>
                      <td>
                          饰品号:<asp:Label ID="Tb_code" runat="server"></asp:Label>
                      </td>
                  </tr>
                  <tr>
                      <td>
                        <asp:Label ID="Tb_content" runat="server" Text="这里是产品的介绍~"></asp:Label>
                      </td>
                  </tr>
                  <tr>
                      <td>
                          <asp:Label ID="Lb_retail_value" runat="server" Text="转让价:¥"></asp:Label>
                          <asp:Label ID="Tb_retail_value" runat="server"></asp:Label>   
                      </td>
                  </tr>  
                  <tr>
                    <td>
                        <asp:Label ID="Label3" runat="server" Text="会员价:¥"></asp:Label>
                        <asp:Label ID="labFPrice" runat="server"></asp:Label>
                    </td>
                  </tr>            
                  <tr>
                      <td>
                        <asp:UpdatePanel ID="UpdatePanel3" runat="server">
                        <ContentTemplate>
                            <asp:ImageButton ID="ImageButton3" runat="server" ImageUrl="~/images/jian.png" CausesValidation="False"  />
                            <asp:TextBox ID="T_week" runat="server" CssClass="input7" Text="1" Width="25px"></asp:TextBox>
                            <asp:ImageButton ID="ImageButton2" runat="server" ImageUrl="~/images/jia.png" CausesValidation="False"  />
                            &nbsp;&nbsp;&nbsp;&nbsp;库存<asp:Label ID="Lb_stock" runat="server"></asp:Label>件
                        <cc1:NumericUpDownExtender ID="NumericUpDownExtender1" runat="server"                     
                        TargetControlID="T_week"
                        Width="25"
                        RefValues="" 
                        ServiceDownMethod=""
                        ServiceUpMethod=""
                        TargetButtonUpID="ImageButton2"
                        TargetButtonDownID="ImageButton3" 
                        Minimum = "1" />
                        <cc1:FilteredTextBoxExtender
                       ID="FilteredTextBoxExtender1"
                       runat="server"
                       TargetControlID="T_week"
                       FilterType="Numbers" />
                        </ContentTemplate>
                        </asp:UpdatePanel>
                      </td>
                  </tr>
                  <tr>
                      <td>                  
                        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>
                        <asp:ImageButton ID="Ib_week" runat="server" ImageUrl="~/images/02.gif" OnClick="Ib_week_Click" ImageAlign="AbsBottom" CausesValidation="false" />                        
                        </ContentTemplate>
                        </asp:UpdatePanel>
                      </td>
                  </tr>
                  <tr>
                      <td>
                        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                        <ContentTemplate>
                            <asp:Label ID="Label1" runat="server" Text="点击下面按钮使用有偿使用服务" Font-Size="10px"></asp:Label>
                        <br/>
                          <asp:Label ID="Lb_week" runat="server" Text="有偿使用:" Font-Size="14px" ForeColor="red" ></asp:Label>
                          <asp:LinkButton ID="Tb_week" runat="server" OnClick="Tb_week_Click" Font-Size="14px" Font-Bold="true" CausesValidation="False"></asp:LinkButton>
                        &nbsp;|&nbsp;&nbsp;<asp:LinkButton ID="Tb_month" runat="server" OnClick="Tb_month_Click" Font-Size="14px" Font-Bold="true" CausesValidation="False"></asp:LinkButton>
                        </ContentTemplate>
                        </asp:UpdatePanel>
                      </td>
                  </tr>
                  <tr>
                      <td>
                      </td>
                  </tr>
                  <tr>
                      <td colspan="3" style="height:20px;">
                      </td>
                  </tr>
                  <tr>
                      <td colspan="3"> 
    <asp:UpdatePanel ID="UpdatePanel4" runat="server">
    <ContentTemplate>
    <cc1:TabContainer id="TabContainer1" runat="server" CssClass="AjaxTabStrip" ActiveTabIndex="2" EnableTheming="False"><cc1:TabPanel runat="server" HeaderText="TabPanel1" ID="TabPanel1"><HeaderTemplate>
    配套饰品
    </HeaderTemplate>
    <ContentTemplate>
    <div style="MARGIN: 0px 10px"><br/><asp:DataList id="DataList1" runat="server" RepeatDirection="Horizontal"><ItemTemplate>
                                    <asp:ImageButton Width="160px" Height="160px" ID="ImageButton1" ImageUrl='<%# Eval("icopath") %>' PostBackUrl='<%#"~/show.aspx?id=" + Eval("name") + "&cp=" + Eval("imgid") + ""%>' runat="server" />
                                  
    </ItemTemplate>
    </asp:DataList> <br/></div>
    </ContentTemplate>
    </cc1:TabPanel>
    <cc1:TabPanel runat="server" HeaderText="TabPanel2" ID="TabPanel2"><HeaderTemplate>
    网站使用帮助
    </HeaderTemplate>
    <ContentTemplate>
    <div style="MARGIN: 0px 10px"><br/>您只需注册成为“查理的天使”网站会员,即可参与网站饰品转让活动。<br/><br/>选购会员卡并预存相应消费金额,您即可参加网站饰品有偿使用活动,并以8折优惠价格参与饰品转让。<br/><br/>累积消费积分,您更有机会受邀参加“查理的天使”为您量身打造的各类时尚派对。 <br/><br/><asp:LinkButton id="LinkButton2" runat="server" ForeColor="Silver" PostBackUrl="~/register.aspx" ValidationGroup="987">了解详情</asp:LinkButton> <br/><br/></DIV>
    </ContentTemplate>
    </cc1:TabPanel>
    <cc1:TabPanel runat="server" HeaderText="TabPanel3" ID="TabPanel3"><HeaderTemplate>
    告诉朋友们
    </HeaderTemplate>
    <ContentTemplate>
    <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0><TBODY><TR><TD style="HEIGHT: 14px" colSpan=4><BR />&nbsp; &nbsp; &nbsp; &nbsp;分享秘密: </TD></TR><TR><TD colSpan=4 rowSpan=2>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; 非常感谢您愿意向您的朋友推荐本款饰品! <BR />&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; 通过填写下表,您的朋友将收到来自“查理的天使”网站的信息 <BR />&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; 使她(他)能更好的了解我们的网站与服务,谢谢! <BR /><BR /></TD></TR><TR></TR><TR><TD style="TEXT-ALIGN: left" colSpan=4>&nbsp; &nbsp; &nbsp; &nbsp;请填写您的姓名:<BR /></TD><TD style="WIDTH: 190px; TEXT-ALIGN: left" colSpan=3 rowSpan=1></TD></TR><TR><TD style="TEXT-ALIGN: left" colSpan=4>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<asp:TextBox id="TextBox10" runat="server" ValidationGroup="t2"></asp:TextBox> <asp:RequiredFieldValidator id="RequiredFieldValidator1" runat="server" ValidationGroup="t2" ErrorMessage="请输入您的姓名" ControlToValidate="TextBox10"></asp:RequiredFieldValidator> </TD></TR><TR><TD style="TEXT-ALIGN: left" colSpan=4>&nbsp; &nbsp; &nbsp; &nbsp;请填写您的Email:<BR /></TD></TR><TR><TD style="TEXT-ALIGN: left" colSpan=4>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<asp:TextBox id="TextBox20" runat="server" ValidationGroup="t2"></asp:TextBox> <asp:RequiredFieldValidator id="RequiredFieldValidator2" runat="server" ValidationGroup="t2" ErrorMessage="请输入您的邮箱" ControlToValidate="TextBox20"></asp:RequiredFieldValidator> </TD></TR><TR><TD style="HEIGHT: 14px; TEXT-ALIGN: left" colSpan=4 rowSpan=1>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<asp:RegularExpressionValidator id="RegularExpressionValidator5" runat="server" ValidationGroup="t2" ErrorMessage="请填写正确的邮箱地址" ControlToValidate="TextBox20" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator> </TD></TR><TR><TD colSpan=4 rowSpan=1>&nbsp; &nbsp; &nbsp; &nbsp;请填写您朋友的Email地址:<BR /></TD></TR><TR><TD style="HEIGHT: 87px" colSpan=2 rowSpan=1>&nbsp; &nbsp; &nbsp;1、 <asp:TextBox id="TextBox30" runat="server" ValidationGroup="t2"></asp:TextBox> <asp:RequiredFieldValidator id="RequiredFieldValidator3" runat="server" ValidationGroup="t2" ErrorMessage="必填" ControlToValidate="TextBox30"></asp:RequiredFieldValidator> <BR />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<asp:RegularExpressionValidator id="RegularExpressionValidator1" runat="server" ValidationGroup="t2" ErrorMessage="请填写正确的邮箱地址" ControlToValidate="TextBox30" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator> &nbsp; </TD><TD style="HEIGHT: 87px" colSpan=2 rowSpan=1>&nbsp; &nbsp; &nbsp; &nbsp;2、 <asp:TextBox id="TextBox40" runat="server" ValidationGroup="t2"></asp:TextBox> <BR />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<asp:RegularExpressionValidator id="RegularExpressionValidator2" runat="server" ValidationGroup="t2" ErrorMessage="请填写正确的邮箱地址" ControlToValidate="TextBox40" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator> &nbsp; </TD></TR><TR><TD style="HEIGHT: 86px" colSpan=2>&nbsp; &nbsp; &nbsp;3、 <asp:TextBox id="TextBox50" runat="server" ValidationGroup="t2"></asp:TextBox> <BR />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<asp:RegularExpressionValidator id="RegularExpressionValidator3" runat="server" ValidationGroup="t2" ErrorMessage="请填写正确的邮箱地址" ControlToValidate="TextBox50" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator> &nbsp; </TD><TD style="HEIGHT: 86px" colSpan=2>&nbsp; &nbsp; &nbsp; &nbsp;4、 <asp:TextBox id="TextBox60" runat="server" ValidationGroup="t2"></asp:TextBox> <BR />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<asp:RegularExpressionValidator id="RegularExpressionValidator4" runat="server" ValidationGroup="t2" ErrorMessage="请填写正确的邮箱地址" ControlToValidate="TextBox60" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator> &nbsp; </TD></TR><TR><TD colSpan=4>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <asp:Button id="Button10" onclick="Button10_Click" runat="server" Text="告诉朋友去" ValidationGroup="t2"></asp:Button> </TD></TR></TBODY></TABLE>
    </ContentTemplate>
    </cc1:TabPanel>
    <cc1:TabPanel runat="server" HeaderText="TabPanel4" ID="TabPanel4"><HeaderTemplate>
    联系我们
    </HeaderTemplate>
    <ContentTemplate>
    <DIV style="MARGIN: 0px 10px"><TABLE cellSpacing=0 cellPadding=0 width="98%" border=0><TBODY><TR><TD style="HEIGHT: 30px" colSpan=4></TD></TR><TR><TD style="WIDTH: 45%" align=left>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"查理的天使"始终注重您的需求和我们的服务品质!</TD><TD></TD><TD align=left colSpan=2>3、给我们留言:</TD></TR><TR><TD>在您参与“查理的天使”举行的任何活动期间,我们都<BR />希望您得到最好的服务。您有任何疑问和意见,请随时<BR />与我们联系,并将您的问题与建议告诉我们,我们的客<BR />服人员会在第一时间处理这些情况。&nbsp; </TD><TD></TD><TD>请选择部门:</TD><TD>&nbsp;<asp:DropDownList id="DropDownList1" runat="server" ValidationGroup="l1" Width="160px"><asp:ListItem>客服部</asp:ListItem>
    </asp:DropDownList> </TD></TR><TR><TD></TD><TD></TD><TD>请填写您的姓名:</TD><TD>&nbsp;<asp:TextBox id="TextBox1" runat="server" ValidationGroup="l1"></asp:TextBox> <BR /><asp:RequiredFieldValidator id="RequiredFieldValidator4" runat="server" ValidationGroup="l1" ErrorMessage="RequiredFieldValidator" ControlToValidate="TextBox1">必填</asp:RequiredFieldValidator> </TD></TR><TR><TD>您可以选择以下方式,随时与我们取得联系:</TD><TD></TD><TD>请填写您的邮箱:</TD><TD>&nbsp;<asp:TextBox id="TextBox2" runat="server" ValidationGroup="l1"></asp:TextBox> <BR />&nbsp;<asp:RequiredFieldValidator id="RequiredFieldValidator5" runat="server" ValidationGroup="l1" ErrorMessage="RequiredFieldValidator" ControlToValidate="TextBox2">必填</asp:RequiredFieldValidator> </TD></TR><TR><TD>1.客服电话:021-64372091</TD><TD></TD><TD colSpan=2>请将您的问题或建议填入下面的文本框中: &nbsp;<BR /></TD></TR><TR><TD style="HEIGHT: 43px">&nbsp;&nbsp;周一~周五:9:00~17:00<BR /></TD><TD style="HEIGHT: 43px"></TD><TD colSpan=2 rowSpan=8><BR />&nbsp; <asp:TextBox id="TextBox3" runat="server" TextMode="MultiLine" ValidationGroup="l1" Height="126px" Width="80%" Rows="6"></asp:TextBox> <asp:RequiredFieldValidator id="RequiredFieldValidator6" runat="server" ValidationGroup="l1" ErrorMessage="RequiredFieldValidator" ControlToValidate="TextBox3">必填</asp:RequiredFieldValidator> <BR />&nbsp;<asp:Button id="Button1" onclick="Button1_Click1" runat="server" Text="留言" ValidationGroup="l1"></asp:Button> </TD></TR><TR><TD>&nbsp; 周六~周日:9:00~15:00</TD><TD></TD></TR><TR><TD>&nbsp;</TD><TD></TD></TR><TR><TD style="HEIGHT: 30px">2.Email:clientservice@charlies-angels.cn </TD><TD></TD></TR><TR><TD></TD><TD></TD></TR><TR><TD style="HEIGHT: 46px"></TD><TD style="HEIGHT: 46px"></TD></TR><TR><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD><TD></TD></TR><TR><TD></TD><TD></TD></TR><TR><TD></TD><TD></TD><TD>&nbsp;</TD><TD></TD></TR><TR><TD></TD><TD></TD><TD></TD><TD></TD></TR></TBODY></TABLE></DIV>
    </ContentTemplate>
    </cc1:TabPanel>
    </cc1:TabContainer> 
    </ContentTemplate>
                        </asp:UpdatePanel>
                      </td>
                  </tr>
                  <tr>
                      <td colspan="3" align="center" style="text-align: right">
                      <br/>
                          <asp:Label ID="Label2" runat="server" Text="敬告各位会员:我们展示和推荐的饰品均为原单尾货,饰品本身不具备任何原品牌的意义和内涵,请各位会员在浏览时注意!" ForeColor="Red"></asp:Label> 
    
                      </td>
                  </tr>              
              </table>
    	  </div>  
    	</div>
      </div>
    
      
    
    <asp:Panel ID="Panel1" runat="server" Style="display:none;background-color:#404040; text-align:center; vertical-align:middle; width:300px; height:70px;" >
    <asp:Button ID="Buttonhid" runat="server" Text=""   Style="display:none;" CausesValidation="False" />
    <cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server"
    TargetControlID="Buttonhid"
    PopupControlID="Panel1"
    BackgroundCssClass="modalBackground"
    CancelControlID="Ib_ok2"
    DropShadow="true">
    </cc1:ModalPopupExtender>
    <div style="width:100%; height:22px; text-align:left; background-color:Black;">
    <br/>
    &nbsp;&nbsp;饰品成功加入购物车
    </div> 
    <br/>
    <div style="width:98%;text-align:center;">
    您的购物车中有<asp:Label ID="how" runat="server" Text="0"></asp:Label>件首饰
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    共<asp:Label ID="howmoney" runat="server" Text="0"></asp:Label>元
    </div><br/>
        <div style=" text-align:center;">
        <asp:ImageButton ID="Ib_ok1" runat="server" ImageUrl="~/images/showbag1.png" OnClick="Ib_ok1_Click" CausesValidation="False" />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:ImageButton ID="Ib_ok2" runat="server" ImageUrl="~/images/showbag2.png" CausesValidation="False" />
        </div>
    
    </asp:Panel> 
    
    
    
    
    
    
    
    <asp:Panel ID="Panel2" runat="server" Style="display:none;background-color:#404040; text-align:center; vertical-align:middle; width:300px; height:100px;" >
    
    
    <asp:Button ID="Button2" runat="server" Text=""   Style="display:none;" CausesValidation="False" />
    <cc1:ModalPopupExtender ID="ModalPopupExtender2" runat="server"
    TargetControlID="Button2"
    PopupControlID="Panel2"
    BackgroundCssClass="modalBackground"
    DropShadow="true">
    </cc1:ModalPopupExtender> 
    <div style="width:98%;text-align:right;">
        <asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click" CausesValidation="False">取消</asp:LinkButton>
    </div>
    <div style="width:98%;text-align:center;">
    您需要先登录网站才能使用这项服务
    </div><br/>
    <div style="width:98%;text-align:left;">
    <table border="0" cellpadding="0" cellspacing="0" style="width:100%;text-align:center;">
    <tr>
        <td style="width:80px; text-align:right;">
            用户名:
        </td>
        <td style="width:100px; text-align:left;">
            <asp:TextBox ID="Tusername" runat="server" CssClass="input5"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td style="width:80px; text-align:right;">
            密码:
        </td>
        <td style="width:100px; text-align:left;">
            <asp:TextBox ID="Tuserpwd" runat="server" CssClass="input5" TextMode="Password"></asp:TextBox>
        </td>
    </tr>
    </table>
    </div><br/>
        <div style=" text-align:center;">
        <asp:ImageButton ID="Ib_ok3" runat="server" ImageUrl="~/images/login.png" OnClick="Ib_ok3_Click" CausesValidation="False" />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:ImageButton ID="Ib_ok4" runat="server" ImageUrl="~/images/zhuce.png" OnClick="Ib_ok4_Click" CausesValidation="False" />
        </div>
    
    </asp:Panel>
    
    
    
    
    
    
    
    <asp:Panel ID="Panel3" runat="server" Style="display:none;background-color:#404040; text-align:center; vertical-align:middle; width:250px; height:70px;" >
    <asp:Button ID="Button3" runat="server" Text="" Style="display:none;" CausesValidation="False" />
    <cc1:ModalPopupExtender ID="ModalPopupExtender3" runat="server"
    TargetControlID="Button3"
    PopupControlID="Panel3"
    BackgroundCssClass="modalBackground"
    CancelControlID="Ib_agree"
    DropShadow="true">
    </cc1:ModalPopupExtender>
    <br/>
    <div style="width:98%;text-align:center;">
        <asp:Label ID="Label300" runat="server" Text="您选中的物品的数量大于库存的数量!"></asp:Label>
        <br/>
        <asp:ImageButton ID="Ib_agree" runat="server" ImageUrl="~/images/agree.png" OnClick="Ib_agree_Click" CausesValidation="False" />
    </div><br/>
    
    </asp:Panel>
    
    
    
    <asp:Panel ID="Panel4" runat="server" Style="display:none;background-color:#404040; text-align:center; vertical-align:middle; width:250px; height:70px;" >
    <asp:Button ID="Button4" runat="server" Text="" Style="display:none;" CausesValidation="False" />
    <cc1:ModalPopupExtender ID="ModalPopupExtender4" runat="server"
    TargetControlID="Button4"
    PopupControlID="Panel4"
    BackgroundCssClass="modalBackground"
    CancelControlID="ImageButton4"
    DropShadow="true">
    </cc1:ModalPopupExtender>
    <br/>
    <div style="width:98%;text-align:center;">
        <asp:Label ID="Label4" runat="server" Text="抱歉!您还未申请会员卡,饰品有偿使用服务仅限本网站实体卡会员参与。立即申请会员卡!"></asp:Label>
        <br/>
        <asp:ImageButton ID="ImageButton5" runat="server" ImageUrl="~/images/isok.png" CausesValidation="False" PostBackUrl="~/my_card.aspx" />
        <asp:ImageButton ID="ImageButton4" runat="server" ImageUrl="~/images/showbag2.png" CausesValidation="False" OnClick="ImageButton4_Click" />
    </div><br/>
    
    </asp:Panel>
    
    
    
    </asp:Content>
    
    
    2010年1月8日 5:07
  •  AutoPostBack=false 可以解决
    2010年1月8日 7:48
  • 设置 Panel 的属性 style="display:none" 
    2010年1月13日 8:03
  • 多谢各位,问题已经解决了!并不是以上原因导致的。
    而是我在页面上使用了updatepanel嵌套,弹出窗口里面的控件事件导致了弹出窗口外面的updatepanel刷新,一旦外面的updatepanel刷新的时候就会调用pageLoad事件,一旦回发之后弹出窗口就会被关闭。所以我在页面pageLoad事件中做了判断,弹出窗口的时候设置一个标志位为shown,关闭的时候设置为hiden,窗口回发的时候会去判断,如果之前的标志位为shown,那么我就显示该窗口。除非是调用hiden()方法重设标志位为hiden,那么窗口才不会被弹出。所以才会出现窗口打开一下然后关闭再打开的问题。(但是在本地VS环境或者IIS离不会出现,只有发布到服务器上才会出现)

    具体为什么我还不得而知。。。

    2010年1月13日 8:17