ASP.NET - Resolution Problem in Asp.net......

Asked By Eswaran Radhakrishnan on 04-Sep-09 01:04 AM
Hi all,

I am developing a web application using asp.net. my monitor size is "1448x880" (width=1448px and height=880px). I have designed a page using this window size. I have deployed this application also. when this application opens with screen width is greater than or equal to 1250 then it displays all of the contents. But, when the user try to open this page in 800x600 then it displays 3/4 contents only displayed. I have used a fixed menu on the right side of the page. It hides automatically when the user try to open with 800x600 widnow size. I could not get horizontal scroll bar also.

so, My question is how to diaply all the contents in any resolutions?

Thanks
R. Eswaran.

Resolution Problem in Asp.net

Sagar P replied to Eswaran Radhakrishnan on 04-Sep-09 01:49 AM

You can find the screen resolution easily from javascript and accordeing to that you can design your website;

see this code to find resolution of screen;

<script runat="server" language="C#">

    public void Page_Load(Object sender, EventArgs e){

        if (Request.QueryString["action"] != null) {
            // store the screen resolution in Session["ScreenResolution"]
            // and redirect back to default.aspx
            Session["ScreenResolution"] = Request.QueryString["res"].ToString();
            Response.Redirect("default.aspx");
        }

    }
    // JavaScript code below will determine the user screen resolution
    // and redirect to itself with action=set QueryString parameter

</script>

<HTML><BODY>
<script language="javascript">
res = "&res="+screen.width+"x"+screen.height+"&d="+screen.colorDepth
top.location.href="detectscreen.aspx?action=set"+res
</script>

</BODY></HTML>

Also you can desing a website so that it will fit to all resolutions;

there are some steps you need to follow for the same;

see these links which will give you exact information about the same;

http://windyroad.org/2007/05/18/resolution-independent-web-design/

http://www.entheosweb.com/website_design/advanced_web_design.asp

http://www.informit.com/articles/article.aspx?p=455372&seqNum=4

http://www.devcity.net/Articles/64/1/screenresolution.aspx

RE

KG coder replied to Eswaran Radhakrishnan on 04-Sep-09 01:51 AM
Resolution is always problem ,what u can do is find out resolution and try to set CSS as client's config
 may it help you

script runat="server" language="C#">

    public void Page_Load(Object sender, EventArgs e){

        if (Session["ScreenResolution"] == null) {
            // Session variable is not set
            // Redirect to the screen resolution detection script
            Response.Redirect("detectscreen.aspx");
        } else {
            // Session variable is set
            // Display it on the page
            screenresolution.Text = Session["ScreenResolution"].ToString();
        }
        
    }

</script>

<HTML>
<BODY>
User screen resolution: <asp:label id="screenresolution" runat="server">undetected</asp:label>
</BODY>
<HTML>

from http://www.devcity.net/Articles/64/1/screenresolution.aspx

implement fluid Web page layout

mv ark replied to Eswaran Radhakrishnan on 04-Sep-09 04:23 AM
You can make your web page spread across the screen dimensions of any monitor resolution by using either Tables or CSS. To implement fluid Web page layout with tables you have to set the table width as a percentage rather than as pixels.

The article here - http://www.sitepoint.com/print/liquid-design explains in detail how to implement a fluid Web page layout with code.


Esmail replied to Sagar P on 06-Aug-10 12:07 AM
from where you have taken query string I am not getting it