Try this, its working for me
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm5.aspx.cs" Inherits="WebApplication1.WebForm5" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/jquery-ui.js" type="text/javascript"></script>
<link href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/themes/start/jquery-ui.css"
rel="stylesheet" type="text/css" />
<script type="text/javascript">
$("[id*=Button2]").live("click", function () {
$("#dialog").dialog({
title: "jQuery Dialog Popup",
buttons: {
Ok: function () {
$("[id*=Button3]").click();
},
Close: function () {
$(this).dialog('close');
}
}
});
return false;
});
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:Button ID="Button2" runat="server" Text="Button" OnClick="Button_Click" />
<asp:Button ID="Button3" runat="server" Text="Button" Style="display: none" OnClick="Button3_Click" />
<div id="dialog" style="display: none;">
<asp:Label ID="Label1" runat="server" Text="Enter ur name"></asp:Label>
<asp:TextBox ID="TextBox1" runat="server" Text="karur"></asp:TextBox>
</div>
</form>
</body>
</html>