Mar 10, 2010, 6:02 PM
Get Text MessageBox
Hi,
I have a MessageBox with multiline. I need, when User CLICK YES,
get the text of the MessageBox in the Code-Behind?
Is it possibile?
Coolite 0.8.2
I have a MessageBox with multiline. I need, when User CLICK YES,
get the text of the MessageBox in the Code-Behind?
Is it possibile?
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Threading"%>
<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected void Button3_Click(object sender, AjaxEventArgs e)
{
Ext.Msg.Show(new MessageBox.Config
{
Title = "Address",
Message = "Please enter your address:",
Width = 300,
Buttons = MessageBox.Button.OKCANCEL,
Fn = new JFunction { Fn = "showResultText" },
Multiline = true,
AnimEl = this.Button3.ClientID,
});
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>MessageBox - Coolite Toolkit Examples</title>
<ext:ScriptContainer runat="server" />
<script type="text/javascript">
var showResultText = function(btn, text) {
alert('Botão ' + btn + ' Texto ' + text);
};
</script>
</head>
<body>
<ext:ScriptManager ID="ScriptManager1" runat="server" />
<h1>MessageBox Dialogs</h1>
<h2>3. Multi-line Prompt</h2>
A multi-line prompt dialog.
<ext:Button ID="Button3" runat="server" Text="Show">
<AjaxEvents>
<Click OnEvent="Button3_Click" />
</AjaxEvents>
</ext:Button>
</body>
</html>
MaiaCoolite 0.8.2