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
Sunshine
NA
201
26.6k
Refresh Partial View
Sep 16 2017 4:52 AM
Hi,
I am developing a Web Application with Asp.NET MVC5. As I dont have much experience, I am stuck with a functionality using JQuery and Partial View.
I have a Side Menu as a partial view in a page. This partial view contains a DropdownList which is populated from model, and it works fine. However, I want to display a list of items from the db when the dropdown is selected, based on the selection, which is not working.
Partial View (_UserPartialView)
$('#dropdown').change(function(){
var item = $(this).val();
$.get("/Controller/GetItems/" + item, function(data)
{
('#target').html(data);
});
Controller
public ActionResult (int id)
{
var test = db.Users.Where(e => e.cId = id);
return PartialView(" _UserPartialView", test);
}
Please help.
Thanks
Reply
Answers (
1
)
Deployment of Asp.net core and angular 2 projects into IIS.
Performance between asp.net mvc and asp.net mvc web api