How to pass height to a dynamically created iframe

Posted by Sksamantaray under ASP.NET on 1/17/2012 | Points: 10 | Views : 2268 | Status : [Member] | Replies : 3
How could i Pass height to dynamically created iframe?

Thanks,
Sanjay



Responses

Posted by: Blessyjees on: 1/19/2012 [Member] Bronze | Points: 25

Up
0
Down
Hi,

I think that you can specify the height of the iframe while dynamically creating.

HtmlGenericControl searchFrame = new HtmlGenericControl("iframe");
searchFrame.ID = "searchFrame";
searchFrame.Attributes.Add("heights", "500");

Blessy Baby
Digitalmesh Softech pvt Ltd
https://blessybaby.wordpress.com/

Sksamantaray, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Hemanthlaxmi on: 1/19/2012 [Member] Starter | Points: 25

Up
0
Down
You can also see a live example of resizing an iframe height dynamically.
www.mattcutts.com/files/frame-example.html

If this helps you .
Please "Mark as Answer"

Sksamantaray, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sksamantaray on: 1/19/2012 [Member] Silver | Points: 25

Up
0
Down
Hi Blessy ,
I have already used this code , it does not satisfy my problem because this is a static height .
Assume a situation:
suppose you have 2 dynamic pages 1 requires height=500 and 2nd page requires height =1000.
But you never know which page requires what height , so it has to be dynamic.
So i need a frame which has to be adjusted as per height of input screen.
When you pass a static height ,lets say 1000, then the output page of page-1 will have lot of white space.
I think you understand the problem now.

Please let me know if you have solution for this?

Thanks,
Sanjay

Sksamantaray, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response