.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Display records in multiple columns in asp.net mvc

Posted By:      Posted Date: September 14, 2010    Points: 0   Category :ASP.Net
 Hello,i'm newbie to asp.net mvc. i use mvc 1.0 since my host supports that.i have a piece of code in my view like this and i want to change it in order to be able to show records in 4 columns.What should i do?<table>            <% foreach (var item in Model) { %>                     <tr>                                  <td>    <%=Html.ActionLink(item.CategoryName + "(" + item.NumberOfWebsitesInCategory + ")", "SubCategory", new { CatID = item.CategoryID }, new {style="text-decoration:none;" })%>                         </td>                    </tr>        <% } %>    </table>

View Complete Post

More Related Resource Links

Autocomplete display multiple columns


 Hi --

I have an autocomplete extender working great returning one column and I can also retrieve multiple columns just fine from my stored procedure, but here's what I really need to do:

1. Format the data in the autocomplete extender in the following format:

Location Number
City, State, Zip

2. When the user makes a selection I want only the Location Number to populate the textbox.

I've looked quite a bit on this site and others on how to do #2 and I can't seem to find exactly how this should be done. Is there some javascript that needs to be involved in order accomplish this?

If anyone has done this I would really appreciate an example.




Matrix Report With Month/Year Columns - Display date even when there are no records for that month


I've created a matrix report that displays the quantity of different products  set to expire by month/year. The stored procedure returns records for a variety of products and each record contains an expiration date. If there are no products/records that contain an expiration date of lets say 6/2010 then 6/2010 will not appear as a column in the report.

I need a way to force these month/year columns to appear in the report.


Does anyone have a suggestion on how I can make that happen?


Rick Dowdall


How to break records in multiple columns on the same SSRS page



My SQL Query is returning, around 250 single column records, I want to break these 250 records in 5 columns of length 20 each on SSRS (i.e. 100 records on a single page). I.e.

Employee List           Employee List       Employee List      Employee List       Employee List

Emp1                       Emp21                 Emp41                 Emp61                 Emp 81

Emp2                       Emp22                Emp42                  Emp62                  Emp82

.. Emp 20   &

Display multiple Columns in Single Column in SQL CE 3.5


I have table with different columns

Ex. Device table

Columns : deviceid,devicetype,device1,device2,device3,device4

                    1  Swich board         D1      D2        D3       D4

                    2  Sensors              S1      S2         S3       S4

i want to display this  table contains in single row

Device Name








Please Help me


Thanks in advance



Adding Multiple Columns and Rows in GridView without using a Database

This article describes on how to add multiple columns and rows in GridView without using a database. Basically the GridView will be populated with data based on the values entered in each TextBoxes on Button Click and retain the GridView data on post back.

search multiple words into textbox and populate all records in gridview related those keywords


I have a textbox and a gridview which is bound to a table

what I want to achieve is a solution where lets say there are two records - e.g. "1. Book and 2. Red", i want a user to type in those words and the gridview shows the results as followed;

1. Book

2. Red

I have set up the sql data source and everything and my like operator is this...

LIKE '%' + @record + '%'

how can I solve this problem?

Filter search over multiple text columns


Hi everyone,

I'm working on a library that stores information on various cases. The case table has several columns that contain descriptive strings on what happened in the case. I would like to create a single filter that returns all cases where the search string is found in any of the columns. I've looked at Dynamic Data Filtering, but as far as I can tell, the "Contains" filter only allows you to connect to each column individually. Has anyone tried this?



Can two columns have the same display names but different underlying names?


I have two columns which are set up differently. But for a display purpose and different usage, they should share the same display names but not the underlying name. How may I set them up in SharPoint?

split a column into multiple columns

Hi i have a column with the following values from my source FILENAME ComplianceStatus_ER_06022010.xml ComplianceStatus_AZER_07052010.xml ComplianceStatus_GEL_06022010.xml ComplianceStatus_AFF_05022010.xml ComplianceStatus_Good_2010.xml   I want to split the date into different columns as follows using ssis   FILENAME                            CLIENT      DATE ComplianceStatus_ER_06022010.xml    ER          06022010 ComplianceStatus_AZER_07052010.xml  AZER        07052010 ComplianceStatus_GEL_06022010.xml   GEL         06022010 ComplianceStatus_AFF_05022010.xml   AFF         05022010 ComplianceStatus_Good_2010.xml      Good        2010  

Format with Multiple Columns

How do I acheive below format in reporting services? part  qty    part  qty     part  qty p1     10      p2   11     p3    14 p4     16      p5    12    p6     20 Thanks in advance.

Delete Multiple Records

Hai friends,            How to delete multiple records using checkbox in gridview?

Display records in bold coming from mysql database

hi,I have Mysql database.In that some records status is New.now,I bind database table to Listview(asp) control.What's my problem is,the New status records(from Mysql database) text in Listview(after binding) is visible in bold format.how to do this??Thanks in advance.


Hi Friends, I am creating an application for a jewellery shop (MINOR PROJECT) in VB.Net but my problem is that I dont know how to insert multiple records for same bill number. consider the following condition Bill Number Customer Name   ............................................... Customer Address ................................................ S.No                 Item name                Rate    Qty                            Total 1                      abc                            5        5                                 25 2                 &nb


the database result is as follows DATE     code   class1 class2  class3 1/8/10     M1     10       20     30     3/8/10     V2      20       30     10      1/8/10      H1      1           2      3         7/8/10     ! ! 8/8/10     !M2    5      5      5       3/8/10     B2      4      4     4       1/8/10     V1      3      7     3       THE OUTPUT SHOULD BE AS FOLLOWS:- DATE           M1                          M2           

Inserting multiple records under the single query

Hi All,       I have to insert a multiple records under the single table.So i have to execute the command in the frontend for every records. Inorder to avoid i write the query like this   insert into table1(field1,field2) values('1','Test1'),('2','Test2'); and also i tried insert into table1(field1,field2) SELECT "1","Test1" Union all SELECT "2","Test2" But I am getting syntax error. How to insert a multiple records under the single query???...

InfoPath 2007 - Publishing Creates multiple columns on SharePoint Form Library (GUIDS apparently are

I have been working this issue for 2 days now.  This has happened to me in the past and I was able to work through it.  It doesn't appear that this time I am going to be so lucky. Issue Description: When publishing an InfoPath form a new column is created that has the same name as the correct one, but a new GUID is created. Troubleshooting steps: I have read this article: http://www.delphi-ts.com/blogs/lozzi/post/2009/06/03/Duplicate-site-columns-in-MOSS-from-InfoPath-Forms.aspx   This was the solution the last time I had this problem.  However, no matter what I do, it is not working now.  I have a column named User Name which is the username of the person that submitted the InfoPath form for use with my Visual Studio workflow.  When the workflow kicks off, it reads this column and attempts to get the value.  The value is blank because a new column with the name User Name now exists and that is where the value is stored.  I attempted to fix it by remapping the GUIDs as described in the article.  I also reverted the code to a previous version from TFS.  None of these worked.   I now have 3 columns called User Name and I can remap the GUID to the second column and third column.  But when I try to map it to the first column (the one I need) it doesn't work. The first column that is circled is the correct column. 

how to display multiple calendar list data in single calendar view

Hi, Normally, we can used to extend the ListViewWebPart's ViewType property to display a particular calendar list items in Calendar View in our custom webpart. Is it any way to display multiple calendar list data in a single calendar view ?? or please provide some pointers related to this issue. Any help is much appreciated.    
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend