Question
l am trying to switich form int to string as below code on ASP.net public ActionResult Search() { var enrollemnt = Search(); return PartialView(enrollemnt); }
l am trying to switich form int to string as below code on ASP.net
public ActionResult Search() { var enrollemnt = Search(); return PartialView(enrollemnt); } private List
when l do the serach the serach is not seraching
this is partil view for the enrollemnt as below
@model IEnumerable
- @foreach (var item in Model) {
- @item.AssignedCampus
- @item.Course
- @item.CourseId
- @item.EnrollmentId
- @item.EnrollmentSemester
- @item.EnrollmentYear
- @item.Grade
- @item.IsActive
}
and this the index as below
@model IEnumerable
@{ ViewBag.Title = "Index"; }
Index
@Html.ActionLink("Create New", "Create")
@Html.DisplayNameFor(model => model.Course.Title) | @Html.DisplayNameFor(model => model.Student.LastName) | @Html.DisplayNameFor(model => model.Grade) | @Html.DisplayNameFor(model => model.IsActive) | @Html.DisplayNameFor(model => model.AssignedCampus) | @Html.DisplayNameFor(model => model.EnrollmentSemester) | @Html.DisplayNameFor(model => model.EnrollmentYear) | @Html.DisplayNameFor(model => model.Notes) | |
---|---|---|---|---|---|---|---|---|
@Html.DisplayFor(modelItem => item.Course.Title) | @Html.DisplayFor(modelItem => item.Student.LastName) | @Html.DisplayFor(modelItem => item.Grade) | @Html.DisplayFor(modelItem => item.IsActive) | @Html.DisplayFor(modelItem => item.AssignedCampus) | @Html.DisplayFor(modelItem => item.EnrollmentSemester) | @Html.DisplayFor(modelItem => item.EnrollmentYear) | @Html.DisplayFor(modelItem => item.Notes) | @Html.ActionLink("Edit", "Edit", new { id = item.EnrollmentId }) | @Html.ActionLink("Details", "Details", new { id = item.EnrollmentId }) | @Html.ActionLink("Delete", "Delete", new { id = item.EnrollmentId }) |
Adding an Ajax Form to include Search functionality to the Enrollment Index View.
Add functionality to "Search by Student"
Add functionality to "Search by Course" -
l am not able to fix the issues to do the serch by student or coures and where is the issues
Application name Index Course Search search Create New Course Title Description Number of Credits IT2030 Asp.net 4 Edit | Details | Delete IT2320 Internet Edit | Details | Delete Application name Index Course Search search Create New Course Title Description Number of Credits IT2030 Asp.net 4 Edit | Details | Delete IT2320 Internet Edit | Details | Delete
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started