Skip to main content

Microsoft Silverlight

Answered Question Web sites with Silverlight 2RSS Feed

(0)

dustaf
dustaf

Member

Member

4 points

3 Posts

Web sites with Silverlight 2

 Right now it appears to me that I can only use Silverlight 1.0 to create websites.  When will I be able to use Silverlight 2 to create website?

Psychlist1972
Psychlis...

Contributor

Contributor

6040 points

973 Posts

MicrosoftModerator

Re: Web sites with Silverlight 2

I assume you're asking about the nature of any go-live license, not a technical question.

At MIX, they announced that there will be a Beta 2, around 3 months after Beta 1 and that it will likely include a go-live license.

Pete

Silverlight.net Moderator
MVP: Silverlight, Silverlight Insider
Author: Silverlight in Action, 2nd Edition
POKE 53280,0 - My Blog

Opinions are my own. Oh, and I don't work for Microsoft.

dustaf
dustaf

Member

Member

4 points

3 Posts

Re: Re: Web sites with Silverlight 2

Maybe I'm just confused how this all works, but I am using Expression Blend 2.5 and it lets me create a Silverlight 2 application, but I can only create a Silverlight 1 site.  So I was wondering when I would be able to create a Silverlight 2 site with some of the extra controls that were going to be included in Silverlight 2.  Is there an approx. date when this will be available?

jamlew
jamlew

Contributor

Contributor

2830 points

432 Posts

Microsoft

Re: Re: Web sites with Silverlight 2

Silverlight 1, being based on JavaScript, ran inside of a website.  Silverlight 2 runs on it's own runtime, so to speak, and so has it's own project type.  If you create a Silverlight 2 project, the output will be consumed by the Silverlight 2 ActiveX control in the browser, but it needs to be hosted inside of a webpage separately.  If you are using Visual Studio, when you create a Silverlight Application it gives you the Silverlight 2 project and a hosting ASP.NET website.  If you create the project in Blend, (I think) it generates a hosting web page at runtime when you test the project.

---------
If this post has solved your problem, please select 'Mark as answer'

- Jimmy Lewis
Microsoft SDET
Visual Web Developer Team

Allen Chen – MSFT
Allen Ch...

Star

Star

13856 points

1,800 Posts

Re: Re: Web sites with Silverlight 2

Hi:

dustaf:
but I can only create a Silverlight 1 site. 

  Silverlight 2 beta 1 is available now. You can download it here:

Microsoft Silverlight Tools Beta 1 for Visual Studio 2008

  Then you can get Visual Basic and C# Project templates for SilverLight 2 project.

Regards

Sincerely,
Allen Chen
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.

dustaf
dustaf

Member

Member

4 points

3 Posts

Re: Re: Web sites with Silverlight 2

I went to the link you sent and am still in the same situation.  I am going in to Microsoft Expression Blend 2.5 and the only choice it is giving me is for projects is 'Silverlight 1 Site' and 'Silverlight 2 Application'.  What I want is a project called somethin like 'Silverlight 2 Site'.  If I choose Silverlight 1 Site, it creates a Silverlight 1.0 web site.  How can I create a Silverlight 2 web site?
 

jamlew
jamlew

Contributor

Contributor

2830 points

432 Posts

Microsoft
Answered Question

Re: Re: Web sites with Silverlight 2

There's technically no such thing as a 'Silverlight 2 website'.  What you need to do is build a separate website with a page that hosts your Silverlight 2 application.  You'll need to add the following to whatever page hosts the Silverlight control:

For HTML:

<object data="data:application/x-silverlight," type="application/x-silverlight-2-b1" width="100%" height="100%">

<param name="source" value="PathTo/YourSilverlightApplication.xap"/>

<param name="onerror" value="onSilverlightError" /> <!-- this is a JavaScript handler -->

<param name="background" value="white" />

 

<a href="http://go.microsoft.com/fwlink/?LinkID=108182" style="text-decoration: none;">

<img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none"/>

</a>

</object>

For ASP.NET pages, you can use:

<asp:Silverlight ID="Xaml1" runat="server" Source="~/PathTo/YourSilverlightApplication.xap" Version="2.0" Width="100%" Height="100%" />

If you have Visual Studio around and you create a Silverlight 2 application, you'll see that it prompts to create a website in parallel with the Silverlight project.  If you don't have Visual Studio around, you'll have to put together a hosting page from scratch.  You might be able to run your Silverlight project in Blend, save the page that it generates to preview, and use that saved page in the future (you'll have to fix the xap reference and whatnot).

---------
If this post has solved your problem, please select 'Mark as answer'

- Jimmy Lewis
Microsoft SDET
Visual Web Developer Team
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities