Click here to Skip to main content
15,039,714 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am currently developing an ASP.NET website where I have added one popup triggered on clicking a delete button. The code behind this popup is: on delete button click database is asked for data, 'Expiry date' and 'name'. If that data is present in database then user is shown this data using popup.

To show this popup
1) I created 'Datagrid' on aspx page
2) I create a datatable on aspx.cs in program. Added columns 'Expiry date' and 'name' to datatable and added data fom database to this table
3) Created one datasource on aspx.cs that is in program and added datatable to this datasource.
4) datagrid.datasource=datasource created in step 3)

Now in different browsers I am getting different looks of this popup. In mozilla I am getting horizontal and vertical gridlines, but also getting one dark horizontal line at random location in table. In IE I am not getting gridlines at all.

Since I am creating this table through C# code I can't do any formatting on this table. Can somrone tell me how can I fix the appearance of this table and format it?
Posted
Updated 19-Dec-11 23:12pm
v3

1 solution

"since i m creating this table through c sharp code i can't do any formatting to this table."

Errm, yes you can. What I would suggest is that you create a stylesheet (contains CSS) that you use to format the display. The way that I would approach this is to generate your popup window once, and then save it out to disk.

Once you have the saved version, create a stylesheet and link it to the saved version. Now, here's the "clever" bit; open it in Firefox as well as IE, and start to add the styling to your CSS. Periodically do a full refresh of the pages opened in both browsers, and check to see that what you have added looks the same in both.

The reason for doing it in Firefox is that it is much more standards compliant than IE, so you make sure that you get it working in IE first. You may need to add some IE hacks to get it to look the same in IE, but as long as you have a fair knowledge of CSS this is not too onerous.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900