Andrei Bularca
Andrei Bularca

Reputation: 1024

Display file content in browser using ASP.Net

I want to display a file content (HTML file) inside a web page using ASP. I'm trying to display 2 files and show the differences. So i need to color different rows. I tried with TextBox but i can not color a single row. Something like this but inside a browser. I should be able to easily navigate through rows. (like SetRowColor(rowNumber, color))

Thanks!

Upvotes: 1

Views: 1215

Answers (3)

rauts
rauts

Reputation: 1018

One way you can do this by actually doing a HTML encode on the HTML code and display it. Basically you would convert < and > to < and >. then you use a editable Div tag to edit it and save it.

HTH

Upvotes: 0

Ramon Araujo
Ramon Araujo

Reputation: 1738

I recommend you to use a DataGrid(GridView) and the valuable information from www.4GuysFromRolla.com There you will have row by row edition, and you will be able to save content anywhere. You can split lines from every file in two Datagrids(GridViews), using rows for that purpose. Coloring is really easy. Sure, it all needs work ;)

Hope that helps,

Upvotes: 0

Fredrik Leijon
Fredrik Leijon

Reputation: 2802

Depending you what your after it might work well using tables and nonbreaking rows

Upvotes: 1

Related Questions