I have the following code which opens up a form in a jquery dialog.
I have some .net code on the Button1 which adds a new record to the database, however whenever I click on the button it doesn't fire the event.
Also I need it to close the dialog form as well.
Any ideas.
Thanks
Andrew
Code:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="dialog.aspx.vb" Inherits="dialog" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml">[/URL]
<head runat="server">
<title></title>
<link href="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/themes/ui-darkness/jquery-ui.css" rel="stylesheet">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>
</head>
<body>
<form runat="server">
<div id="dialog" title="Dialog">
<table>
<tr>
<td>Name:</td>
<td></td>
</tr>
<tr>
<td>Email Address:</td>
<td></td>
</tr>
</table>
<asp:Button ID="Button1" runat="server" Text="Button" />
</div>
<input type="button" id="button" value="Click to open the dialog">
<script>
$(function () {
$("#dialog").dialog({
autoOpen: false
});
$("#button").on("click", function () {
$("#dialog").dialog("open");
});
});
</script>
</form>
</body>
</html>
I have some .net code on the Button1 which adds a new record to the database, however whenever I click on the button it doesn't fire the event.
Also I need it to close the dialog form as well.
Any ideas.
Thanks
Andrew