Hi,
Hi ,
I'm creating a custom control for a web project. I wanted to add flash
content as part of that control. How do i do that in C# file. Pls help.
Thanks in advance,
Priya
You cannot add the Flash content in the HTML code directly, however you
can add an OBJECT tag pointing to the location of that Flash content.
This is very much like pictures where you use a IMG tag.
The biggest difficulty when you use this in a control is to specify the
content's location, because the location must be relative to the Page
(ASPX), not to the control. I usually solve the problem by using a
property of the custom control to specify where the external content
(JavaScript, CSS, images, etc...) are placed relatively to the Page's
location.
Another approach is to embed the content in the DLL, and to use
webresource.axd to access it (ASP.NET 2.0 only). More info about that
approach:
http://www.nikhilk.net/WebResourceAttribute.aspx
http://weblogs.asp.net/jeff/archive/2005/07/18/419842.aspx
HTH,
Laurent