Centering problem for button control in vs 2005

Last post 07-16-2008 3:14 AM by Thomas Sun – MSFT. 2 replies.

Sort Posts:

  • Centering problem for button control in vs 2005

    07-11-2008, 4:52 PM
    • Loading...
    • panBwai
    • Joined on 04-23-2008, 12:03 AM
    • Belize City, Belize
    • Posts 15

    I have encoutnered a very peculiar problem.  In my asp.net form, i have a table i use to to put my various controls in.  whenever i try to center a control in any cell in my form, the control would return to left justify after a page refresh (in VS2005) or if I reopen the .aspx page in vs2005.  Does anyone know if this is a bug or am I doing something wrong?

  • Re: Centering problem for button control in vs 2005

    07-11-2008, 5:11 PM
    • Loading...
    • panBwai
    • Joined on 04-23-2008, 12:03 AM
    • Belize City, Belize
    • Posts 15

    I forgot to mention that this is within a content place holder.

  • Re: Centering problem for button control in vs 2005

    07-16-2008, 3:14 AM
    Answer

    Hi,

    Based on my understanding, the control is not center in the cell of the table in the Visual Studio Design view, even though you set it to center. 

    How do you set the table, using TD tag's HorizontalAlign attribute or link to external CSS file? If you are using CSS file, please make sure the path is correct. For example, we can use "../" instead of "~/".  For more information about asp.net website paths, see http://msdn2.microsoft.com/en-us/library/ms178116.aspx

    Do other controls have such issue (style is lost)? If not, could you please post a simple test code that can be used to repro this issue? By this code, we can move more quickly toward a solution.

     

    I look forward to receiving your test results.

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Page 1 of 1 (3 items)
Microsoft Communities
Page view counter