views:

970

answers:

5

I am facing a weird situation, i am developing an asp.net website, and i added a gridview control, it is placed inside td tag..

when i ran the website online,i noticed that the data shown on the rows are shifted to the left while their header tags are centered, so i gave the td an align="center" property,trying to make the data show centered in each column, and that worked perfectly when debugging the site offline..

however, when i ran the site online (after upload).. the data still showed shifted (or aligned left) :S

am i missing something here ?

+1  A: 

1) Do an MD5 of the uploaded files to see if the upload did go through correctly

and,

2) Refresh your browser's cache

Crimson
MD5 check shows they r the same files, and i used 3 different browsers till now + empty cache, and firebug to check the code..
Madi D.
+1 for suggestions(thx pretty helpful for future testing :) ),and i guess align=center tag on a td ..doesnt enforce itself on the gridview, so i used the property suggested above ..
Madi D.
+2  A: 

have you try this..........

<RowStyle HorizontalAlign="Center" />
                <AlternatingRowStyle HorizontalAlign="Center" />
Muhammad Akhtar
i already tried it before :S sadly for some weird reason it is only affecting the alternating rows..(on html check, the table generated to show the grid view has its alternating tr tags with align=center,while the normal tr tags without it, causing a mis-shift
Madi D.
oops my mistake,i was using horizontallaign instead of row style horizontalalign :)
Madi D.
okie..tested online and offline,works like a charm :)..
Madi D.
+1  A: 

Have a look at the HTML source in your browser. If you see the align="center" in the offline but not in the online version, something went wrong when publishing your web page (or your browser cache needs to be cleaned, see Crimson's answer).

Heinzi
Html source showed the align="center" (on the online files :S)
Madi D.
+1 for suggestions(thx pretty helpful for future testing :) ),and i guess align=center tag on a td ..doesnt enforce itself on the gridview, so i used the property suggested above ..
Madi D.
A: 

Set the property: RowStyle-HorizontalAlign="Center" in the gridview.

If it helps please mark as answer

Himadri
A: 

it worked for me!! thanks...

Ekta