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
suman goud
NA
176
53.7k
How to bind data from database to table, getting error..
Aug 9 2016 1:22 AM
am getting error when am binding data to table from database
An exception of type 'System.ArgumentException' occurred in System.Web.Mvc.dll but was not handled in user code
Additional information: Value cannot be null or empty.
my controller
var data = new List<Accounting_PendingBills>();
TestDemoEntities db = new TestDemoEntities();
data = db.Accounting_PendingBills.Where(x=>x.Party=="86").ToList();
return View(data);
view page
@model IEnumerable<AccountsPageLayout.Accounting_PendingBills>
@using System.Web.Mvc;
@using AccountsPageLayout.Models;
@{
ViewBag.Title = "pendings";
Layout = null;
}
<div id="popupdiv" title="Basic modal dialog">
<table align="center" class="tbldata" border="0" cellpadding="0" cellspacing="0">
<tr>
<th>Customer</th>
<th>Amount</th>
<th>Pendings</th>
<th>Pending Value</th>
<th>Pending Adjusted</th>
<th>Account Name</th>
</tr>
@foreach (AccountsPageLayout.Accounting_PendingBills emp in @Model)
{
<tr>
<td>@Html.TextBox("", emp.Amount) </td>
<td>@Html.TextBox("", emp.Amount)</td>
<td>@Html.TextBox("", emp.Amount)</td>
<td>@Html.TextBox("", emp.Amount)</td>
<td>@Html.TextBox("", emp.Amount)</td>
<td>
}
Reply
Answers (
7
)
Can anti forgery token prevent Data Scraping ?
Crystal report in VS 13