I have an application that has multi-line text box. When I press the Insert button, it opens a RadWindow with the Rad Editor. I want save the database and send the text back to the page with the text box.
Main Page <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Testing</title> <link href="StyleSheet1.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> function OnClientClose(radWindow1, args) { var arg = args.get_argument(); var text = document.getElementById('txtConclusion'); text.value = arg.result; } function openWin() { var oWnd = radopen("insertcomments.aspx", "RadWindow2"); } </script> </head> <body> <form id="form1" runat="server"> <div> <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> </telerik:RadScriptManager> <telerik:RadWindowManager ID="RadWindowManager1" runat="server"> <Windows> <telerik:RadWindow ID="RadWindow1" runat="server" NavigateUrl="Webform3.aspx" ReloadOnShow="True" Top="60px" onclientclose="OnClientClose"> </telerik:RadWindow> <telerik:RadWindow ID="RadWindow2" runat="server" NavigateUrl="insertcomments.aspx" ReloadOnShow="True" Top="60px" onclientclose="OnClientClose" Width="660" Height="500px"> </telerik:RadWindow> </Windows> </telerik:RadWindowManager> <table > <tr valign="top"> <td> <table > <thead> <tr> <th scope="col">Conclusion</th> </tr> </thead> <tr> <td> <asp:TextBox ID="txtConclusion" runat="server" Height="249px" style="margin-bottom: 72px" TextMode="MultiLine" Width="138px" ReadOnly="True"></asp:TextBox> <br /> <button onclick="openWin(); return false;">Insert</button> </td> </tr> </table></td> <td> <table class="section"> <thead> <tr> <th scope="col">Current News</th> </tr> </thead> <tr> <td><asp:TextBox ID="txtCurrentNews" runat="server" Height="160px" style="margin-bottom: 72px" TextMode="MultiLine" Width="138px"></asp:TextBox> </td> </tr> </table></td> </tr> <tr> <td> </td> <td> </td> </tr> </table> </div> </form> </body> </html> Popup Page Pop Page <!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 runat="server"> <title>Investment Web Site</title> <link href="StyleSheet1.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> function GetRadWindow() { var oWindow = null; if (window.radWindow) oWindow = window.radWindow; else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; return oWindow; } function CloseWindow() { var currentWindow = GetRadWindow(); var oarg = new Object(); oarg.result = document.getElementById("RadEditor1").content; //var result = document.getElementById("RadioButtonList1_0").checked; //currentWindow.argument = arg; currentWindow.Close(oarg); } </script> </head> <body> <form id="form1" runat="server"> <div> <telerik:RadScriptManager ID="RadScriptManager1" Runat="server"> </telerik:RadScriptManager> <br /> <table style="width: 680px" cellspacing="3" cellpadding="5"> <tr> <td style="width: 100%"><asp:Image ID="imgTitle" runat="server" /> <p><asp:Label ID="lblMessage" runat="server" Visible = "false" CssClass ="red" ></asp:Label></p></td> </tr> <tr> <td > <telerik:RadEditor ID="RadEditor1" Runat="server" ToolsFile="~/BasicTools.xml" Width="600px"> <Content> </Content> </telerik:RadEditor> </td> </tr> <tr> <td style="width: 100%; margin-top: 6px;" align="center"></td> </tr> </table> <div style="margin-left: 450px"> <asp:ImageButton ID="imgAddComment" runat="server" ImageUrl="~/images/btnAddComment.gif" /> </div> </div> </form> </body> </html> Code Behind Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load End Sub Protected Sub imgAddComment_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles imgAddComment.Click Dim ReturnMsg As String = "" Try If RadEditor1.Content <> "" Then If LCase(RadEditor1.Content).EndsWith("<br />") Then RadEditor1.Content = RadEditor1.Content.Substring(0, Len(RadEditor1.Content) - 6) End If 'ReturnMsg = InvestSupProviders.InsertConclusionComment(Session("CompanyID"), "", Session("UserSession").ID_User, Now, RadEditor1.Content) ReturnMsg = InvestSupProviders.InsertConclusionComment(21, "", 5, Now, RadEditor1.Content) If ReturnMsg = "" Then lblMessage.Text = "Message added" lblMessage.Visible = True 'RadEditor1.Content = " " Else lblMessage.Text = ReturnMsg lblMessage.Visible = True End If Else lblMessage.Text = "There is no Content" lblMessage.Visible = True End If Catch ex As Exception 'Page_Error(ex, "Page_Load") End Try End Sub End Class