html - Adding more than 1 column to ListView (ASP.NET) -
I am creating a webpage that lists the names of locations using ASP.NET. I am using a data source to read data from the database file. List view is displaying all the data in one column. What I'm trying to do is to add 7 lines of data, and as soon as the 7th row is added, add another column, and then continue to write the data in the newly created column. Here's my code:
& asp: ListView runat = "server" DataSourceID = "cwDataSource" & gt; & Lt; ItemTemplate & gt; & Lt; Tr style = "" & gt; & Lt; TD & gt; & Lt; Asp: Label ID = "NameLabel" runat = "server" text = '& lt;% # Eval ("name")%> / & Gt; & Lt; / TD & gt; & Lt; TD & gt; & Amp; Nbsp & amp; Nbsp & amp; Nbsp & amp; Nbsp & amp; Nbsp & amp; Nbsp & amp; Nbsp & amp; Nbsp & amp; Nbsp & amp; Nbsp & lt; / TD & gt; & Lt; TD & gt; & Lt; A href = "#" & gt; VIEW STORE page & lt; / A & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / ItemTemplate & gt; & Lt; LayoutTemplate & gt; & Lt; Table runat = "server" & gt; & Lt; TR & gt; & Lt; TD & gt; & Amp; Nbsp; & Lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; & Amp; Nbsp; & Lt; / Td> & Lt; / TR & gt; & Lt; Tr runat = "server" & gt; & Lt; Td runat = "server" & gt; & Lt; Table id = "item placeholder container" run = "server" range = "0" style = "" & gt; & Lt; Tr runat = "server" style = "" & gt; & Lt; Td> COLUMN # & lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; & Amp; Nbsp; & Lt; / Td> & Lt; / TR & gt; & Lt; Tr id = "item placeholder" run = "server" & gt; & Lt; / TR & gt; & Lt; / Table & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; & Amp; Nbsp; & Lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; & Amp; Nbsp; & Lt; / Td> & Lt; / TR & gt; & Lt; / Table & gt; & Lt; / LayoutTemplate & gt; & Lt; / ASP: ListView & gt; Example of how the output should look ('View Story Page' is only a link):
View column 1 column 2 Aadid View Shop Page ADDED Vision Story Page BEDD Vision Story Page IADD Vision Story Page CDD Vision Story Page ZD Vision Stear Page D.ADDD Vision Story Page K.ADDD Vision Story Page E.AD Vision Story Page LADDD Vision Story Page F. Edged Vision Story Page M. Edged Vision Story Page GDed Vision Story Page N. Aded Vision Story Page Any help would be appreciated.
I am working on this:
Comments
Post a Comment