Created
February 2, 2017 05:56
-
-
Save saad749/db606466725cff8f96b5a766da4a4dad to your computer and use it in GitHub Desktop.
Using @: to append options with list from Server Side (Razor Syntax)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.append($("<option>", { "text": "-Please Select-" })) | |
@foreach (var item in Model.XXX) | |
{ | |
@: .append($("<option>", { "text": "@item.Title", "value": @item.Id })) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment