Solved

form width and height in asp.net

Posted on 2011-03-21
7
2,343 Views
Last Modified: 2012-05-11
Hi, I want to set width and height properties for  form1 in my asp.net page. I try this:
        #form1
        {
            height: 1070px;
            width: 1854px;
           overflow: hidden;
        }
and this:
<form id="form1" runat="server" style="overflow: hidden; height: 1070px; width: 1855px;">

in debugging mode on my computer it use size that I want, but after I copy page to iis 7 server code is not workin. What do I have to do to have it work on iis?

Thanks people.
0
Comment
Question by:kahvedzic
7 Comments
 
LVL 7

Expert Comment

by:Maverick_Cool
ID: 35179588
please get page source from browser when you run from iis7
0
 
LVL 1

Author Comment

by:kahvedzic
ID: 35179660

 
<!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><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>
      test page
</title><link type="text/css" href="menu.css" rel="stylesheet" />
      <script type="text/javascript" src="jquery.js"></script>
      <script type="text/javascript" src="menu.js"></script>
    <style type="text/css">
        #outerdiv1
        {
            width:1300px;
            height:1110px;
            overflow:auto;
            top: 0px;
            left: -40px;
        }
        #inneriframe1
        {
            top:158px;
            left:530px;
            width:1280px;
            height: 1050px;
            margin-top:-50px;
            margin-left: -40px;
        }
        .style2
        {
            width: 2154px;
            height: 1247px;
        }
        .style3
        {
        }
        .style4
        {
            width: 585px;
        }
        .style6
        {
            width: 330px;
        }
        .style7
        {
            width: 300px;
        }
        #form1
        {
            height: 1070px;
            width: 1854px;
            overflow: hidden;
        }
        </style>
</head>
<body>
    <form method="post" action="" id="form1" style="overflow: hidden; height: 1070px; width: 1855px;">
<div class="aspNetHidden">
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJMzk2MjA5ODMzZBgBBR5fX0NvbnRyb2xzUmVxdWlyZVBvc3RCYWNrS2V5X18WAwUEVVNSUwUDREJTBQRORVRT3fH7EdORJzLmCjNGXPOpohWdukj1Su6Unkpay/8+AQA=" />
</div>
 
<div class="aspNetHidden">
 
      <input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWBAKNwa/4BgKbjZLcDgKn9u+FCgLI34WGA6jhHmcJTftEo3iPC1GHnB+HKDTEbI69IHlRktW3tR6N" />
</div>
    <table class="style2">
        <tr>
            <td class="style3" colspan="3">
      <div id="menu">
            <ul class="menu">
                  <li><a href="Default.aspx" class="parent"><span>1</span></a>
                  </li>
                  <li><a href="#"><span>2</span></a>
                        <div><ul>
                              <li><a href="3.aspx" class="parent"><span>3</span></a>
                              </li>
                              <li><a href="4.aspx" class="parent"><span>4</span></a>
                              </li>
                        </ul></div>
                  </li>
                  <li class="last"><a href="#"><span>5</span></a>
                  <div><ul>
                              <li><a href="6.aspx" class="parent"><span>6</span></a>
                              </li>
                              <li><a href="7.aspx" class="parent"><span>7</span></a>
                              </li>
                    <li><a href="8.aspx" class="parent"><span>8</span></a>
                              </li>
                    <li><a href="9.aspx" class="parent"><span>9</span></a>
                              </li>
                    <li><a href="10.aspx" class="parent"><span>10</span></a>
                              </li>
                    <li><a href="11.aspx" class="parent"><span>11</span></a>
                              </li>
                        </ul></div>
            </li>
            </ul>
      </div>
            </td>
        </tr>
        <tr>
            <td style="text-align: center" class="style7">
                <input type="image" name="USRS" id="USRS" src="images/USRS300x300.jpg" />
                <br />
                <br />
                <br />
                <input type="image" name="DBS" id="DBS" src="images/DBS-300x300.jpg" />
                <br />
                <br />
                <br />
                <input type="image" name="NETS" id="NETS" src="images/NETS%20300x300.jpg" />
                <br />
                <br />
                <br />
                <br />
                <br />
                <br />
                <br />
                <br />
            </td>
            <td style="text-align: center" class="style4">
            <div id='outerdiv1' align="center" style="z-index: 1">
            <iframe src="http://iis/display.aspx" id='inneriframe1'
                    scrolling="no" width="70%" frameborder="0"></iframe>
            </div></td>
            <td style="text-align: center" class="style6">
                <img id="Image4" src="images/zoom.JPG" style="position: relative; top: -182px; left: -292px; z-index: 2;" />
                <br />
                <br />
                <img id="Image5" src="images/scroll.jpg" style="position: relative; top: -147px; left: -292px; z-index: 1;" />
                <br />
            </td>
        </tr>
        <tr>
            <td style="text-align: center" class="style7">
                &nbsp;</td>
            <td style="text-align: center" class="style4">
                &nbsp;</td>
            <td style="text-align: center" class="style6">
                &nbsp;</td>
        </tr>
        <tr>
            <td style="text-align: center" class="style7">
                &nbsp;</td>
            <td style="text-align: center" class="style4">
                &nbsp;</td>
            <td style="text-align: center" class="style6">
                &nbsp;</td>
        </tr>
        <tr>
            <td style="text-align: center" class="style7">
                &nbsp;</td>
            <td style="text-align: center" class="style4">
                &nbsp;</td>
            <td style="text-align: center" class="style6">
                &nbsp;</td>
        </tr>
        <tr>
            <td style="text-align: center" class="style7">
                &nbsp;</td>
            <td style="text-align: center" class="style4">
                &nbsp;</td>
            <td style="text-align: center" class="style6">
                &nbsp;</td>
        </tr>
        <tr>
            <td style="text-align: center" class="style7">
                &nbsp;</td>
            <td style="text-align: center" class="style4">
                &nbsp;</td>
            <td style="text-align: center" class="style6">
                &nbsp;</td>
        </tr>
        <tr>
            <td style="text-align: center" class="style7">
                &nbsp;</td>
            <td style="text-align: center" class="style4">
                &nbsp;</td>
            <td style="text-align: center" class="style6">
                &nbsp;</td>
        </tr>
        <tr>
            <td style="text-align: center" class="style7">
                &nbsp;</td>
            <td style="text-align: center" class="style4">
                &nbsp;</td>
            <td style="text-align: center" class="style6">
                &nbsp;</td>
        </tr>
        <tr>
            <td style="text-align: center" class="style7">
                &nbsp;</td>
            <td style="text-align: center" class="style4">
                &nbsp;</td>
            <td style="text-align: center" class="style6">
                &nbsp;</td>
        </tr>
        <tr>
            <td style="text-align: center" class="style7">
                &nbsp;</td>
            <td style="text-align: center" class="style4">
                &nbsp;</td>
            <td style="text-align: center" class="style6">
                &nbsp;</td>
        </tr>
        <tr>
            <td style="text-align: center" class="style7">
                &nbsp;</td>
            <td style="text-align: center" class="style4">
                &nbsp;</td>
            <td style="text-align: center" class="style6">
                &nbsp;</td>
        </tr>
        </table>
    </form>
    </body>
</html>

0
 
LVL 9

Expert Comment

by:mayank_joshi
ID: 35179696
you may try using style on <body> instead of <form>
0
How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

 
LVL 52

Expert Comment

by:Carl Tawn
ID: 35179735
It works fine for me when run under IIS, the form is the dimensions specified. Maybe the problem lies elsewhere. Is the path to your stylesheet being resolved correctly for example?
0
 
LVL 1

Author Comment

by:kahvedzic
ID: 35179746
try that also and again same problem, working on localhost but not on iis.
0
 
LVL 10

Accepted Solution

by:
khan_webguru earned 500 total points
ID: 35180171
Hello bro,

above the form tag add this line......

<div  style="position:relative;overflow: hidden; height: '1070px'; width: '1855px';">
    <form>

and after closing the form tag close that div

  </form>
</div>


Its just warper of the form apply any style in "DIV" and set form style options like <form   style="position:relative;width:100%;height:100%;"> Hope this will get your desire result.

Regards,

Asif Ahmed Khan

0
 
LVL 1

Author Comment

by:kahvedzic
ID: 35180316
That was helpful. thanks. also problem was with css style of menu, that was always visible no mather what size of form and body I use. Thanks once more.
0

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question