set rotator size serverside

2 posts, 0 answers
  1. Lee Malo
    Lee Malo avatar
    29 posts
    Member since:
    Apr 2008

    Posted 31 May 2011 Link to this post

    can you give me an example of how to set the rotator size according to browser window
    i.e  is 1640 wide so make the rotator 1640
  2. Gimmik
    Gimmik avatar
    170 posts
    Member since:
    May 2011

    Posted 01 Jun 2011 Link to this post

    Hi Lee,

    This is technically possible, but it's not really very much fun to do. You wouldn't have access to the window size until after the page loads. Then you would be able to extract the window width using JavaScript and post it back to the server. You can update the control width to be the same as the window width, and render the control to fit. That means you'll have to force the whole page to reload a second time each time the window size changes.

    I personally think it's a lot better to just determine how many elements you want on display at once, the width of each element, the width of any buttons, and just set the total control width accordingly.

    Hope that helps,
    -Gimmik
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top