2013-04-06 68 views
0

我有一个AJAX模式popupextender,我想使用Java脚本的一些处理后面的代码年底显现。我收到消息 错误:无法获取未定义或空引用的属性'show'。ModalPopupExtender显示方法不从后台代码工作的JavaScript

<asp:Panel ID="panel1" runat="server" Visible="true" BorderColor="Black" Style="display: none"> 
<asp:UpdatePanel ID="uppanel1" runat="server"> 
    <ContentTemplate> 
    <asp:Button ID="btn1" Text="Popup" Visible="true" runat="server" Style="display:none"/>  
    <ajaxToolKit:ModalPopupExtender ID="mpe1" runat="server" TargetControlID="btn1"  PopupControlID="panel1" RepositionMode="None" PopupDragHandleControlID="drag1" BehaviorID="behave1"/>    
    <div id="div1" runat="server">      
     <asp:TextBox ID="txt1" runat="server" Text="Text" ></asp:TextBox> 
    </div>  
    </ContentTemplate> 
</asp:UpdatePanel> 
</asp:Panel> 
function ShowPopUp(mpid) { 
    var id1 = $find(mpid); 
    id1.show(); 
} 

回答

0

试试这个

$找到( “<%= mpe1.ClientID%>”)显示()。

+0

欢迎SO!你能否为你的答案提供一些解释? – 2013-04-29 15:22:40