Solved

dynamically get master page div dimensions

Posted on 2011-03-13
5
348 Views
Last Modified: 2012-05-11
I have a DIV wrapper incorporating the various controls on and asp.net master page. I'd like to access the DIV height from the content page and programmatically change that height prior to pre-rendering the page. Is this doable?
0
Comment
Question by:eehunter3
  • 3
  • 2
5 Comments
 
LVL 40

Expert Comment

by:gurvinder372
ID: 35122949
Yes, it is doable. You just need to get the Id of that div, and then you can get or set its height

alert( document.getElementById("divId").style.height ); //getting the height
document.getElementById("divId").style.height = "100px"; //setting the height
0
 

Author Comment

by:eehunter3
ID: 35123163
I think this might work but I am not familiar with javascript. Is there a VB.NET counterpart? Or can you be a little more explicit as to what javascript code goes on the master page and what goes on the content page to access the DIV's properties?.
0
 
LVL 40

Accepted Solution

by:
gurvinder372 earned 250 total points
ID: 35123175
check this page
http://www.w3schools.com/jsref/dom_obj_style.asp

I have no experience in VB.net, so Sorry, can't suggest anything else.
0
 

Assisted Solution

by:eehunter3
eehunter3 earned 0 total points
ID: 35123262
Back in a few .... Taking a quick tutorial in javascript and reviewing the link you have suggested.
0
 

Author Closing Comment

by:eehunter3
ID: 35178788
Made a mistake ... did not mean to credit myself with providing answer.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now