Link to home
Create AccountLog in
Avatar of PixelMuse
PixelMuse

asked on

Data not being rendered.

I am at a loss here. This works on my dev machine, but not on webserver and here is the page in question. http://arizonasportscomplex.com/defaulttest.aspx

Slides 2 & 3 don't have any text showing, but data is definitely there for them. I've checked the proc and it returns the correct results. I've checked the dataset, and it returns the correct results. I've attached the code for returning the data, it's pretty simple stuff.

It's got nothing to do with the slider position either. I implemented a drag and drop in the admin section, and if I reorder the sliders, the two that don't show data never show data, no matter where they are in the order.

I cannot figure out why those slides are not rendering.
private void GetSliderList()
        {
            using (SqlConnection cn = new SqlConnection(ConfigurationManager.ConnectionStrings["DataConnection"].ToString()))
            {

                SqlCommand cmd = new SqlCommand("Get_Sliders", cn);
                cmd.CommandType = CommandType.StoredProcedure;
                SqlDataAdapter sa = new SqlDataAdapter(cmd);

                cn.Open();
                cmd.ExecuteNonQuery();
                DataSet ds = new DataSet();
                sa.Fill(ds);
                cn.Close();

                sliderList.DataSource = ds;
                sliderList.DataBind();

            }
        }

Open in new window

Avatar of Ajay Sharma
Ajay Sharma
Flag of India image

The text is renderd onto the page, but as you have not applied any css, it is showing as black.
A black text over a black background will not be visible.

Just apply any css on the slide 2 and  's text, which has fore color as white (or anything else).
Avatar of PixelMuse
PixelMuse

ASKER

I'll give that a shot, but this is showing up in a DataList, so the template is the same across all of the items.

Will report back.
Ajay is right, the text is there in the page for the slides.
Look out for the style sheet changes in the dev machine stylesheet and the web-server style sheet. You must be missing some of them in the live environment.
I double checked, and I have applied the CSS.

.Bannerpart .div .left1 p
{
    font: normal 15px Arial, Helvetica, sans-serif;
    line-height: 26px;
    color: #fff;
    padding: 0 0 0 9px;
    margin: 0 0 0 7px;
}

And that still doesn't explain why everything within the same template isn't behaving the same way.
Check your website in Firefox and use the firebug extension to check out for the CSS you have used, there are some issues in your CSS rendering.
ASKER CERTIFIED SOLUTION
Avatar of Ajay Sharma
Ajay Sharma
Flag of India image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Can you post your repeater's aspx?
It's a datalist actually.
Didn't post up.
<asp:DataList ID="sliderList" runat="Server" RepeatColumns="6">
                            <ItemTemplate>
                                <li style="margin: 0 0 0 -3px">
                                    <div class="div">
                                        <img alt="" src="images/sliderphotos/<%#Eval("Id") %><%#Eval("Ext") %>" border="0"
                                            class="screen">
                                        <div class="left1">
                                            <h2>
                                                <%#Eval("Title") %></h2>
                                            <p>
                                                <%#Eval("T1") %></p>
                                            <p>
                                                <%#Eval("T2") %></p>
                                            <p>
                                                <%#Eval("T3") %></p>
                                            <p>
                                                <%#Eval("T4") %></p>
                                        </div>
                                    </div>
                                </li>
                            </ItemTemplate>
                        </asp:DataList>

Open in new window

And I see what you are saying about the issue with the text.
Found the cause.

The images were too wide on those 2 records and it was causing the text to shift down. Resized images and all is well.

Thanks for the extra set of eyes everyone.