asp.net mvc 2 - View is blank even though Firebug sees HTML -


my master page looks this:

<%@ master language="c#" inherits="system.web.mvc.viewmasterpage" %>  <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">  <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server">     <link rel="stylesheet" href="../../content/css/jquery.mobile-1.0a4.1.min.css" />     <script src="../../scripts/jquery-1.5.1.min.js"></script>     <script src="../../scripts/jquery.mobile-1.0a4.1.min.js"></script>      <title>test</title> </head> <body>     <div>         <asp:contentplaceholder id="maincontent" runat="server">          </asp:contentplaceholder>     </div> </body> </html> 

and view looks this:

<%@ page title="" language="c#" masterpagefile="~/views/shared/mobile.master" inherits="system.web.mvc.viewpage<dynamic>" %>  <asp:content id="content1" contentplaceholderid="maincontent" runat="server">     <p>hello mobile land</p> </asp:content> 

firebug shows html:

<html xmlns="http://www.w3.org/1999/xhtml" class="ui-mobile ui-mobile-rendering landscape ui-loading min-width-320px min-width-480px min-width-768px min-width-1024px"><head><meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1"><base href="http://localhost:2189/home/mobilehome"><link href="../content/css/jquery.mobile-1.0a4.1.min.css" rel="stylesheet">     <script src="../../scripts/jquery-1.5.1.min.js"></script>     <script src="../../scripts/jquery.mobile-1.0a4.1.min.js"></script>      <title>     test    </title></head> <body>     <div>      <p>hello mobile land</p>      </div>   </body></html> 

so i'm trying figure out why can't see on screen?

jquery mobile requires html markup contained within data-role attributes, otherwise won't render them.

the anatomy of mobile page this:

<div  data-role="page">      <div  data-role="header">...</div>      <div  data-role="content">...</div>      <div  data-role="footer">...</div>  </div>  

if put <p> tag within above, work. that's how jquery mobile builds page. if include mobile scripts, it's going try , every time.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -