Select Dropdownlist data in mvc4

How to select Dropdownlist data in mvc4 application

Step 1:
 after binding dropdownlist you can select these data as below source code from the view using  jquery code 

View :

<div class="editor-field">
          @Html.DropDownList( "Designation", ViewBag.Designation as SelectList, "-Select -", new { style = "width:70px;height:25px", @id = "Designation" } )
        </div>

Step 2: 
        Jquery code to select data from dropdownlist


function InsertData()
 {
   var Dg = $('#Designation :selected').text();
}



See Other Tutorial :

AngularJS CRUD Operation : Select Insert Edit Update and Delete using AngularJS in ASP.Net MVC

*  AngularJS With ASP.NET MVC

*  Convert Rows to columns using 'Pivot' in SQL Server

*  Mvc Registration page With user exist using Ajax method

*  MVC 4 How to Perform Insert Update Delete Edit Select Operation

*  MVC4 Edit,update,Delete,cancel inside gridview using sql database


*  MVC 4 Gridview To Display Data Using SQL Server Database With Simple code


*  Login page in asp.net Mvc4 Web application


*  Mvc4 How to bind Dropdown List using Sql Database


Gridview find control in asp.net

    



Previous
Next Post »