你如何在Telerik中做一个简单的弹出窗口?
aspx中的代码-behig C#代码是什么:
===========
<telerik:RadWindow ID="modalPopup" runat="server" Width="360px" Height="360px">
<ContentTemplate>
<div style="padding: 10px; text-align: center;">
<telerik:RadButton ID="rbToggleModality" Text="Toggle modality" OnClientClicked="togglePopupModality"
AutoPostBack="false" runat="server" Height="65px" />
</div>
<p style="text-align: center;">
The format of the dates are incorrect. Please use two digit month and
a four digit year for proper formatting.
</p>
</ContentTemplate>
</telerik:RadWindow>
答案 0 :(得分:1)
var composeScreenWindowName = "composeScreen";
var communicationTypeId = 'CT01';
var url = $page.url.create("You page url that you want to display");
var win = $window.createPopup(url, { size: "800,600", behaviors: Telerik.Web.UI.WindowBehaviors.Close | Telerik.Web.UI.WindowBehaviors.Maximize | Telerik.Web.UI.WindowBehaviors.Move | Telerik.Web.UI.WindowBehaviors.Resize, name: composeScreenWindowName });
使用jquery
尝试telerik弹出窗口答案 1 :(得分:0)
试试吧,
<asp:Button ID="Button3" Text="open the window" runat="server"
OnClientClick="openWinContentTemplate(); return false;" />
<script type="text/javascript">
function openWinContentTemplate() {
$find("modalPopup").show();
}
</script>