jQuery Fundamentals
http://jqfundamentals.com/legacy<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js">
</script>
<script type="text/javascript">
alert ("js on.");
$(document).ready(function(e) {
alert ('jQuery on.');
e.preventDefault();
</script>
Session Time Out Warning Message Using jQuery in ASP.NET
http://www.codeproject.com/Articles/711196/Session-Time-Out-Warning-Message-Using-jQuery-in-A
*********************Java Script Alert from C#****************************************
ScriptManager.RegisterClientScriptBlock(Page, this.GetType(), "FileDownload", "alert('This file does not exist.') ", true);
***************************Java Script from C# ***********************************
/// <summary>
/// Show Message and redirect to Home page
/// </summary>
public void ShowOperatoinFailedMsg(String title)
{
string scriptMsg = String.Format(@"$(document).ready(function(){{
ShowMessageBox('The operation has been failed. You are redirecting to home page', '{0}',GoToHomePage,null,450,125);
function GoToHomePage(){{
window.location = '{1}';
}}
}});", title, this.ResolveUrl("~/users/DataCollection.aspx?MenuHome=0"));
ScriptManager.RegisterClientScriptBlock(this, typeof(Page), "ShowMsg", scriptMsg, true);
}
****************************Java Script from C#*******************************
public void ShowMessageOnLoad(String message, String title)
{
string scriptMsg = String.Format(@"$(document).ready(function(){{ShowMessageBox('{0}', '{1}',null,null,200,125);}});",message, title);
ScriptManager.RegisterClientScriptBlock(this, typeof(Page), "ShowMessageOnLoad", scriptMsg, true);
}
No comments:
Post a Comment