great work, looking fwd to future enhancements. thought I'd add one of my own as this cropped up today. I needed to use a partial view and kept getting the website version coming in. I then realised that I needed to add the findpartialview override as well. I'm gonna add this into the Q&A section in case this is required by anyone else.
Thanks Jim. I am actually working on some helper methods to simplify creating Grid input types and other jQuery Mobile controls. All will be published once completed.
Hi Sammy first of all I would like to say you thanks for creating template for VS 2010 ,nice job...
I am wondering that once you program your app(with asp.net) are you aware of any option to convert it to native app
I heard phone gap and other tools convert html and JavaScript to native app, so I wondered about a possibility if you know about it than please share....
I was also wondering if anyone knows a solution to 'convert' an asp.net MVC (4/jquerymobile) project to an native app. Just like phonegap is doing with html/javascript. Please help.
Hello,
I can´t create a project . I have the error "The Project type is not supported by this installation" .
I have Visual Studio 2010 Ultimate - 10.0.40219.1 SP1Rel .
I need install any more?
Thank you in advance.
Best Regards,
Walter
I haven't installed this yet, however, it sounds like you might need the "Web Standards Update":
http://visualstudiogallery.msdn.microsoft.com/a15c3ce9-f58f-42b7-8668-53f6cdc2cd83
For anyone receiving "The Project type is not supported by this installation", make sure you have installed the latest ASP.NET MVC 3 Tools Update. I was getting the error after a fresh install of VS2010 Ultimate and this solved my problem:
http://www.microsoft.com/download/en/details.aspx?id=1491
The @RenderSection("Scripts", false) in the layout doesn't load a view page's script section when Ajax is enabled. Are there any workarounds other than disabling ajax support?
can you provide more details please? I am not sure what do you mean by Ajax is enabled.
How are you loading the view? are you using jQuery to load the view?
If you are trying to render a section from a partial view to the parent view then the answer is cant do that without writing a helper or use a work around http://stackoverflow.com/questions/5355427/populate-a-razor-section-from-a-partial
@Ajax.ActionLink("Ajax call","AjaxTest", new AjaxOptions{ Confirm="Are you sure?", InsertionMode= InsertionMode.InsertBefore, UpdateTargetId="theTarget"})
public ActionResult AjaxTest()
{
//will fail to render the section
return PartialView ();
//will return the view with the section included.
return View();
}
My @section Scripts is in a regular view, not a partial view. If I go to the layout file for the mobile site and change the $.mobile.ajaxEnabled to false it works. When the ajaxEnabled is set to true, my @section does not seem to propagate to the @RenderSection("Scripts", false). It loads the view but the scripts are not loaded.
I just tested and all my scripts rendered with and without ajax enabled.
to test, return true from IsSupportedMobileDevice in the ApplicationHelper.cs
browser the site in firefox, chrome or IE and you will see the scripts rendering.
Sammy
Hi. Thnx for the great template. However, when i debug the application, IE9 shows the desktop version of the webpages and the Air Phone should show the M version. The Air Phone however shows the desktop version as well en not the M version of the views. I configured exactly as shown in the demo video. Any idea what i missed? Kind Regards, Roger
Really great template. I thoroughly enjoy using it. Would you mind updating it to the latest versions of the scripting libraries?
jQuery is at 1.7, jQuery mobile is at RC2, and the jQueryUI is at 1.8.16 now, others may need updating too.
For the jQuery mobile library, you can ensure the template has the latest version by using this CDN: http://code.jquery.com/mobile/latest/jquery.mobile.min.js. Others may have a similar link structure, but not sure.
Thanks,
Baron
hello, first of all great work! .
I'm writing here because the site does not work SammyAgeil.com .
I have a problem when I navigate to about view. The $(document).ready isn't executed .
I can't find information on how to solve that or any alternative .
Will surely know what I mean and how I can fix.
Thank you in advance...
Walter
jQuery mobile doesn't have a function called document.ready. for an alternative look here
http://stackoverflow.com/questions/5622581/jquery-mobile-document-ready-equivalent
Hi I've used your App for an Iphone Web Application, and find it very useful, Nevertheless, I've tried adding a simple char via a Chart helper (<img src="@Url.Action("MyChart")" alt="SimpleChart" />), but it doesn't show in Iphone or Ipad.
It is very weird because it shows in safari, Internet Explorer and Firefox.
Do you know what could be wrong?
Thanks
Full code Below:
Home Controller:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Helpers;
namespace MVCMobile1.Controllers
{
public class HomeController : Controller
{
public ActionResult Index()
{
ViewBag.Message = "Welcome to ASP.NET MVC!";
return View();
}
public ActionResult About()
{
return View();
}
public ActionResult MyChart()
{
var bytes = new Chart(width: 400, height: 200)
.AddSeries(
chartType: "bar",
xValue: new[] { "Math", "English", "Computer", "Urdu" },
yValues: new[] { "60", "70", "68", "88" })
.GetBytes("jpeg");
return File(bytes, "image/jpeg");
}
}
}
Index.chstml:
@{
ViewBag.Title = "Home Page";
}
<section class="content">
<header>
<h2>@ViewBag.Message</h2>
</header>
<img src="@Url.Action("MyChart")" alt="SimpleChart" />
<p>
Be Creative!!
</p>
</section>
The template has nothing to do the chart, look into your chart object and see how its being parsed to the view.
You can use firebug to debug the output and take it from there.