Ask a Question related to ASP.NET Building Controls, Design and Development.

  1. #1

    Default page size...

    I have a pop window that is displayed and depending on the state of the
    system it will contain any number of user controls(ascx). These controls
    contain dynamic content and therefore the size of the control can change
    dynamically.

    Is it possible to work out the size of the page that is going to be
    displayed from the code behind page and then resize the pop window
    accordingly?

    Cheers

    Earth Worm Jim



    Jim Guest

  2. Similar Questions and Discussions

    1. page size
      We need to mix letter and legal in same package. Anyone know how to embed page size selection in the document?
    2. changing size of swf according to html page size
      hi experts I want to change size of my swf according to the size of html page in which it opens such that if page size is 1024 by 768 then swf...
    3. page layout - web page size
      When I maximise my browser window when viewing my published web pages, the page no longer fills the window, leaving an unused area to the right,...
    4. Page SIze BUG?!
      Hi Gang, Here’s a strange one. Has anybody tried setting their page set up to print at 55%, 56%,57% or 58% ?. The page margin and size is doing some...
    5. Setting page size to artboard size?
      I'm trying to layout a presentation folder with pocket flaps etc. The dimensions of the die template I'm using are at their outtermost, 60cm by...
  3. #2

    Default Re: page size...

    Ouch sorry. Didn't see...

    "Jim" <ssss> wrote in message news:OCoTCV8kDHA.2500@TK2MSFTNGP10.phx.gbl...
    > I have a pop window that is displayed and depending on the state of the
    > system it will contain any number of user controls(ascx). These controls
    > contain dynamic content and therefore the size of the control can change
    > dynamically.
    >
    > Is it possible to work out the size of the page that is going to be
    > displayed from the code behind page and then resize the pop window
    > accordingly?
    >
    > Cheers
    >
    > Earth Worm Jim
    >
    >
    >

    Patrick Dahmen Guest

  4. #3

    Default Re: page size...

    Yes I think it is.

    I IE you could generally use getBoundingRect() function to retrieve the size of your controls, even if they have no constant size (width or height params within style element)

    for example
    <script>
    function changeWindowSize()
    {
    var oSizingControl = document.getElementById('sizingControl');
    width = oSizingControl.getBoundingClientRect().right - oSizingControl.getBoundingClientRect().left;
    height = oSizingControl.getBoundingClientRect().bottom - oSizingControl.getBoundingClientRect().top;

    window.resizeTo(width + 25, height + 50);

    }
    </script>
    <body onload="changeWindowSize()">
    <asp:Label runat="server" id="sizingControl">Here is my text, i don't know the width and height of</asp:Label>

    </body>

    I hope that helped...

    "Jim" <ssss> wrote in message news:OCoTCV8kDHA.2500@TK2MSFTNGP10.phx.gbl...
    > I have a pop window that is displayed and depending on the state of the
    > system it will contain any number of user controls(ascx). These controls
    > contain dynamic content and therefore the size of the control can change
    > dynamically.
    >
    > Is it possible to work out the size of the page that is going to be
    > displayed from the code behind page and then resize the pop window
    > accordingly?
    >
    > Cheers
    >
    > Earth Worm Jim
    >
    >
    >
    Patrick Dahmen Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139