I am calculating the browser size of the browser and storing it in hidden fields and I dynamically control I'm creating page based on size (). But to calculate the on-screen () screen size, the Javascript function is being removed before the fire.
Any thoughts?
OnInit
method lets me tell you the method of the ASP.Net page loading cycle Tell about Since Javascript is client side (i.e., it runs on browsers) and C # / ASP.NET server-side (i.e., it runs inside IIS on the server), this will always trigger before any JavaScript function runs .
Two chakras are required for your chosen approach: The first page is requested and you can set the hidden areas with your Javascript method. This page is posted on auto-posted on the server and you calculate the heights and width of your item.
However, this approach will give you many headaches now and in the future. Browser's viewport (size, which you talk about) is often better to solve layout problems on the client side, an excellent startup CSS, if CSS can not solve it, then use it (or).
Comments
Post a Comment