TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Abhilash J A
501
2.4k
598.1k
How to bind dropdownlistfor as List<string> ?
May 12 2017 4:51 AM
Hello all,
Thera the values of dropdownlistfor,
public
static
List<
string
> incorporationtypelist =
new
List<
string
> {
"Publicaly Held"
,
"Privately Held"
,
"Other"
};
And this is the text of the dropdownlistfor,
"Public"
,
"Private"
,
"Others"
Then, How can bind both Text and Value to drowpdownfor?
@Html.DropDownListFor(
model
=
>
model.incorporationtypelist, new SelectList(Model.incorporationtypelist, "Value", "Text"), new { @
class
=
"form-control"
})
Please help me...
Reply
Answers (
4
)
How to Fetch Current Time from Internet?
Bad Response Error