hi micah try this code
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default4.aspx.cs" Inherits="Default4" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<link type="text/css" rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<script type="text/javascript">
function Getlogmodel() {
$("#popupdiv").dialog({
title: "write here text from Getlogmodel java script code",
width: 430,
height: 250,
modal: true,
buttons: {
Close: function () {
$(this).dialog('close');
}
}
});
return false;
};
function Getlogmodel2() {
$("#popupdiv2").dialog({
title: "write here text from Getlogmodel2 java script code",
width: 430,
height: 250,
modal: true,
buttons: {
Close: function () {
$(this).dialog('close');
}
}
});
return false;
};
</script>
<body>
<form id="form1" runat="server">
<div>
<div id="popupdiv" title="" style="display: none">
<b> Data are correct</b>
</div>
<div id="popupdiv2" title="" style="display: none">
<b> Data are incorrect</b>
</div>
<table align="center" style="margin-top:200px">
<tr>
<td>
<asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click"
style="height: 26px" />
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
c # code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class Default4 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
string a = "33a";
if(a=="a")
{
ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "Getlogmodel();", true);
}
else if (a !="a")
{
ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "Getlogmodel2();", true);
}
}
}
may be helpfull for you