locked
adding silverlight 2.0 content to existing .net 3.5 web site RRS feed

  • Question

  • hello,

    i just downloaded and installed the new SL2.0 Beta 1 tools and sdk.  the installs worked flawlessy.  i would now like to add SL2.0 content to existing aspx pages in my .NET 3.5 site.  for some reason, i do not see any SL controls in the toolbox to drag into my aspx pages. I would like to use these controls (grid, slider, etc.) without creating a new SL project in my solution.  could someone help me find these controls in VS2008?

     thanks!

    Saturday, March 22, 2008 3:14 PM

Answers

  • Hi:

     1. Create a new SilverLight project in the same solution where your web site project locates.

     2. Then you'll see this dialog:

      (This pic is from the tutorial so the third option is grayed)

      In your case you can choose the third option. Link the Silverlight to your existing web site.

    3. Click OK. It'll generate two test pages for you. One is aspx, another is html. View the aspx you can see how to attach the silverlight to your web page using asp:SilverLight Control.

      

    Regards

    Monday, March 24, 2008 9:36 PM

All replies

  • Unfortunately, I think you're confused about how Silverlight works. Silverlight applications are hosted in a plugin on a page, not individual controls. You might consider going through one of the QuickStarts to get a better understanding of how Silverlight is composed.

    Sunday, March 23, 2008 10:09 AM
  • ok, i see i wasn't too clear on what i am trying to do.  the QuickStart videos i watched are ones that show how to add silverlight 2.0 content (xaml) to new projects.  i would like to know what controls i can use to drag/drop xaml into my existing vs2008 project.  there seems to be a number of references, classes, javascript etc, that need to be there, so i was hoping that by dragging a silverlight control onto my design surface, all the setup is done for me.  if this is not the case, then i could use some guidance on what lines of code need to be placed where when i add silverlight 2.0 content (xaml) to an existing .net 3.5 project that has no pre-existing xaml.

    Sunday, March 23, 2008 3:22 PM
  • There is a Silverlight ASP.NET control (that requires 3.5 AJAX) that will host your Silverlight project.

    Sunday, March 23, 2008 5:14 PM
  • i am new to silverlight (and ajax), so I will need a little more info on this control and what code i would need to support the control.  is there a migration article in msdn that describes this process?  i have searched with no luck yet.

    Monday, March 24, 2008 1:54 AM
  • Hi:

      Please refer to our tutorial to get started:

    http://silverlight.net/learn/tutorials.aspx

    Regards

    Monday, March 24, 2008 5:01 AM
  • thanks for the link, although none of the tutorials address my question.  the tutorials all start with a newly created silverlight project.  could you be more specific if i am missing something in my question?  i would like to know how to migrate an existing web site so that it will be silverlight capable.  once i have the capability of silverlight built into the web site, i can then add all the xaml i need. 

    ( i have same question for ajax, but i will open a new thread in the ajax forum on that one.)

    Monday, March 24, 2008 8:06 PM
  • Hi:

     1. Create a new SilverLight project in the same solution where your web site project locates.

     2. Then you'll see this dialog:

      (This pic is from the tutorial so the third option is grayed)

      In your case you can choose the third option. Link the Silverlight to your existing web site.

    3. Click OK. It'll generate two test pages for you. One is aspx, another is html. View the aspx you can see how to attach the silverlight to your web page using asp:SilverLight Control.

      

    Regards

    Monday, March 24, 2008 9:36 PM