高分请教有关WebBrowser的使用方法
本人使用WebBrowser的Navigator或者Navigator2方法打开一个asp文档并且传递参数进去,但是asp文档无法获得参数,请教是什么原因?
vb源码:
Private Sub cmdSubmit_Click()
Dim strURL As String, strFormData As String
Dim strData As String
strURL = Trim$(txtURL.Text)
strFormData = "name=" & Trim$(txtName.Text) & "&password=" & Trim$(txtPassword.Text)
Call WBTest.Navigate2(strURL, 64, "_blank", strFormData, "hello")
End Sub
asp源码:
<%@ Language=VBScript %>
<%
dim strName
dim strPassword
strName=Trim(Request.Form("name"))
strPassword=Trim(Request.Form("password"))
Response.Write(strName)
Response.Write(strPassword)
if strName="KingZhang" and strPassword="123456" then
Response.Write("<font color=green>登陆成功</font>")
else
Response.Write("<font color=red>非法登陆用户!</red>")
end if
%>
<HTML>
<HEAD>
<META NAME="GENERATOR" charset="gb2312" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
<P> </P>
</BODY>
</HTML>