User Control not showing font and color

R

Robert Sheppard

I have a user control that dynamically creates a table. The header row has
bold text and gray background. The other rows have a smaller font and no
bold or background color. Pretty simple.

This user control is used to display a result set from my database. I call
it in one of two ways.

1. Either I have a button on the page that contains the UserControl that
initiates the results
2. Or I want the results to be presented when the page that contains the
UserControl is loaded.

The first method works great. I have a button on the main page that calls my
UserControl.ExecuteTable() function and the table displays just as I want
it.

If I do the same thing in the Page_Load of the page I get the correct table
but ALL of the nice attributes for the table (ie bold, font size, background
color) are all gone. Makes my table look terrible.

Am I missing something? Or do I have to do this in a different way?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top