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
harry code
NA
124
23k
unable to send data from view to controller
Jul 14 2018 12:00 PM
Hi,
I am doing an mvc application.
I am unable to send data from view to controller.
View code
@model IEnumerable<studentcourse.Models.course>
<h2>Index</h2>
<ol>
@foreach(var item in Model)
{
<li>@Html.ActionLink(item.coursename,"Details","Home",new {name=item.coursename})</li>
}
</ol>
controller code:
public ViewResult Details(string name)
{
return View(db.students.Where(x=>x.cousename==name.ToString()).ToList());
}
the parameter value for string name is showing null.
thanks in advance
Reply
Answers (
4
)
Asp.net MVC without Entity Framwork
we need to do populate dropdownlist from database in dynamic