?
Solved

form width and height in asp.net

Posted on 2011-03-21
7
Medium Priority
?
2,491 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
What is a Denial of Service (DoS)?

A DoS is a malicious attempt to prevent the normal operation of a computer system. You may frequently see the terms 'DDoS' (Distributed Denial of Service) and 'DoS' used interchangeably, but there are some subtle differences.

 
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 2000 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

Interactive Way of Training for the AWS CSA Exam

An interactive way of learning that will help you visualize core concepts so that you can be more effective when taking your AWS certification exam.  Built for students by a student to help them understand the concepts that they are being taught.

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

765 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