.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

get the ddl selected value using jquery

Posted By:      Posted Date: September 19, 2010    Points: 0   Category :ASP.Net

salam to all,

i tried manytimes to get the selected value for a dropdownlist using jquery, but i failed!!

when i put the following code to get the text i get it successfully,

        var ResultValue = $('#<%= ResultDropDownList.ClientID %> :selected').text();

but when i try :

        var ResultValue = $('#<%= ResultDropDownList.ClientID %> :selected').value;

i am not !!!

what is the problem here?

View Complete Post

More Related Resource Links

jquery autocomplete selected value



Iam using jquery autocomplete to search data and i have button to get the detail value of employee and

display in label , what i need is that , i don't want to put button to get detail , instead i need to select the from\

auto search and press enter key  and show the detail in the lablel example(empname,address, emailid).

Looking forward valuable suggestions

how to get the text of selected checkbox from asp.net checkboxlist control using jquery


I have asp.net checkboxlist control that bounded to a data source so the number of items in the control are different from one to to another time.

I have this function:

     $('#<%=chkListGroups.ClientID %> input:checkbox:checked').siblings('label').text();

this function will return all texts for all selected items in the control as a one string.

 I'm looking for a way that when I check a check box from the ckeckboxlist control will return only last checked checkbox.

this code :

$('#<%=chkListGroups.ClientID %> input:checkbox:checked').last().siblings('label').text(); 

returns last checked item for example if I checked second will return
second item then when I checked fifth item will return fifth item but
if now when I check third item will return fifth item so it is always
returning last item checked in the list and I'm looking to

Please advice me how to do this using jquery.

Get selected row value based on checkbox selected in gridview using jquery

Hi ,    i am having gridview with two columns.one column contains checkboxes and another column contains Name.i have given UserId to DataKeyNames in gridview.Now i will check some checkboxes in gridview and click on button GetData. whenver i click on button GetData i need to get datakey values of all the gridview rows whatever checked in gridview using JQUERYPlease help me i am new to JQUery

jQuery instead of UpdatePanel (repeater loads when item in dropdown is selected)

Hello!I want to develop web page on which most of the things happens on clientside. The page contains several tabs (jQuery). One tabbed section have repeater which load when item in dropdown is selected.I've placed this 2 controls in UpdatePanel. Does somebody have any example how to achieve this without UpdatePanel, with jQuery?  I've heard that UpdatePanels are bad for page performance. I'm very new to jQ and Ajax.Thanks!all the bestBlaz

Get asp.net radiobuttonlist selected value in code behind when using jQuery buttonset


I am using the jQueryUI buttonset on an ASP.NET radiobuttonlist. I need to get the selected value in server-side code when the page posts back. If I don't apply the jQuery buttonset, this is of course easy enough - just grab "SelectedValue". However, when I do apply jQuery buttonset, the selected value does not appear to be available on postback any longer. Is there any way around this, or do I need to get the selected value on clientside, and then pass it back myself?

<asp:RadioButtonList ID="RadioButtonList0" CssClass="ratingButtons" runat="server">
    <asp:ListItem Text="Option1" Value="1"/>
    <asp:ListItem Text="Option2" Value="2" />
    <asp:ListItem Text="Option" Value="3" />
    <asp:ListItem Text="Option4" Value="4" />

  $(function () {
      $(".ratingButtons").click(function () { return false; });


set selected value after jQuery populated Dropdownlist



i'm using jQuery to populate an cascading dropdownlist. But i want to set a selected item after jQuery filled the DDL with items.

How do i do that?


jquery jstree and dynatree parent node don't get selected(asp.net mvc)


I have used jquery jstree and dynatree persistance example using check boxes and found the same logic The thing is that the if for example there is a parent and 4 child. a) i select all the 4 child (parent get auto selected) the 4 child and the parent node id get posted to the controller. b) But if i select less then 4 children (parent get auto selected) only child node ids get posted to the controller. Is there any way even if i select less then 4 children all my selected nodes included the parent get posted to the controller?

i wrote a method to conquor this but if i can do it in conventional way . it would be great. i hope some one has experience this problem and can help me out?

How to Context Menu when i right click on Gridview selected Row using Jquery



I have a requirement that

When i select a row in Gridview,it will High light the row and when Right click on selected

Row,It will open Context Menu.

In that menu i want to do Add new row delete row etc.

Help me in that.


Rama krishna.

GridView Confirmation Box Using JQuery BlockUI in asp.net

JQuery is the most popular JavaScript library. One of the main reasons for its fame is the plugin architecture. Anyone can create a separate library that leverage the JQuery library. In this article we are going to look at the BlockUI library which is used to block the user screen while performing a task.

jQuery $(document).ready() and ASP.NET Ajax asynchronous postback

Many call it the ASP.NET jQuery postback problem, but using the technique below should make it no problem anymore. $(document).ready() isn't called after an asynchronous postback. What this means? You lose the functionality that should be executed within $(document).ready() after an UpdatePanel rendered its contents after an asynchronous postback.

call JavaScript - jQuery code from ASP.NET Server-Side

jQuery got so close to me lately that I can see myself adding the scripts to my project almost unconsciously. The thing is, jQuery is very useful for me, in almost all situations and it has been a do or die enhancement for all my project since I first put my hands on it.

Of course while using it, you encounter few situations which need a bit of research to solve, mostly when you are trying to combine it with some other technologies like: UpdatePanels and ASP.NET Ajax. For instance there are many situations when I would like to run some jQuery magic based on some decision that I make on the server side.

Making Ajax Callbacks to the Server Using jQuery with ASP.NET

In the first part of this article series I introduced jQuery's functionality and how it provides a rich client side programming model. This time around I'll expand on these concepts and show you how you can use jQuery in combination with ASP.NET using it as an AJAX backend to retrieve data. I'll also discuss how you can create ASP.NET controls and otherwise interact with jQuery content from ASP.NET pages in WebForms.

jQuery is just a JavaScript library so it will work seamlessly with ASP.NET both from page code as well as through backend driven code using the Page.ClientScript object or ScriptManager. You can use jQuery on its own as a client side and Ajax library that communicates with ASP.NET or you can use jQuery in combination with ASP.NET AJAX. The two actually complement each other quite well as jQuery provides functionality that the ASP.NET AJAX library does not and vice versa. For the most part the interaction between the two libraries is trouble free except for a few very rare edge cases.

Displaying Row Details Tooltip on GridView using JQuery

Continuing exploring JQuery! I decided to implement a feature to display some kind of details related to a row displayed on GridView. For example when displaying employees details on GridView some information might not fit in the GridView because it will make it huge and wide. These infomration can be diplayed as Tooltip. Or when you want to display a picture and some kind of formated text to be diplayed as tooltip when mouse hover on the image.

jQuery: Highlight Gridview Rows with Checkbox

Im learning and experimenting with jQuery and ASP.NET. Below is a simple solution I created to highlight rows in a gridview by clicking on a checkbox next to the row.

Gridview setup:

Using jQuery with ASP .NET

With that, JQuery is officially embraced by ASP.NET.

A brief introduction of JQuery

jQuery is the star among the growing list of JavaScript libraries. A few of its characteristics are light-weight, cross-browser compatibility and simplicity. A common task that sometimes takes 10 lines of code with traditional JavaScript can be accomplished with jQuery in just one line of code. For example, if you want to dress up a table with an ID mytable with alternative color for every other row, you can simple do this in jQuery.

Sortable GridView using jQuery's TableSorter

This article explains how to use jQuery's plug-in Tablesorter to implement client-side sorting in an ASP.NET GridView. This comes in handy especially when an ObjectDataSource is used with a GridView as GridView does not provide sorting out of the box.

Sorting Gridview using Jquery with ASP.NET

I want to show how to sorting a gridview using a Jquery in ASP.NET, it is a flexible client-side table sorting. We have known that Jquery is a new kind of Javascript Library. You can find detail of Jquery in this site http://jquery.com/ there are lot of example with documentation and also allow free download a latest version.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend