代码中,msgbox没有执行
问题描述,见下述粉色部分
Dim e As RequestEventArgs = args(0) '首页
Select Case e.Path
Case "index.htm"
Dim wb As New weui
With wb.AddTabBar("", "tb1", 1) '使用TabBar,增加4个按钮(注:页面可以增加,但不考虑)
.AddButton("bt1","首页","./images/a.png","http://www.foxtable.com")
.AddButton("bt2","记录","./images/b.png","http://www.foxtable.com")
.AddButton("bt3","设置","./images/c.png","http://www.foxtable.com")
.AddButton("bt4","我的","./images/d.png","/personal.htm")
.Attribute = "style='height:55px'"
End With
Dim username As String = e.cookies("isj") '从cookie取用户名(手机号)
Dim drs As List(of DataRow)
Dim dr As DataRow = DataTables("会员资料").sqlFind("手机 = '" & username & "'")
Dim xb As String '定义,性别(未登录)
For Each key As String In e.GetValues.Keys
If key = "sex" Then
xb = e.GetValues(key)
msgbox(xb) ’这个没有执行
End If
Next
If username IsNot Nothing Then
If dr("性别") = "男" Then '如果会员男生,则显示女生
drs = DataTables("会员资料").SQLSelect("[性别] = '女'") ',10,"发起_日期 DESC") '从订单表找,个人订单集合
ElseIf dr("性别") = "女" Then '如果会员是女生,则显示男生
drs = DataTables("会员资料").SQLSelect("[性别] = '男'") ',10,"发起_日期 DESC") '从订单表找,个人订单集合
ElseIf dr("性别") = "" Then '如果会员是男女为空,跳转到确认男女生页面
msgbox("请重新登录,并检查到会员中心-基本资料,检查性别是否存在!")
End If
Else
If xb ="1" Then '如果未登录,且是男生:展示女生
drs = DataTables("会员资料").SQLSelect("[性别] = '女'") ',10,"发起_日期 DESC") '从订单表找,个人订单集合
ElseIf xb = "0" Then '如果未登录,且是女生:展示女生
drs = DataTables("会员资料").SQLSelect("[性别] = '男'") ',10,"发起_日期 DESC") '从订单表找,个人订单集合
ElseIf xb = "" Then '如果未登录,且是男女生未知:进入确认男女生页面
wb.InsertHTML("<meta http-equiv='Refresh' c>") '这里正常跳转到index0.htm
'e.WriteString(wb.Build) '生成网页
End If
End If
********其他代码
e.WriteString(wb.Build) '生成网页
End Select
index.htm代码:
Dim e As RequestEventArgs = args(0)
Select Case e.Path
Case "index0.htm"
Dim wb As New weui
With wb.AddArticle("","ar1")
.AddImage("./images/langwo/logo1.jpg")
.Attribute = "style='padding:0em;'"
End With
wb.AddForm("","form1","index0.htm")
With wb.AddButtonGroup("form1","btg1",False)
.Add("btn1", "男生","","/index.htm?sex=1") '此处能正常跳转到index.htm页面
.Add("btn2", "女生","","/index.htm?sex=0").kind = 1
'.Attribute = "style='padding:0.5em;'"
End With
e.WriteString(wb.Build) '生成网页
End Select
[此贴子已经被作者于2017/4/4 15:47:53编辑过]