Solved

dynamically get master page div dimensions

Posted on 2011-03-13
5
399 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
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…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

617 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