Select to view content in your preferred language

Possible to add silverlight map to div of aspx page

864
2
10-04-2011 12:32 PM
DougCollins
Regular Contributor
Greetings,
Is it possible to add a Silverlight Map as an object within a div on an ASP.net (aspx) page?  I added the silverlight map as an <object> wrapped in a div tag on an asp.net page, but the map does not display within the div component on the page.  I noticed that when I added a silverlight web project to an existing ASP Web forms project that the silverlight MainPage class inherited from UserControl instead of Page.  I was wondering if this was perhaps causing my problem.

Thanks in advance for any tips or clues,
Charlie
0 Kudos
2 Replies
DougCollins
Regular Contributor
I finally figured out what was going on.  I needed to add width="100%" height="100%" to the <object> tag.  For some reason the map was collapsed in the window.

Thanks,
Charlie
0 Kudos
ErikEngstrom
Frequent Contributor
Charlie,
Could you provide a snippet of code for your div? I've been meaning to try something like this.
Did you also have to put your XAP file somewhere specific of your .NET application?
0 Kudos