I would like to build a client side form of user information. Can I use for validation both technologies as Silverlight and ajax? Does it not infects each other in any way开发者_JS百科? What about javascript? Can I use all technologies on one page or its better to choose just one of them. Working with asp.net mvc.
Technically you can use whatever you want together.
In my opinion it is good to use HTML5/javascript (webSocket. .. instead of Ajax) and forget about Silverlight.
Your question doesn't really make a lot of sense.
You're comparing apples and oranges... Silverlight is a whole user interface technology, (and asp.net mvc is as well) but Ajax is only a small subset of a user interface technology. You can use ajax to do calls in an mvc application (or any other UI framework based on html), but Silverlight provides an api to do calls to the server (it's technically almost the same as ajax, but it isn't called ajax).
So when you build your client side form using an mvc view (so using html in the end), you can use ajax to do your (client side) validation. This is not required, as the validation should also happen on the server.
When you use Silverlight to build your client side form, you use the methods built into Silverlight to do your validation. This is also client validation (as Silverlight is a "client side" technology). When your Silverlight application posts data back to the server (using a technology built into Silverlight, probably WCF), your server side "services" should also validate the input!
I see one option where you'd want to use Silverlight inside an asp.net mvc application: for example when you would want to display a media player based on Silverlight (to embed a movie in a web page for example). Just like you would with Flash when you embed a YouTube movie on a page.
精彩评论