Showing posts with label Jquery. Show all posts
Showing posts with label Jquery. Show all posts

Thursday, May 12, 2011

Jquery to generate Random Number

In many forums i found a question "How to generate a Random Number using Jquery?". Its easy to generate a Random number because Jquery provides us builtin Math library function Math.random() to generate the number. To get the output you have to put a number range. Then the the mehod Math.random() will give you a Random Number. You can also use this technique for dice, random image script, or

Wednesday, May 11, 2011

Create generate on the fly JQuery dynamic content

In many cases developers need to add dynamic contents in a DIV. In my lattest project i have done a critical job. In this post i am sharing just a simple example on how to add dynamic contents in a DIV. By following this example you can generate on the fly dynamic contents, controls like Button, Link etc. The output look like below:




To do this fisrt add an asp.net aspx page. Then paste the

Monday, March 21, 2011

Check user name login name email address availability using jquery ajax in Asp.Net page

In most registration page we need to check the availability of user name or email address using Jquery/Ajax. Because it will be hectic job for user to rewrite the data after getting post back error that user name already taken or email address already taken. So it would be very helpful for user if he can check his name or login name or email address availability in time without losing any data.

Sunday, October 10, 2010

Jquery to read DatakeyNames value of Selected Rows of GridView in Asp.Net

As we know GridView is a very popular control. We always experiment to enhance the GridView control to provide better experience to user. Since javascript is also a popular clientside language, most of the times we use this in client side operations like validation, Row coloring, cell coloring etc. Now a days Jquery is more popular so that in this article i will explain how you can capture the

Wednesday, October 6, 2010

Jquery to Get selected items from CheckBoxList

In many forums i found that developers asking this question. I have answered in many forums and now i decide to write a post on how to get selected items or selected values of checkboxlist using Jquery. This is not an easy job. You need to loop through the checkbox list to get all selected items/values. Here if you look at my code example you will get the loop structer. Here i use comma separator

Tuesday, October 5, 2010

How to Set Get RadioButtonList Selected Value using Jquery

In one of my previous post i have written an article on "How to get set RadioButtonList value using javascript". Since Jquery now a popular scripting language thats why in this post i am going to explain how one can access or get or read or set RadioButtonList value using Jquery. Using javascript we can directly use RadioButonList click handler but in Jquery we can't. So what is the solution? Yes

How to Display / Show Hide toggle a Div using Jquery

The man who starts to learn Jquery, basically this post is for you. As a developer i knew that in most web applications we need to do the same job many times. Previously i have explained how one can display/show hide a div using Javascript. For Javascript version please click here. But recent days we were very familiar with Jquery & love to write Jquery method instead of Javascript. In this

Tuesday, September 21, 2010

Jquery to get SelectedValue SelectedIndex SelectedText of a DropdownList in Asp.net

When you bind a DropdownList by data sometimes it may require to do something in the client side using javascript or jquery. To read the same post using javascript click here. In this article i will show you how one can get DropdownList SelectedValue, SelectedText & SelectedIndex. So that you can now play with Asp.net DropdownList control. The output like below:


An example of complete code is

Tuesday, May 11, 2010

Set alternate table row color using JQuery

In many cases we need to represent data in tabular format so that user can easily read data in straightforward way. It will be more helpful for users if we can give or set different row color for alternate rows of the table to distinguish one row from another. To do that i have googled and found some examples. But each example will not consider the header row of the table. I need to color

How to get set read TextBox value using JQuery

As we knew that using javascript to read or get or set textbox value is easy but due to JQuery notation novice developers always make mistakes to read textbox value. Here in this article i will show you how one can get set read textbox value or textbox text using JQuery.








To run the example first add a page in your project. Then add three textboxes and one command button to do sum like

Monday, May 10, 2010

How to declare JQuery variable & What is JQuery $ sign symbol

In my first article i have discussed on how to start JQuery in your asp.net application. Here in this article i will explain how one can declare simple JQuery variable as well as object type Jquery variable also i will explain what does it mean by Jquery $ sign.
At first What is variable:
In programming, a variable is a value that can change, depending on conditions or on information passed to

Introduction on using JQuery in Asp.net application

In a single line jQuery is a fast, lightweight client side library that is CSS3 compliant and supports almost all browsers. The jQuery framework is extensible and very nicely handles DOM manipulations, CSS, AJAX, Events and Animations. By using JQuery you can dramatically reduce your client side code. Jquery code is completely separate from your HTML code. Around the world many JQuery gurus