Reputation: 121
I'm trying the code below but its not working..
<object width="425" height="344">
<embed src="C:\Users\fortress\Desktop\AppointmentApp.swf" type="application/x-shockwave-flash" width="425" height="344"></embed>
</object>
Also tried this. Not working also.
<object width="425" height="344">
<embed src="~/Styles/Images/AppointmentApp.swf" type="application/x-shockwave-flash" width="425" height="344"></embed>
</object>
Problem:
I'm newbie in ASP.net.. SO yeah, please explain also the code if its okay...
Here's the output in client-side:
Here's the whole code for my client-side:
Thanks!
Upvotes: 0
Views: 1373
Reputation: 306
You need both <param>
movie tag and <embed>
. Try this:
<object type="application/x-shockwave-flash" width="425" height="344">
<param name="movie" value="/Styles/Images/AppointmentApp.swf">
<embed src="/Styles/Images/AppointmentApp.swf" type="application/x-shockwave-flash" width="425" height="344"></embed>
</object>
Good luck!
Upvotes: 0
Reputation: 218828
This isn't ASP.NET, this is HTML. It might be served to the client by an ASP.NET server-side application, but that makes no difference to the client.
As far as HTML goes, your paths are broken. In both cases:
In the first case you're referencing a file system path. This wouldn't work on any client computer which doesn't have that file. If the file is on the web server then no client will be able to access the web server's C:
drive. In the second case you're using a server-side relative path with a ~
, and no client will be able to make sense of that.
When the page renders, the path needs to reference the file from the client's perspective. Something like this:
Or perhaps:
Or whatever the path is from the rendered page to the SWF file.
I'm not 100% sure if this works well for object
/embed
tags, but you might be able to use the ~
path reference if you make the tag a server-side control. That should just be as easy as adding runat="server"
to the tag:
<embed runat="server" src="~/Styles/Images/AppointmentApp.swf" type="application/x-shockwave-flash" width="425" height="344"></embed>
This would indicate to the ASP.NET application that the control needs some server-side processing before it's rendered to the client, and that processing would include evaluating relative paths.
Upvotes: 2