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
Asp.Net Hein
NA
266
166.3k
cannot rename Model in dropdownlistfor
Jun 3 2016 3:05 AM
I want to add Dropdownlist in my MVC application but I have an error.
CS0135: 'Model' conflicts with the declaration 'System.Web.Mvc.WebViewPage<TModel>.Model'
This is my razor code for dropdownlist
@Html.DropDownListFor(a => a.UserId, new SelectList(
Model
.UserItems, "Id", "UserName"));
*Most of the reference said I cannot use Model in select list. But I cannot rename to others. Kindly support if you have any ways.
Reply
Answers (
2
)
How to add Zero(0) prefix and suffix in a value.(num or dec)
ontextboxchanged events valid email id in .net c#