|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="JQueryDialogPage.aspx.cs" Inherits="TestApp.JQueryDialogPage" %>
<%@ Register Assembly="Mullivan.Web" Namespace="Mullivan.Web.UI.WebControls" TagPrefix="cc1" %>
<!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>JQuery Dialog</title>
<link href="/CSS/jquery171.css" type="text/css" rel="stylesheet" />
</head>
<body>
<form id="form1" runat="server">
<div>
<input ID="Button1" type="button" onclick="PopDialog();" title="Show Dialog"
value="Show Dialog" ></input>
<cc1:JQueryDialog ID="JQueryDialog1" runat="server" AutoOpen="false"
DialogButtons="YesNoCancel" OnClientValidateDialog="ValidateMyControls" OnClientDialogClosedCallback="__MyCallback" UseBgiFrame="False">
This is my test dialog control. How do you like it?<br />
<br />
Date with validation<br />
<cc1:JQueryDatePicker ID="JQueryDatePicker1" runat="server" width="80px"></cc1:JQueryDatePicker>
<br />
<br />
<asp:Button ID="Button2" runat="server" onclick="Button2_Click1"
Text="Do Postback" />
<br />
<br />
</cc1:JQueryDialog>
</div> <script language="javascript" type="text/javascript">
function __MyCallback(control, result)
{
alert('You selected ' + DialogResult.ConvertToString(result));
}
function ValidateMyControls(event, control, result)
{
if(result == DialogResult.Yes && jqJQueryDatePicker1[0].value == '')
{
alert('You must select a date.');
return false;
}
return true;
}
function PopDialog() {
<%= JQueryDialog1.ClientJQueryControlId %>.dialog('open', <%= JQueryDialog1.OnClientDialogClosedCallback %>);
}
</script>
</form>
</body>
</html>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.