Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

111
Views
Aspx Web App containing rendered MVC View to available screen size

I have inherited an older web app, which is primarily written inside of ASPX page's, and am working on migrating it over to MVC, but it's a bit of a slow process, since there are only two/three of us and the project just began. Along with this effort we are also using DevExpress controls. So when we load a page, it first goes through the ASPX (because of we are still using the Site.Master for the menu content), Which then calls the MVC Render Action, to load the view within the ASPX Page.

<asp:Content ID="blah" ContentPlaceHolderID="anotherBlah" runat="server">
    <style>
        .container {
           position: relative;
           width: 100%;
           overflow: auto;
           max-width: 2150px;
        }
    </style>
    <div class="container">
        <%Path.To.MVC.RenderAction("Controller","Action" new {}); %>
    </div>
</asp:Content>

How would I programmatically limit the max-width to the available size of the screen, so that it contents of the Controller doesn't require the browser's scroll bar?

The DevExpress dxDataGrid has it's own built in scroll bar, that the user's could utilize instead. The issue is that the ColumnPicker, Add New Button, Search, or Export Button's go along for the journey, to the maximum width of the table. Which is why I want to contain it to the available width of the screen, and let the dxDataGrid handle the rest.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

A friend of mine pointed me towards viewport-percentages. This seems to have been what I was looking for all day! So if anybody else stumble's upon this quiestion, follow the link to read more:

CSS get height of screen resolution

My solution:

<asp:Content ID="blah" ContentPlaceHolderID="anotherBlah" runat="server">
    <style>
        .container {
           position: relative;
           width: 93vw;
        }
    </style>
    <div class="container">
        <%Path.To.MVC.RenderAction("Controller","Action" new {}); %>
    </div>
</asp:Content>
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!