Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <object type="application/x-shockwave-flash" data="yourflash.swf" width="" height="">
- <param name="movie" value="yourflash.swf">
- </object>
- namespace MyNamespace
- {
- using System.Web.UI;
- public class FlashObject : Control
- { public int Width {get;set}
- public int Height {get;set}
- [UrlProperty] pubic string SourceUrl {get;set;}
- protected override Render(HtmlWriter writer)
- { writer.WriteLine( "<object type='application/x-shockwave-flash' "
- +" data='{0}' width='{1}' height='{2}'>rn"
- +" <param name='movie' value='{0}'>rn</object>"
- ,ResolveUrl(SourceUrl)
- ,Width
- ,Height);
- }
- }
- }
- <system.web>
- <controls>
- <add tagPrefix="my" namespace="MyNamespace" assembly="MyAssembly" />
- </controls>
- </system.web>
- <my:FlashObject SourceUrl='~/yourflash.swf' runat='server' />
Add Comment
Please, Sign In to add comment