Hi,
In this code server side. code is working good.
how to change in this code to client side code.
How to check below C# code to check in Jquery validation condition?
c#: code
if (dstcourse.Tables[0].Rows.Count == 0)
{
ScriptManager.RegisterStartupScript(this, this.GetType(), "scr", "$('#dialog').dialog({model:true, zIndex:20000});", true);
}
else if (dstModuleLevelInfo.Tables[0].Rows[0][0].ToString() == "-1" )
{
ScriptManager.RegisterStartupScript(this, this.GetType(), "scr", "$('#dialog2').dialog({model:true, zIndex:20000});", true);
}
jquery:
<script type="text/javascript" language="javascript" src="http://code.jquery.com/resource/jquery.js"></script>
<script type="text/javascript" language="javascript" src="http://code.jquery.com/resource/model-popup.js"></script>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script language="javascript">
$(document).ready(function () {
$(function () {
$("#dialog").dialog({
autoOpen: false,
modal: true,
show: {
effect: "blind",
duration: 1000
},
hide: {
effect: "explode",
duration: 1000
},
buttons: { "Ok": function() { $(this).dialog("close"); } }
});
$("#dialog2").dialog({
autoOpen: false,
modal: true,
show: {
effect: "blind",
duration: 1000
},
hide: {
effect: "explode",
duration: 1000
},
buttons: { "Ok": function() { $(this).dialog("close"); } }
});
});
});
</script>
-------------------------------------------------------------------------
asp.net:
--------
<div id="dialog" title="Message">
<p>
<span style="float: left; margin: 0 7px 50px 0;"></span> Module value approve to Admin
</p>
</div>
<div id="dialog2" title="Message">
<p>
<span style="float: left; margin: 0 7px 50px 0;"></span> Module Level value approve to Admin
</p>
</div>