In my asp.net web application, i have used liter control for displaying HTML data.Whenever user clicks the button, i will have a set of html data and needs to display it in the literal control.
Suppose if i have HTML table data or any other text with some formatting tags then it also displayed in literal control perfectly…
But i have a problem with displaying this HTML TABLE data(particularly this). for example, i have this HTML TABLE data in string.In debugging mode i just copied the string value and stored it as .html file.So, If i open the file in browser it shows the full table data(Way 1).But in my project, i just assigned the string value to literal control text.
literal1.text=htmlString;
But i when looked at the browser, my literal control shows only from part of the html table data.particularly,the first column is fully not shown and also part of the second row is not shown(Way 2).
I little bit doubt about whether it is a alignment problem.I can’t able to set the alignment of literal control anyway…
Please guide me to get out of this issue…
I have attached print screen of the both original table data displayed in browser(Image 1) and also literal control table data(Image 2)…
* Image 1 for Way 1*
* Image 2 for Way 2 *
The first thing I’d recommend is to compare the resulting html markup and affecting CSS using Firebug or another web developer tool. That should tell you where the differences are.
Based on your screenshots it looks as though the difference comes down to styling so either your HTML differs from one version to another and/or the CSS.
Can you post some code to go with your question?