How ro get the width of the DIV?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

The DIV is a htmlgenericcontrol object.
I have no idea to get its width.

Is it dctr.Style.Item(?)?
I dont know the ? item.

Your help will be appreciated.
Thank you.

Best regards,
Ocurnos
 
Is it dctr.Style.Item(?)?

myDiv.Style.Add("width", "12px");
string myWidth = myDiv.Style["width"];

?

Antonio
 
You can only get it on client side and then transfer to the server in a
hidden input control.

Eliyahu
 
Not that simple.

Browsers have their own logic and priorities. They may consider your
instructions as recommendations and set another width.

Eliyahu

AF said:
Is it dctr.Style.Item(?)?

myDiv.Style.Add("width", "12px");
string myWidth = myDiv.Style["width"];

?

Antonio
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top