域名登记查询(whois)很复杂吗--方法二

来源:网络 作者:佚名 阅读: 字体:[ ] [打印] [关闭]
自定义标签 wzsp 未创建

内容提要:voodoo发表于 2000-06-03 22:42:07%@ Language=VBScript % HTML HEAD META NAME='GENERATOR' Content='Microsoft Visual Studio 6.0' /HEAD BODY form action=whois.asp method=post 域名:wwwB./B INPUT size=8 nam ……

Shows how to perform a search with a WAP page and use ASP on the server to do the database query and then
display the results.


<%Response.ContentType = "text/vnd.wap.wml"%>
<?xml version="1.0"?><!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML
1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<%  
    Dim conn, rs  
    Dim strSQL,strFirstName, strLastName  
    Set conn = Server.CreateObject("ADODB.Connection")
    Set rs   = Server.CreateObject("ADODB.Recordset")

    conn.open session("myconnect_string") ''Replace with your connect string  

    strWhoIs = Request.QueryString("username")
    if strWhoIs="" then
%>
    <card id="UserSearch" title="Search">  
       <p>
          Please enter username to find? <input name="username" type="text" maxlength="15"/>
             <do type="accept" label="Locate">
                <go href="thispage.asp" method="get">
                   <postfield name="username" value="$username"/>
                </go>
             </do>     
       </p>
    </card>
<%
    else
strSQL = "SELECT * FROM tblUsers WHERE Username =''& strWhoIs & ''"
Set rs = conn.Execute(strSQL)
      
%>  <card id="UserResult" title="Result">
         <p>            
<%
          if not rs.EOF then
           rs.MoveFirst
              Response.Write "<strong>User Search Results</strong>"
              While not rs.EOF
                 strFirstName = "First Name " & rs("FirstName")
                 strLastName = "Last Name " & rs("LastName")
                 Response.Write strFirstName
                 Response.Write strLastName
                 rs.MoveNext          
              Wend
          else
              Response.Write "Sorry, no user found."
          end if
%>
         </p>
       </card>
<%
    end if
%>
</wml>

[标签: 域名登记查询(whois)很复杂吗--方法二, ] [打印] [关闭]
上一篇:[ASP编程]
下一篇:ASP基础
站长评论(0) 查看所有评论
相关新闻

热门新闻

推荐新闻