主题:  ASP.NET Mobile 的问题

truelove

职务:普通成员
等级:1
金币:0.0
发贴:128
注册:2002/6/12 17:51:54
#12005/3/14 13:27:37
<%@ Page Inherits="Microsoft.Matrix.Framework.Mobile.UI.MobilePage, Microsoft.Matrix.Framework.Mobile, Version=0.6.0.0, Culture=neutral, PublicKeyToken=6f763c9966660626" Language="VB" Debug="true" %>
<%@ Register TagPrefix="Mobile" Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %>
<%@ import Namespace="system.data" %>
<%@ import Namespace="system.data.oledb" %>
<script runat="server">

Sub Command1_Click(sender As Object, e As EventArgs)

dim dsn as string="provider=microsoft.jet.oledb.4.0;data source=" & server.mappath("db1.mdb"
dim conn as oledbconnection=new oledbconnection(dsn)
dim strsql as string="select * from admin where username='"& textbox1.text &"' and password='"& textbox2.text &"'"
dim my_dataset as dataset=new dataset()
dim my_oledbdataadapter as new oledbdataadapter(strsql,conn)
my_oledbdataadapter.fill(my_dataset,"admin"
if my_dataset.tables("admin".rows.count=0 then
activeform=error_form
else
session("username"=my_dataset.tables("admin".rows(0).item("username"
dim path as string="main.aspx"
RedirectToMobilePage(path)
end if

End Sub

</script>
<p>
<mobile:Form id="Form1" runat="server">
<Mobile:Label id="Label1" runat="server" Alignment="Center" Font-Bold="True">欢迎您登录梦网首页</Mobile:Label>
<br />
帐号:<Mobile:TextBox id="TextBox1" runat="server" MaxLength="10" Size="10"></Mobile:TextBox>
<br />
密码:
<Mobile:TextBox id="TextBox2" runat="server" MaxLength="10" Size="10" Password="True"></Mobile:TextBox>
<br />
<Mobile:Command id="Command1" onclick="Command1_Click" runat="server" Alignment="Center">OK</Mobile:Command>
</mobile:Form>
</p>
<p>
<Mobile:Form id="error_form" runat="server">
<Mobile:Label id="Label2" runat="server">用户名或密码错误!</Mobile:Label>
<Mobile:Link id="Link1" runat="server" Alignment="Center" NavigateUrl="#Form1">返回</Mobile:Link>
</Mobile:Form>
</p>

此学习例题在IE 6.0以及 UP.SDK 4.0中能够正常调试,但在Openwave sdk 6.2.2中却提示 error:malformed server response ,不知道是什么原因,盼高手指点.