In this blog I will show how to get querystring params values with jQuery. You must be familiar with getting params values in ASP.NET server side code but how to get it via jQuery? For this I have used REGEX to fetch the querystring param value based on param key. I have extended the jQuery function and made a getParamValue function for this purpose. Below is the code for plugin. $.exten...
I have seen this question many times on how to set focus on first textbox of the page. I decided to write a blog on this. Below I have given the complete sample code where the cursor will be placed on first textbox when the page loads. <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <title></title> <script type="text/javascript" src...
In this blog I will show how to clear dropdown list with jQuery . Today I saw a person was asking on forums on how to remove all the items of dropdown list with jQuery. I decided to write a blog on this. Below is the sample code for it: <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <title></title> <script type="text/javascript" sr...
In this blog how to disable right click with jQuery. I saw today, a person was asking on forums on how to stop right click on web page, I decided to write a quick blog on it. Whenever right click is occurred the contextmenu event fires and we can prevent the default action of that event in order to disable the right click. Below is the complete sample code: <html xmlns="http://www.w3....
In this blog I will show how to show word count of the textbox with jQuery. A person asked me on the forums on how to show the word count , I decided to write a quick blog on this. The logic for getting the count is simple. We will split the text of textbox on the basis of empty spaces in it and on the basis of that we will get the count. Below is the sample code for it: <html xmlns="...
In this blog I will show how to set default tab for jQuery UI tabs. You must be aware of that by default the first tab is opened for jQuery UI tabs. If we want that instead of first tab some other tab should open, we have to set the selected property of tabs plugin with the index of that tab which we want to open by default. Below is the complete sample code for it: <html xmlns="http:...
Today I was in a need to escape single quotes in a string in JavaScript. When we write strings in JavaScript, we have two options either we can write them in single quotes or in double quotes. We should not mix them by starting with one of them and ending with the other option. We can write strings in this way var foo = 'this is test'; var foo = "this is test"; Now the issue comes when w...
If you have Skype of version 4.2 or greater, you will be facing the issue of how to hide or remove the Skype icon from the task bar when you have closed the main window. In previous versions of Skype, for example Skype 4.1, 4.0 and 3.0, when the main window was closed, Skype was minimized to system tray (notification area which is adjacent to clock on Windows Taskbar). But in newer versi...
In this blog I will show you how to open or display jQuery datepicker on image's click instead of focus on the textbox. To accomplish it I have used the showOn property of the jQuery datepicker and set it to 'button' to make that happen. The src of the image is set via buttonImage property. Below is the sample code: <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" ru...
In this blog I will show how to install ASP.NET membership database on SQL Server. We are going to use the ASP.NET SQL Server Registration tool (Aspnet_regsql.exe) to create ASP.NET membership database. The Aspnet_regsql.exe file is located in the [drive:]\%windir%\Microsoft.NET\Framework\version folder on your Web server. For my case it was at following path C:\WINDOWS\Microsoft.NET\Fra...
In this blog I will show how to convert the JSON date (returned from .NET server side) to JavaScript date. This is one of the most common requirement while dealing with dates returned from ASP.Net AJAX. The dates returned from server side are in this format /Date(milliseconds)/ . Below is the screenshot showing how dates are returned via ASP.NET ajax from server side: Our goal is to conv...
It's fast, easy and free! Submit articles, get your own blog, ask questions & give answers in the forums, and become a better developer, faster.
enter your email address:
What kind of email newsletter would you prefer to receive from CodeAsp.Net?18