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
Nagma Khan
NA
126
22.9k
I want to show sql table data in partial view of index
Oct 16 2017 8:19 AM
to show data in partial view
I have created a Partial view on index
here is the index method
public ActionResult Index()
{
Big5OnlinePortalEntities db = new Big5OnlinePortalEntities();
var data = db.ExpoRegistrations.ToList();
return View(data);
}
here is the partial view
@model IEnumerable<DataAccessOfExpo.ExpoRegistration>
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Index</title>
</head>
<body>
<h4>Customers</h4>
<hr />
<table cellpadding="0" cellspacing="0">
<tr>
<th>ID</th>
<th>Email Id</th>
<th>User Name</th>
<th>Password</th>
<th>EditionName</th>
</tr>
@foreach (var ExpoRegistration in Model)
{
<tr>
<td>@ExpoRegistration.Id</td>
<td>@ExpoRegistration.EmailId</td>
<td>@ExpoRegistration.UserName</td>
<td>@ExpoRegistration.Password</td>
<td>@ExpoRegistration.EditionName</td>
</tr>
}
</table>
</body>
</html>
now it is showing error 'System.Data.Entity.Core.EntityException'
The underlying provider failed on Open.
can anyone help I am new to MVC
Reply
Answers (
2
)
How to start online eCommerce Startup Business?
How to invalid all the access token what ever assigned to a