Home > DeveloperSection > Forums > how to Bind (Set) Dropdownlist Value and Text using ng-Options or ng-Repeat Angularjs
Ankit Singh

Total Post:341

Posted on    November-17-2015 12:05 AM

 .NET ASP.Net  Angular JS 

 1 Reply(s)
 696  View(s)
Rate this:
I want to bind Dropdownlist Value and Text using Angularjs . How to do this.

aditya kumar Patel

Total Post:254

Posted on    November-17-2015 12:11 AM

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AngularList.aspx.cs" Inherits="Forumasp.AngularList" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml" ng-app="UserApp">

<head runat="server">


    <script src="Scripts/jquery-2.1.4.js"></script>

    <script src="Scripts/angular.min.js"></script>

    <script type="text/javascript">

        var app = angular.module('UserApp', []);

        app.controller("CntrUser", ['$scope', function ($scope) {

            $scope.items = [

                    { UserID: "PA011", UserName: "Pawan Shukla" },

                    { UserID: "SU210", UserName: "Suresh Kumar” },

  { UserID: "MA320", UserName: "Manoj Kumar" }






    <div ng-controller="CntrUser"> 

<br />

        <label>Select User:


<option data-ng-repeat="t in items" value="{{t.UserID}}">{{t.UserName}}</option>







Don't want to miss updates? Please click the below button!

Follow MindStick