|
|
我用了microsoft自身的例子:
<%@ Register TagPrefix="mobile" Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %>
<%@ Page language="c#" Codebehind="MobileWebForm1.aspx.cs" Inherits="MobileWebApplication.MobileWebForm1" AutoEventWireup="false" %>
<HEAD>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="C#">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/Mobile/Page">
</HEAD>
<body Xmlns:mobile="http://schemas.microsoft.com/Mobile/WebForm">
<mobile:Form runat="server" Wrapping="NoWrap" Paginate="true" ID="Form1">
<mobile ist id=" rimes" runat="server"></mobile:List>
</mobile:Form>
</body>
然后在页面的Page_Load事件里加入:
if (!IsPostBack)
{
// Find all primes between 1 and 500, using a sieve and
// ignoring even numbers greater than 2.
Primes.Items.Add(new MobileListItem("2"));
bool[] isCounted = new bool[501];
int i = 3;
while (i <= 500)
{
if (!isCounted)
{
Primes.Items.Add(new MobileListItem(i.ToString()));
for (int multiple = i * 3; multiple <= 500; multiple += i * 2)
{
isCounted[multiple] = true;
}
}
i += 2;
}
}
最后用openwave622调试程序,为什么在我点击下一页时,总提示error:malformed server response错误。
而在ie和mme3上调试都正确。 |
|