| | |
Generate Html from VB.net
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Apr 2007
Posts: 1
Reputation:
Solved Threads: 0
Gidday I have a single Array of items (total number of items in array would be variable) that i want to display in a table like format i.e.
etc...
or
etc...
How can I generate this in VB.net with say a loop I know there was something in .NET 1.1 that could do this & can't find anything for 2.0
html Syntax (Toggle Plain Text)
<table> <tr> <td>ArrayVar[0]</td> <td>ArrayVar[1]</</td> </tr> <tr> <td>ArrayVar[2]</</td> <td>ArrayVar[3]</</td>
or
html Syntax (Toggle Plain Text)
<div style="float:left">ArrayVar[0]</div> <div style="float:left">ArrayVar[1]</div>
How can I generate this in VB.net with say a loop I know there was something in .NET 1.1 that could do this & can't find anything for 2.0
Stumaca,
www.asp.net
Check out their tutorials, I'm sure you'll be able to figure it out from there. Their tutorials are excellent for someone starting with ASP.
Jon
www.asp.net
Check out their tutorials, I'm sure you'll be able to figure it out from there. Their tutorials are excellent for someone starting with ASP.
Jon
•
•
Join Date: Jan 2006
Posts: 275
Reputation:
Solved Threads: 11
use a string builder if you want to make it yourself.
or you could use an html writer but this works just as well.
ASP.NET Syntax (Toggle Plain Text)
stringbuilder sb = new stringbuilder; sb.appendline("<table>"); for (int i=0; i<=arraycount; i+=2) //for vb people it is For I = 0 to arraycount Step 2) { sb.appendline("<tr>"); sb.append("<td>"); sb.append(arrayvar[i]); sb.appendline("</td>"); sb.append("<td>"); sb.append(arrayvar[i+1]); sb.appendline("</td>"); sb.appendline("</tr>"); } sb.appendline("</table>"); //now put it on the page - probably using a literal literal1.text = sb.tostring();
or you could use an html writer but this works just as well.
![]() |
Similar Threads
- Navigation (Paging) in HTML table in VB.NET. (VB.NET)
- Linking to asp.net page from html page (ASP.NET)
- communication HTML and ASP.NET (ASP.NET)
- PHP vs. ASP.NET for development platforms (ASP.NET)
- variables from javascript in asp.net (ASP.NET)
- HTML In VB.Net (VB.NET)
- Server delay - with html, asp, aspx pages (ASP.NET)
Other Threads in the ASP.NET Forum
- Previous Thread: update but not updated
- Next Thread: delete data, then shift its number....
Views: 6658 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for ASP.NET
.net 2.0 activexcontrol advice ajax alltypeofvideos anathor application asp asp.net bc30451 bottomasp.net box browser button c# checkbox click commonfunctions complex dataaccesslayer database datagridview datagridviewcheckbox datalist development dgv dropdownlist dynamically edit editing expose feedback fileuploader fill flash form formatdecimal formview google gridview gudi iframe iis javascript list listbox login microsoft migration mono mouse mssql multistepregistration news numerical object opera panelmasterpagebuttoncontrols parent problem project radio redirect registration relationaldatabases reportemail richtextbox rotatepage rows save schoolproject search security select session silverlight smartcard smoobjects software sql-server sqlserver2005 suse textbox tracking unauthorized validation vb.net video videos view vista visualstudio web webapplications webdevelopemnt webprogramming webservice xsl youareanotmemberofthedebuggerusers





