日期:2014-05-17  浏览次数:20911 次

用select case ...可以写不同的表单吗?
我想用select   case   ...在一个页面根据不同的case值写不同的表单,这应该怎样才能实现呢?下面是我写的文件:
<%@LANGUAGE= "VBSCRIPT "   CODEPAGE= "936 "%>
<html>
<head>
<meta   http-equiv= "Content-Type "   content= "text/html;   charset=gb2312 ">
<title> 后台用户管理 </title>
<!--#include   file= "conn1.asp "-->
</head>

<body>
<table   width= "780 "   border= "0 "   align= "center "   cellpadding= "0 "   cellspacing= "1 "   bgcolor= "#CCCCCC ">
    <tr>
              <td   align= "center "   valign= "top "   bgcolor= "#FFFFFF ">
<%dim   action
    action=request.QueryString( "action ")
    select   case   action
   
    case   edit
    dim   rs,sql
    set   rs=server.CreateObject( "adodb.recordset ")
    sql= "select   *   from   admin   where   name= ' "&request.QueryString( "name ")& " ' "
    rs.open   sql,conn,1,1
    %>
    <form   action= "saveEditUser.asp "   name= "form1 ">
    <table   width= "500 "   border= "0 "   cellspacing= "1 "   cellpadding= "0 "   bgcolor= "#99CCFF ">
                <tr   class= "kind ">
                    <td   colspan= "2 "   align= "center "> 修改后台用户 </td>
                    </tr>
                <tr   class= "kind ">
                    <td   width= "150 "   align= "center "> 用户名 </td>
                    <td   width= "343 "> <input   name= "user "   type= "text "   size= "20 "   maxlength= "50 "   value= " <%=rs( "name ")%> "> </td>
                </tr>
                <tr   class= "kind ">
                    <td   align= "center "> 密&nbsp;&nbsp;码 </td>
                    <td> <input   name= "pwd "   type= "password "   size= "20 "   maxlength= "50 "   value= " <%=rs( "pwd ")%> "> </td>
                </tr>
                <tr   class= "kind ">
                    <td   align= "center "> 用户级别 </td&