Silverlight Q3 Controls & Existing Web Sites

10 posts, 0 answers
  1. Mike
    Mike avatar
    76 posts
    Member since:
    Nov 2004

    Posted 10 Nov 2008 Link to this post

    Hi Guys,

    The site has a great new look, and I really appreciate the improved forums functionality!  Keep up the good work!

    Okay…  Maybe I just don’t understand if/how the Silverlight controls work, but here is what I want to do.

    I have an existing web application that I want use your new Silverlight Q3 controls on.  So…  How do I do that?  Lets say I just want to add the MediaPlayer control to my site.

    Is there a way I can just add the controls to an existing website without making a completely new Silverlight application?

    I have tried adding the controls to the toolbox (using the steps listed on your site) but they don’t appear.

    Any help would be greatly appreciated.

    Many thanks,
    ~Mike

  2. Ben Hayat
    Ben Hayat avatar
    902 posts
    Member since:
    May 2008

    Posted 10 Nov 2008 Link to this post

    Mike, I'm not an expert in ASP.Net but I think I can offer a couple of comments;

    In ASP.Net, I believe there is a control that allows to contain a SL application. So, first step, you need a container for SL app.

    Secondly, in your ASP.Net project, you add a new SL project and build your silverlight application in that project.

    Then, you basically put your new SL application inside of the container in your ASP.Net page and anytime you go to that page, you'll see the SL app. This is your basic app. You can get fancier by letting your ASP.Net page to talk to SL at runtime.

    Hope this helps!

    ..Ben
  3. Mike
    Mike avatar
    76 posts
    Member since:
    Nov 2004

    Posted 10 Nov 2008 Link to this post

    Hi Telerik,

     

    Way back when...  Some time ago...  

    You released Silverlight controls that could be added directly to an existing application without having to do what Ben suggested.  I think it was your Silverlight 1.0 controls, because I remember using the old Silverlight media player control in an existing site and was able to communicate with the object directly.

    Is this possible with the new Silverlight controls?

    ~Mike

  4. Ben Hayat
    Ben Hayat avatar
    902 posts
    Member since:
    May 2008

    Posted 10 Nov 2008 Link to this post

    Mike, you could also use the Object tag and pass parameter to it instead of ASP.Net tag and still be able to do the same thing. Basically the SL you're building is just going to be one control on it (which RADMediaPlayer) and then in code behind you can grab the parameter you sent, i.e. the media file name and then feed it to the media player.

    Hope this helps!
    ..Ben
  5. Mike
    Mike avatar
    76 posts
    Member since:
    Nov 2004

    Posted 10 Nov 2008 Link to this post

    Telerik do you have a response to my question?

    Ben, thank you for your comments but your replies are not addressing my problem.  Which was...  A previous version of the Silverlight controls (I think 1.0) did not need me to create another project or pass parameters.  Please refrain from providing answers that are not related to the question.

    ~Mike
  6. Valeri Hristov
    Valeri Hristov avatar
    40 posts
    Member since:
    Dec 2003

    Posted 11 Nov 2008 Link to this post

    Hi Mike,

    Silverlight 1.0 was JavaScript based and didn't have .NET runtime. That's why Silverlight 1.0 controls were able to reside in an HTML page without anything else. Silverlight 2.0 applications are developed using .NET languages and need to be compiled, hence the additional project. The additional project has some pros:
    - it is compiled and you know when the application contains invalid code prior publishing
    - you can test easily
    - you can spread your classes into different assemblies (projects) and increase the encapsulation and reusability
    - you can avoid writing javascript, since the HTML DOM is available in Silverlight using C# (or VB)

    and some cons:
    - it is compiled and you cannot place Silverlight controls directly on the HTML page
    - you need to write different code to "connect" the Silverlight application to the HTML elements

    and many other pros and cons.

    Generally, in your scenario I would recommend identifying parts or pages of your ASP.NET application that can be written in Silverlight, then modify the ASP.NET application to provide API that can be used to communicate with the Silverlight parts and then create Silverlight project that communicates with the ASP.NET application.

    Valeri Hristov
    Telerik
  7. Mike
    Mike avatar
    76 posts
    Member since:
    Nov 2004

    Posted 11 Nov 2008 Link to this post

    Thanks for the reply.

    So I guess I’m still a bit confused.  I believe your Silverlight 1.0 Media Control was complied and appeared as an item within the Visual Studio toolbox.  I believe when I added the control to an existing .NET project it created a reference(s) to the DLL(s) and I was able to access the object directly.  I believe that was how I used it.

    My question is…  Can I create a reference to your new DLL’s, create an instance of your control, and have direct access to the object library from a Visual Studio 3.5 .NET web application without having to create a specific Silverlight application?  I can host Silverlight and WPF controls within a standard aspx page.  So...  Can't I do that with these controls?

    I guess I’m missing something.  Doesn’t the .NET web application provide me the correct access to the runtime?

    Please clarify.

  8. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 11 Nov 2008 Link to this post

    Hello Mike,

    The RadMediaPlayer for Silverlight1.0 had an ASP.NET control that was a wrapper around the Silverlight control. So basically you were working with an ASP.NET control that was just rendering Silverlight content.

    With the current controls that are build against Silverlight2 there are no ASP.NET wrapper controls. So you can't use them directly in your ASP.NET application.

    To use any of the Silverlight2 controls in ASP.NET page you need to perform the following 2 steps:
    1. Build a Silverlight application.
    2. Include the Silverlight application in your ASP.NET Page. More info on this can be found here:
    http://msdn.microsoft.com/en-us/library/cc838274(VS.95).aspx

    Please let us know if you have any other questions.

    Regards,
    Valentin.Stoychev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  9. Mike
    Mike avatar
    76 posts
    Member since:
    Nov 2004

    Posted 12 Nov 2008 Link to this post

    Hi Telerik,

    I completely understand what you are saying, and I am fine with it.  But…

    It would be great if you guys put a wrapper around, at the very least, your Media and Upload Silverlight controls.

    I am currently using the free Microsoft Silverlight Media Control (found in the same article you referenced) which can be used directly without the Silverlight container.  I was hoping with your newest version of your Silverlight controls you would have continued to wrap your media control as you did in the previous version.

    My rational is this…  Why should I have to separate my code base for any 3rd party control I want to use?  It only makes my code more difficult when I have to manage it across several projects.  Besides it only makes these controls even more valuable if anyone could quickly add them to their legacy applications. 

    That is just my two cents.

    I am a long time user, and even though I have evaluated all other controls suites, I find yours to not only the best (IMHO), but your service, as always, is above high class.

    Give the wrapping a though.

     Many thanks,
    ~David T.

  10. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 17 Nov 2008 Link to this post

    Hello David,

    You are absolutely right and we completely understand this request, ... and it is on our plan - for both MediaPlayer and Upload controls.

    I can't confirm on any release date though - It is a matter of priority - we want to build first the LOB controls for Silverlight and then will expand the suite to support this type of scenarios. Probably after Q1 we can be more concrete in those plans.

    Thanks for the feedback - if you decide to use the Media Player as it is now - let us know for any problems you face.

    Sincerely yours,
    Valentin.Stoychev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top