Category Archives: JavaScript

How to manipulate back button in ASP.NET 4?

After searching a lot of references. I have came to a conclusion that you can only prevent user from accessing the previous page is thru javascript window history. You can not manipulate the forward button but only the back button. … Continue reading

Posted in ASP.NET 4, ASP.NET 4 And Javascript, JavaScript | Leave a comment

How to insert or add URL links inside the gridview?

How to insert or add URL links inside the gridview? There are many ways to insert or add links inside a grid. There are many ways to display all the pages in your site in a gridview. This is one … Continue reading

Posted in ASP.NET 3.5 And C# 3.5, ASP.NET 3.5 And JavaScript, ASP.NEt And C# 3.5 And Javascript, C# 3.5 AND ASP.NET 3.5, JavaScript | Leave a comment

How to close all windows upon signout?

This solution might not be the exact solution to close all open windows, but it does close all windows upon clicking sign out. First, you need to create a sign out button on your master page. Then put this code … Continue reading

Posted in ASP.NET 3.5, ASP.NET 3.5 And C# 3.5, ASP.NET 3.5 And JavaScript, C# 3.5, JavaScript | Leave a comment

How to do multiple popup window using ASP.NET 3.5 and AJAX Control and Javascript?

There are three ways to popup a new window. The first way to do popup window, this.lnkNewWindow.Attributes.Add(“onclick”, “window.open(‘NewWindow.aspx’, ‘NewWindow’, ‘toolbar=no, menubar=no, directories=no, resizable=yes, scrollbar=yes’);return false;”); this the second way to do popup window, <asp:LinkButton ID=”lnkNewWindow” runat=”server” Text=”New Window” onclick=”javascript:openNewWindow();” /> Put … Continue reading

Posted in ASP.NET 3.5 And JavaScript, C# 3.5, C# 3.5 AND ASP.NET 3.5, JavaScript | Leave a comment

How to disable back button of browser and not delete the history?

To disable back button of browser … delete history Put this javascript at the <head> tag     <script type=”text/javascript”>         function setFocus()         {             document.getElementById(“contentPage”).focus();             var URL;             var i;             var QryStrValue;             URL = window.location.href;             … Continue reading

Posted in ASP.NET 3.5 And JavaScript, HTML And JavaScript, JavaScript | Leave a comment

Set focus on your content page upon loading

If you wnat to set focus on the content page, put your javascript on <head> tag, then call the function using onload event on the body. Then create an id on the part that you wish to set focus. <head … Continue reading

Posted in ASP.NET 3.5 And JavaScript, ASP.NEt And C# 3.5 And Javascript, JavaScript | Leave a comment

How to display messagebox in asp.net 3.5?

There are many ways to show or display message. I have two ways: First way is this, ScriptManager.RegisterStartupScript(this, this.GetType(), “onclick”, “alert(‘” + message + “‘);”, true);  Second way is this, String scriptString = “<script language=JavaScript>”; scriptString += “alert(‘” + message … Continue reading

Posted in ASP.NET 3.5, ASP.NEt And C# 3.5 And Javascript, C# 3.5, JavaScript | Leave a comment