| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 524 人关注过本帖
标题:asp提交后不显示内容
只看楼主 加入收藏
hao17000
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2012-2-9
结帖率:0
收藏
已结贴  问题点数:20 回复次数:2 
asp提交后不显示内容
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="Connections/yinyue.asp" -->
<%
Dim MM_editAction
MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString <> "") Then
  MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString)
End If

' boolean to abort record edit
Dim MM_abortEdit
MM_abortEdit = false
%>
<%
If (CStr(Request("MM_insert")) = "form1") Then
  If (Not MM_abortEdit) Then
    ' execute the insert
    Dim MM_editCmd

    Set MM_editCmd = Server.CreateObject (")
    MM_editCmd.ActiveConnection = MM_yinyue_STRING
    MM_ = "INSERT INTO yinyue (music_name, singername, music_type, music_url) VALUES (?, ?, ?, ?)"
    MM_editCmd.Prepared = true
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1, 50, Request.Form("music_name")) ' adVarWChar
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 202, 1, 50, Request.Form("singername")) ' adVarWChar
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param3", 202, 1, 50, Request.Form("music_type")) ' adVarWChar
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param4", 202, 1, 50, Request.Form("music_url")) ' adVarWChar
    MM_editCmd.Execute
    MM_editCmd.ActiveConnection.Close

    ' append the query string to the redirect URL
    Dim MM_editRedirectUrl
    MM_editRedirectUrl = "liebiao.asp"
    If (Request.QueryString <> "") Then
      If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then
        MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
      Else
        MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
      End If
    End If
    Response.Redirect(MM_editRedirectUrl)
  End If
End If
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>

<body>
<form action="<%=MM_editAction%>" method="POST" enctype="multipart/form-data" name="form1" id="form1">
  <table width="50%" border="0" align="center" cellpadding="2">
    <tr>
      <td width="25%"><div align="right">歌曲名:</div></td>
      <td width="75%"><input name="music_name" type="text" id="music_name" size="30" /></td>
    </tr>
    <tr>
      <td><div align="right">歌手名:</div></td>
      <td><input name="singername" type="text" id="singername" size="30" /></td>
    </tr>
    <tr>
      <td><div align="right">音乐类型:</div></td>
      <td><input name="music_type" type="text" id="music_type" size="10" /></td>
    </tr>
    <tr>
      <td><div align="right">音乐路径:</div></td>
      <td><input name="music_url" type="file" id="music_url" size="30" /></td>
    </tr>
    <tr>
      <td><div align="right"></div></td>
      <td><input type="submit" name="button" id="button" value="提交" />
      <input type="reset" name="button2" id="button2" value="重置" /></td>
    </tr>
  </table>

  <input type="hidden" name="MM_insert" value="form1" />
</form>
</body>
</html>
图片附件: 游客没有浏览图片的权限,请 登录注册
图片附件: 游客没有浏览图片的权限,请 登录注册
搜索更多相关主题的帖子: asp record insert include Request 
2012-02-09 17:12
hao17000
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2012-2-9
收藏
得分:0 
怎么没回答的啊
2012-02-09 17:18
kangli_kl
Rank: 6Rank: 6
等 级:侠之大者
威 望:2
帖 子:134
专家分:489
注 册:2008-4-5
收藏
得分:20 
MM_editAction 是个什么页面?

求上而得中,求中而得下。
2012-02-10 10:35
快速回复:asp提交后不显示内容
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.025574 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved