I have an asp.net mvc project based on bootstrap which almost all the views are responsive. However is not possible to make it responsive for two of them. That is the reason why I make these two views with jQuery Mobile. But because of some limitation i decide to create them with Kendo UI, with jQuery mobile i create viewName.mobile.cshtml and it works fine whenever i visit my web application with mobile device and it renders appropriate view correctly.
when i start using kendo UI I figured out it is somehow different. the question is : it is possible to implement my senario with kendo UI?? or i should create kendo mobile application separately?
If it works with jQuery Mobile, it will work with Kendo to. Try using the Kendo Mobile for ASP.NET MVC here: http://www.kendoui.com/server-wrappers/mvc/mobile.aspx
Related
Im working on a single page ASP.NET MVC application. We are using Backbone.js + JQuery for client side UI and design. I need to put breadcrumbs for Backbone views(which are similar to pages in a forms based application). How to achieve this?
Thanks.
I think you can just use backbone. It does not matter if you're using ASP on the server. There are plenty of ways to do it. You can place a property in your views that relates to the breadcrumb and then just use it when you render.
If your urls are easily readable you can just parse the url and use that.
I currently converted my website from classic asp to ASP.NET MVC, I'll be putting it live in a few days. I'm now thinking that I should start supporting mobile device.
I was wondering if this could be a good idea to do things.
Have the same model
Have the same controller
Have two different view and chose the right one using Request.Browser.IsMobileDevice
One view for mobile display, one view for everything else.
This way I could keep the same URL.
Is this a good way of doing things?
Scott Hanselman blogged about this. He illustrated an example of how you could build a custom view engine which depending on the user agent would render a view situated in a different folder. This way you could have the same Model and Controller but different views.
And this functionality will be built-in out-of-the-box in ASP.NET MVC 4.
For the HTML, CSS, and JS, check out Bootstrap and jQuery Mobile. For Bootstrap, check out this link, scroll down to responsive utility classes and resize your screen.
They are other frameworks out there too that allow you to do similar things as bootstrap as well.
I have an ASP.NET MVC application which uses plain HTML. I quickly need to add tabs and a datagrid to it. I've been evaluating ASP.NET AJAX and jQuery, but am running out of time to make a decision.
If I needed to add these 2 features quickly, how should I proceed? ASP.NET AJAX or jQuery?
If you are adding a grid to MVC, your best bet is JQuery. The ASP.NET DataGrid is not going to work with MVC, because MVC doesn't support postbacks. The ASP.NET AJAX tabs may not work either.
Here is a plugin for the tabs:
http://stilbuero.de/jquery/tabs_3/
And here is a plugin for the Grid:
http://www.trirand.com/blog/
If you want to roll-your-own server-side GridView control for MVC, see here:
http://stephenwalther.com/blog/archive/2008/06/25/asp-net-mvc-tip-9-create-a-gridview-view-user-control.aspx
There is also a Grid Component in MVCContrib:
http://mvccontrib.codeplex.com/Wiki/View.aspx?title=Grid&referringTitle=Home
jQuery UI Extensions for ASP.NET MVC contains tabs:
http://jmvcui.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=33636
How suitable is ASP.NET MVC for developing anything like
http://www.google.com/ig?
I haven't seen or failed to find any examples yet. Does the MVC approach imply that the user interface is not supposed to look like that?
Check out http://aspspider.info/lakkakula/local.aspx, it is Web 2.0 Portal developed using Asp.Net MVC 1.0, Microsoft Ajax Client Templates and jQuery with drag and drop widget personalization much like google.com/ig.
MVC is quite suitable for such a UI. Your main controller can render with a list of the widgets the user has defined, or an ajax call to a method returning a JsonResult can be used... this can generate the wrappers client-side calling for each partial vie for the corresponding controls. I would think that MVC would simplify things quite a bit.
MVC + jQueryUI would be about all you'd need...
I guess a little bit more clarification, what exactly do you mean by "suitable"?
One method might be for each available "widgit" to be a controller, and then you can use jQuery (or whatever you want) to call the specified method and render. The page would then have a series of "lists" (which you can store in the DB) against the user and you can simply order those lists to display the relevant widgits in the correct order.
Obviously, that's a VERY large simplification....
See the tutorial Developing Web 2.0 Portal using ASP.NET MVC, Microsoft Ajax Client Templates and jQuery with drag and drop widget personalization.
One of the things I like about coding "old skool" (web forms) is the AJAX Control Toolkit.
I saw on the Microsoft Storefront video 14, Rob Conery uses the TextboxWatermark control.
When I downloaded the code though, I couldn't find any reference to the Watermark control or any other control from the toolkit nor could I get it to work.
So my question is, does the AJAX Control Toolkit even work in an MVC / AJAX / JQuery type world without viewstate. What do you use for "simple" controls such as Calendar & Watermarks?
jQuery UI has a calendar and other UI components. Also check out the vast number of jQuery plugins.
I've been looking into this question recently and what I've found is that the AJAX Control Toolkit is not easy to use in the "JavaScript only" manner that you'd want to use for ASP.NET MVC. In fact it's a real pain. Here are two examples:
Example 1 - Popup Calendar
Example 2 - Auto Complete Text Field
Neither are easy.
You can give your MVC pages a code-behind and use the AJAX Control Toolkit as you would in regular ASP.NET, but that really violates the whole idea of MVC, so I wouldn't advise it.
My suggestion would be to follow Fredrik Kalseth's advice and use jQuery UI or one of the many plugins. Telerik also has some good looking Open Source MVC Controls that are based on jQuery.
Most of the AJAX Control Toolkit is available in MVC-friendly javascript form off the MS AJAX CDN. These can be used using a jquery plug-in syntax as well.