本文介绍了响应重定向帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 你好我试图使用响应重定向语句在从数据库中删除记录时显示消息 。我的数据库是通过 页面运行的,页面旁边有一个带删除选项的表。当单击删除 链接时,脚本会加载一个页面,其中包含一个立即的 response.redirect。这是delete_response 页面的代码。 <%Option明确%> <! - #include virtual =" \06Winter / levini / database / adovbs.inc" - > <! - #include file =" DatabaseConnect2.asp" - > < HTML> < center> <%Dim objRS,bolFound,CustID,intCustID CustID = Request.querystring(" CustID") intCustID = CInt(request(" CustID")) 设置objRS = Server.CreateObject(" ADODB.Recordset") objRS.Open" tblCustomerData",objConn,adOpenForwardOnly, adLockOptimistic,adCmdTable bolFound = False ''在表中查找CustID 请勿(objRS.EOF或bolFound) 如果( StrComp(objRS(" CustID"),CustID,vbTextCompare)= 0)然后 BolFound = True 否则 objRS.MoveNext 结束如果 循环 objRS.Delete objRS.Close 设置objRS = Nothing objConn 。关闭 设置objConn = Nothing response.redirect" ListCustomers.asp?StatusMessage = Customer ID" &请求(CustID)& "已成功删除。 %> < / BODY> < / HTML> 我想要做的是在我的主页上放一条消息,显示来自response.redirect提示符的 消息。如何创建消息 从阅读查询字符串 thanx获取帮助 isaac 解决方案 hello i am trying to use a response redirect statment to show a messageupon deletion of a record from a database. my database is ran though apage with a table with a delete option on the side. when the deletelink is clicked, the script loads a page that has a immediateresponse.redirect in it. here is that code for the delete_responsepage.<% Option Explicit %><!--#include virtual="\06Winter/levini/database/adovbs.inc"--><!--#include file="DatabaseConnect2.asp"--><HTML><center><% Dim objRS, bolFound, CustID, intCustIDCustID = Request.querystring("CustID")intCustID = CInt(request("CustID"))Set objRS = Server.CreateObject("ADODB.Recordset")objRS.Open "tblCustomerData", objConn, adOpenForwardOnly,adLockOptimistic, adCmdTablebolFound = False''look for CustID in tableDo While Not (objRS.EOF OR bolFound)If (StrComp(objRS("CustID"), CustID, vbTextCompare) = 0) ThenBolFound = TrueElseobjRS.MoveNextEnd IfLoopobjRS.DeleteobjRS.CloseSet objRS = NothingobjConn.CloseSet objConn = Nothingresponse.redirect "ListCustomers.asp?StatusMessage=Customer ID "& request("CustID") & " successfully deleted."%></BODY></HTML>what i want to do is put a message on my mainpage that displays themessage from the response.redirect prompt. how do i create a messagefrom reading the querystringthanx for the helpisaac 解决方案 这篇关于响应重定向帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 09-09 05:36