Does visual studio designer supports iframe

W

WT

Hello,

I have a custom control that display an iframe when a button is pressed, I
want to display that iframe in VS 2005 designer, but I am unable to
set the src of the iframe.
Are eframe allowed in design mode ?
how to set the src value ? something like \aspnet_client\mypath\mypage.html
doesn't seem to work.

Thanks for help.
CS
 
W

Walter Wang [MSFT]

Hi,

Thank you for posting!

Based on my understanding, the questions are:

1) Is iframe allowed in design mode
2) How to set the src property value of iframe
3) How to display an iframe when a button is clicked in a Web User Control

If there's anything I misunderstood, please feel free to post here.

I think currently the Visual Studio 2005 webform designer is unable to
render the iframe content directly in another html page or webform. But you
can change its properties such as width, height easily using the Properties
window.

To set the src property of iframe, simply use the properties window to
change it. For url path format, it's just like any other resources, such as
"../pages/mypage.html". Unfortunately, based on my test, it seems we cannot
use application root path "~" here, even make the <iframe element
runat="server". And since a Web User Control will be used by other pages,
the url path is actually related to the using page, not the user control,
so we need to be careful about the iframe path.

To display an iframe on demand, we can put the iframe element in a
<asp:panel> control and we can easily change the panel's visibility to show
or hide the iframe.

Hope this helps.

If there's anything unclear, please feel free to post here.


Regards,

Walter Wang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top