What is the difference between silverlight and asp.net




















Silverlight to specify a callback to be invoked once the XAML is loaded—this allows me to wire up the event handlers and initialize properties on individual XAML elements. You should be as accommodating as possible when interacting with named XAML elements, which entails checking to see if they exist before actually modifying their content or wiring up event handlers.

If the element is missing and is not crucial to the operation of the control like the titleText element in my control's XAML , just skip the initialization steps for that element. This way, a designer can elect to remove certain elements from the XAML and the control will still work. This time, however, the method is encapsulated in a class. The final step in the client-side script is to register the new class, specifying the base class as Sys.

The remaining task is to build the server-side control that uses this class via the IScriptControl interface see Figure 7. Like the client-side class, the server control exposes two properties: Title and XamlUrl. These are backed by ViewState, as all server-side control properties should always be. By setting this property in an override of OnInit, I ensure that the property will default to this URL, but any overridden version specified by the client will always take priority since state is loaded later in the lifecycle.

Since I am embedding the JavaScript files as resources in the assembly, I use the overloaded constructor of ScriptReference, which takes the resource name and assembly name. This generates a reference to the embedded script resources in much the same way RegisterClientScriptResource did in the previous control implementation.

GetScriptDescriptors is the key to creating an instance of the client-side MsdnMagazine. SilverlightAjaxSphere class initialized with properties from the server-side control.

The ScriptControlDescriptor class takes the name of the client-side class and the ID of the associated client-side element in its constructor. I then use the AddProperty method of the class to specify the initial value of each property of the new client-side class. By passing in the current property values of my control, I ensure that the client-side class will be created with the current property values defined in my control.

I still need to take care of one last bit of housekeeping in an override of OnPreRender, where I register the control as a script control with the current ScriptManager on the page throwing an exception if there is no ScriptManager as well as with the script descriptors. This causes the ScriptManager to invoke the two methods of IScriptControl on the control to pull in the script references and create the initial client-side class.

I now have a complete server-side control that encapsulates Silverlight. The following declarations will create an instance of my new control on a page with the title text set to a custom string:. Two new ASP. Both these controls provide their own encapsulation of Silverlight, and both are built in much the same way as the sample I presented in the previous section. In fact, these were the inspiration for my control. It includes properties for the Silverlight plug-in creation, handling all the details of creating the plug-in and loading the XAML file.

The asp:Media control makes it easy to embed media content video or audio into an ASP. NET controls that encapsulate Silverlight. One of the intriguing features of the Media control is that it provides eight different skins which are XAML files that you can choose from to present your media—or you can design your own skin. Figure 8 shows an example of the Media control displaying a video using the Expression skin, like so:.

Another option for creating your own instrumented Silverlight server-side control is to derive from the asp:Xaml control directly and augment it with properties and methods in much the same way as I did in the second control implementation I described.

In the code download for this column, I've included another version of the SilverlightSphere control that inherits from asp:Xaml. Send your questions and comments for Fritz to xtrmasp microsoft. Fritz Onion is a co-founder of Pluralsight, a Microsoft. NET training provider, where he heads the Web development curriculum.

Fritz is the author of Essential ASP. NET 2. You can reach him at pluralsight. Skip to main content. This browser is no longer supported. Download Microsoft Edge More info.

Contents Exit focus mode. Using Silverlight Before I jump into the details of building a custom control to host Silverlight content, I should describe precisely what needs to be in place for Silverlight content to render to the client. Figure 1 Sphere. I use the following declarations to accomplish this where SlSphere is the name of the control project : [assembly: WebResource "SlSphere.

RegisterClientScriptResource this. GetType , "SlSphere. ClientID, this. Id, this. Don't forget. I can get the default page but none of the tests appear to be operating over the last several weeks. Sending SMS using vb. NET or not.

NET that XP came with. I've been looking for various softwares, and more and more often come across. NET version 2 being prerequisite. No urgency for me re. NET seems to be growing for me. Firstly, according to my limited research, newer.

NET versions are inclusive of the previous ones, and the current version seems to be 3. But I am getting "win32 exception unhandled error".

Please help me. Start psi Thanks in advance! Shwetha Tryu changing psi. What is the difference between microsoft. And are the advantages of. NET framework is the runtime environment that enables your code to run properly. If you have done C or Jave you will prefer C.

However most code samples you find on the net will be in VB. NET and C Web resources about - Difference between ASP. NET Find answers to many common questions in the Silverlight Forums with over , threads, 96, members from around the world.

In the past Silverlight Show: Silverlight Community - articles, news, tutorials, showcase, videos SilverlightShow - the continuously growing Silverlight community, providing you tons of Silverlight articles, news, samples, source code, videos, Microsoft Silverlight - Wikipedia, the free encyclopedia Microsoft Silverlight is an application framework for writing and running rich Internet applications , with features and purposes similar to Composition for extending, composing, and partitioning applications.

Silverlight Gal silverlightgal on Twitter Log in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor Netflix subscribers may soon be able to dump Silverlight plugin from Macs Netflix, which is using HTML5 video streaming to get its streaming movie and TV service working on low-cost Chromebooks , plans to test the same Firefox to block content based on Java, Reader, and Silverlight I would tend toward Silverlight since I'm quite experienced.

NET controls. You still have not written a proper description about the nature of your application. It is difficult to assess which technology is a good fit without first knowing well enough the domain the application is being applied to, and the problems it is designed to solve.

In general, Microsoft is positioning these array of presentation technologies on the " Reach vs Rich " continuum. You have "plain old" HTML and Javascript on one end, acceptable by the most number of client machines out there, and the ultimate full-blown WPF on the other side where limited number of machines can handle. Frankly if all you fetch are forms and tabular data and statistics then regular ASP. NET web forms are just fine. If you want on-the-fly resizable graphs and client-side interactive with back-end WCF web services Silverlight can do that.

If you want even more powerful graphical rendering than WPF via the remote deployment options is your bet. Silverlight 3 with RIA seems to be very powerful.

I hadn't programmed for 6 years after working on VB6. The silverlight forum and stackoverflow ofcourse are very active and for some of the problems that i've had had, I have been able to get a solution easily.

Both personally and professionally, I write C daily for Windows forms apps and Windows services. Maybe things have changed with Silverlight, but to me the learning curve on ASP.

NET is ridiculous compared to the payback. I find ASP. Don't forget Silverlight is going to require a plug-in to use, and to my knowledge it has not been "natively" added to IE, let alone the rest of the browsers. PDF files are considered "ubiquitous" by now, but you still run into a user or two that doesn't have Adobe Reader on their computer and it often occurs at a bad time and then you're scurrying around to get an installer.

At a fundamental level, this is what has kept me from doing Silverlight for my web apps. While you would have a slight learning curve, you'd be developing on a proven, reliable, scalable model rather than something thats in beta and will likely change before RTM.

I used Silverlight but a lot of companies are not allowing users to install anything also home users are not happy to install browser plugins, Silverlight is not so known as Flash player. It's hard to recommend one over the other without knowing what your application is.

Whatever you do decide, make sure you keep your target audience in mind; not everyone is going to have Silverlight installed on their computers. Personally, unless I was designing an incredibly interactive and beautiful web app, I would go with ASP. NET with or without the MVC framework if only for the fact that there is a ton of reference material for it while Silverlight is still relatively new territory. It is mainly going to be an iternal product so browsers are not an issue.

It's more about the price of development. Is it easier to learn Silverlight model or ASP. NET model? I expect that Silverlight is based on WebServices and so it might clearly divide my application code into a business logic service and presentation silverlight application.



0コメント

  • 1000 / 1000