locked
Simple Way To Set Web-Form In the Middle of The Screen... RRS feed

  • Question

  • User-1613068806 posted

    After a long time dealing with that particular problem...I find a very simple solution just check it out...

    <%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Untitled Page</title>
        <style type="text/css">
            #form1
            {
                width: 800px;
                margin: 0px auto 0px auto;
            }
        </style>
    </head>

    <body>
        
        <form id="form1" runat="server"
        style="background-color: #000000; height: 361px;">
        
        
        </form>
        
    </body>
    </html>

    Tuesday, February 28, 2017 5:03 PM

All replies

  • User-1613068806 posted

    Before to do anything, reduce the size of "form" from default to as per requirement. And mark your setting on <form> tag as I did. Don't go for any other solution just fix it in your asp.net application. All the control will be inside the <form>"All Your Controls"</form> tag.

    ...

    I hope my post will be helpful.

    Wednesday, March 1, 2017 1:26 AM