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
ashok kumar
NA
89
36.2k
How to display three columns in a table in MVC
Oct 3 2013 7:01 AM
Hi
This is really challenging, i want to display three columns in a table,pls see the code iam using MVC and Razor.
here each item is rendered and displayed like this
Item1
Item2
item3
item4
item5
item6
my requirement i have to display it.
Item1 Item2 Item3
Item4 Item5 Item6
on every 3 row an tr should be inserted i guess,pls suggest me an solution sitting with this for two days.
My View:
@foreach(var item in Model.Products)
{
if(i%3==0)
{
<img src="data:image;base64,@System.Convert.ToBase64String(item.PRoductImage)" height="10px" width="200px" id="test" onclick="testing();" />
<button id="btn" type="button" title="BTN" onclick="Add(@item.Id);"></button>
}
else
{
<img src="data:image;base64,@System.Convert.ToBase64String(item.PRoductImage)" height="10px" width="200px" id="tests" onclick="testing();" />
<button id="btns" type="button" title="BTN" onclick="Add(@item.Id);"></button>
}
i += 1;
}
Reply
Answers (
3
)
how to get hidden value in javescript
Interest Calculations part in asp.net