SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2009
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question asp.net form processing ?

    I have a web site with a form which works just fine, I then submit the form and its contents appear on a * . aspx page. Now, in Visual Web Designer, when I submit the form to the development server, the aspx page works fine.

    I have a table that I put the data in and I center the table in the center of the page. If I put this web page on the abyss server, it works okay, but the table is no longer centered.

    Anyone have any idea why this is and how to fix it?




    code snippet:

    < body style = " background-color : black; ">
    < form id= "form_aspx" runat = "server" >
    < div style = " margin - left:auto ; margin - right : auto ; text - align : center ; " >
    < table border = " 2 " style = " border - style : none ; background - color :#a0a0a0;margin-top:20%;" >

    < tr >

    < td style = " width : 250 px ; font - weight : bold ; border - style : none ; text - align : left ; " >

    < % string firstname = Request . QueryString [ " firstname " ] ; % >
    < % Response . Write ( " The First Name entered was & nbsp ; & nbsp ; & nbsp ; & nbsp ; & nbsp ; & nbsp ; " ) ; % >


    < /td >

  2. #2
    SitePoint Guru
    Join Date
    Nov 2005
    Location
    Norway
    Posts
    715
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi
    Give your div a fixed width:
    Code:
    <div style="margin-left:auto; margin-right:auto; text-align:center; width:250px;" >
    And I wouldn't use the Visual Web Developer Designer to check for this, check in regular browsers so that you are certain it looks okay.

  3. #3
    SitePoint Enthusiast
    Join Date
    May 2009
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile

    Quote Originally Posted by fredda View Post
    Hi
    Give your div a fixed width:
    Code:
    <div style="margin-left:auto; margin-right:auto; text-align:center; width:250px;" >
    And I wouldn't use the Visual Web Developer Designer to check for this, check in regular browsers so that you are certain it looks okay.
    Thanks, that worked though I would have thought the auto on the margins should have worked.

    Oh well. By the way, what is your objection to using Visual Web Designer other than it is not a true server. I agree to not depending on it and checking to make sure that everything works on a real server, but it is convenient and I don't have to keep uploading my files to a server until I am almost finished. Of course, it obviously does have a few drawbacks such as this one.

    Anyway, thanks again.

  4. #4
    SitePoint Evangelist
    Join Date
    Apr 2008
    Location
    Dublin, Ireland
    Posts
    461
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Fredda is suggesting you preview your pages in an actual browser on your machine rather than the designer in visual web developer not another server. The designer is far from perfect. Right-click on a page and select Browse to open the page in your default browser, select "browse with" to pick which browser you want to open it in.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •