I don't know for certain, but it would be a bit mental for MS to hype HTML5 all over the place and then NOT to fully implement it in their next browser.
So Mike (really enjoy your blog, btw), how would this work if you query a database in your *.cshtml files? Would the result set be cached? Should you query the db and save a local JSON file and reference that in the manifest? Does webmatrix have the ability
to save a recordset as a JSON file? I Found your blog post on using the JSON helper [http://www.mikesdotnetting.com/Article/160/WebMatrix-Working-With-The-JSON-Helper]
but I'm still fuzzy on how you'd cache the JSON object for use offline.
Rheinprinz
Member
13 Points
9 Posts
Creating HTML5 Offline Web Applications with ASP.NET Razor WEB Pages
Aug 22, 2011 03:10 PM|LINK
Hi,
I read this blog:
http://stephenwalther.com/blog/archive/2011/01/26/creating-html5-offline-web-applications-with-asp-net.aspx
My problem is the section "Creating a Manifest File in an ASP.NET Application". How can I do that with Razor WEB-Pages?
Mikesdotnett...
All-Star
154818 Points
19853 Posts
Moderator
MVP
Re: Creating HTML5 Offline Web Applications with ASP.NET Razor WEB Pages
Aug 22, 2011 04:40 PM|LINK
@{ Response.AddHeader("content-disposition", "attachment;filename=Manifest.txt"); Response.ContentType = "text/cache-manifest"; Response.WriteFile(Server.MapPath("Manifest.txt")); }Beginning ASP.NET Web Pages with WebMatrix | My Site | Twitter
Rheinprinz
Member
13 Points
9 Posts
Re: Creating HTML5 Offline Web Applications with ASP.NET Razor WEB Pages
Aug 22, 2011 05:07 PM|LINK
a blank site ("about:Blank") is shown. What can I do?Mikesdotnett...
All-Star
154818 Points
19853 Posts
Moderator
MVP
Re: Creating HTML5 Offline Web Applications with ASP.NET Razor WEB Pages
Aug 22, 2011 05:51 PM|LINK
You should have saved the code I posted as manifest.cshtml, and then referenced it in your default.cshtml by amending the <html> tag as follows:
Beginning ASP.NET Web Pages with WebMatrix | My Site | Twitter
Rheinprinz
Member
13 Points
9 Posts
Re: Creating HTML5 Offline Web Applications with ASP.NET Razor WEB Pages
Aug 22, 2011 06:32 PM|LINK
Mikesdotnett...
All-Star
154818 Points
19853 Posts
Moderator
MVP
Re: Creating HTML5 Offline Web Applications with ASP.NET Razor WEB Pages
Aug 22, 2011 07:00 PM|LINK
Firefox 6.0 asks you if you want to allow the site to use offline storage.
Beginning ASP.NET Web Pages with WebMatrix | My Site | Twitter
Rheinprinz
Member
13 Points
9 Posts
Re: Creating HTML5 Offline Web Applications with ASP.NET Razor WEB Pages
Aug 22, 2011 10:22 PM|LINK
Mikesdotnett...
All-Star
154818 Points
19853 Posts
Moderator
MVP
Re: Creating HTML5 Offline Web Applications with ASP.NET Razor WEB Pages
Aug 23, 2011 07:19 AM|LINK
I don't know for certain, but it would be a bit mental for MS to hype HTML5 all over the place and then NOT to fully implement it in their next browser.
Beginning ASP.NET Web Pages with WebMatrix | My Site | Twitter
cgann3k
Member
5 Points
7 Posts
Re: Creating HTML5 Offline Web Applications with ASP.NET Razor WEB Pages
Mar 22, 2012 08:07 PM|LINK
So Mike (really enjoy your blog, btw), how would this work if you query a database in your *.cshtml files? Would the result set be cached? Should you query the db and save a local JSON file and reference that in the manifest? Does webmatrix have the ability to save a recordset as a JSON file? I Found your blog post on using the JSON helper [http://www.mikesdotnetting.com/Article/160/WebMatrix-Working-With-The-JSON-Helper] but I'm still fuzzy on how you'd cache the JSON object for use offline.
Thanks in advance!
CG