if I want to open a RadWindow the window is zero. I should have read the one by the javascript "Page.ClientScript.RegisterStartupScript" embed but that does not work.
what must I do to the window to open with javascript? The call must remain in the method.
RadWindow:
C#-Code:
Greetings Dani
what must I do to the window to open with javascript? The call must remain in the method.
RadWindow:
<telerik:RadWindow ID="RadWindowInformation" EnableShadow="true" Behaviors="Close, Move" runat="server"> <ContentTemplate> <div class="window"> <div class="window_l"> <div ID="WindowIcon" runat="server"></div> </div> <div class="window_r"> <asp:Literal ID="UserMessage" runat="server"></asp:Literal> </div> <div class="clear window_button"> <asp:Button ID="Button" runat="server" Text="OK" /> </div> </div> </ContentTemplate> </telerik:RadWindow>C#-Code:
public void ShowInformation(WebExtensions.PageControlling.InformationObject information) { StringBuilder radWindowInfoScript = new StringBuilder();
radWindowInfoScript.Append("openWindow();"); radWindowInfoScript.Append("function openWindow()"); radWindowInfoScript.Append("{"); radWindowInfoScript.Append("var oWindow = $find(\"" + RadWindowInformation.ClientID + "\");"); radWindowInfoScript.Append("oWindow.setSize(400, 400);"); radWindowInfoScript.Append("oWindow.center();"); radWindowInfoScript.Append("oWindow.open();"); radWindowInfoScript.Append("}"); Page.ClientScript.RegisterStartupScript(this.GetType(), "openWindow", radWindowInfoScript.ToString(), true);Greetings Dani