This is a migrated thread and some comments may be shown as answers.

Modal window/Popup Return Data

1 Answer 70 Views
Window
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 1
Patrick asked on 06 Mar 2018, 07:11 PM

Hello,

I used the example code to create a simple popup on the server side.  This creates a popup that displays a question and a textbox.  What I want to do is something similar.  I want to create a popup that has a comment box.  I want to return the data from the comment box back to my backend code.  How do I do that?  Here is my code.  thank you!

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="tpop.aspx.vb" Inherits="Student_tpop" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<script type="text/javascript">
(function (global, undefined) {
var demo = {};


function promptCallBackFn(arg) {
radalert("After 7.5 million years, <strong>Deep Thought</strong> answers:<h3 style='color: #ff0000;'>" + arg + "</h3>", 350, 250, "Deep Thought");
}



global.promptCallBackFn = promptCallBackFn;


global.$dialogsDemo = demo;
})(window);

</script>

<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
<style type="text/css">
.demo-container {
width: 220px;
}

html.RadForm_Black,
html.RadForm_BlackMetroTouch {
background-color: #fff;
}
</style>
<title>Telerik ASP.NET Example</title>
<link href="styles.css" rel="stylesheet" />
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
<div class="demo-containers">
<telerik:RadWindowManager RenderMode="Lightweight" ID="RadWindowManager1" runat="server" EnableShadow="true">
</telerik:RadWindowManager>
<div class="demo-container">
<h2>Dialogs called from server: </h2>
<telerik:RadAjaxPanel ID="pnl1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
<asp:Button ID="btnPrompt" Width="230" runat="server" OnCommand="Btn_OnCommand" Text="radprompt from server"
CommandArgument="radprompt"></asp:Button>
</telerik:RadAjaxPanel>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
</telerik:RadAjaxLoadingPanel>
</div>
</div>
</form>
</body>
</html>

Imports System
Imports System.Web.UI.WebControls
Partial Class Student_tpop
Inherits System.Web.UI.Page
Protected Sub Btn_OnCommand(sender As [Object], e As CommandEventArgs)
Select Case e.CommandArgument.ToString()
Case "radprompt"
RadWindowManager1.RadPrompt("Server RadPrompt: What is the answer of Life, Universe and Everything?", "promptCallBackFn", 950, 500, Nothing, "Server RadPrompt", "42")
Exit Select
End Select
End Sub
End Class

 

 

1 Answer, 1 is accepted

Sort by
0
Patrick
Top achievements
Rank 1
answered on 09 Mar 2018, 11:49 AM

Bump

 

Can Anyone/Someone help?

Tags
Window
Asked by
Patrick
Top achievements
Rank 1
Answers by
Patrick
Top achievements
Rank 1
Share this question
or