Solved

form width and height in asp.net

Posted on 2011-03-21
7
2,240 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
Comment Utility
please get page source from browser when you run from iis7
0
 
LVL 1

Author Comment

by:kahvedzic
Comment Utility

 
<!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
Comment Utility
you may try using style on <body> instead of <form>
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 52

Expert Comment

by:Carl Tawn
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
This video discusses moving either the default database or any database to a new volume.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

728 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now