用户在“联系我们”页面发送消息后,我想写接受消息(不是消息框)。消息需要让他接受消息已发送给网站管理员......类似于:“您的请求已收到,我们将尽快与您联系”。但是我希望消息会写在网页上的好位置,或者清除表格并且消息会出现在页面的头部......我知道我可以重定向到新页面并在上面写这个消息但是我寻找一个优雅的解决方案...
asp.net 代码是:
@{
var db = Database.Open("MyProjectSite");
var name="";
var email="";
var message="";
var answer="";
Validation.RequireField("name","please insert your name");
Validation.RequireField("email","please insert your email");
Validation.RequireField("message","please insert your message");
Validation.RequireField("answer","please insert your answer");
if(IsPost)
{
name=Request.Form["your_name"];
email=Request.Form["your_email"];
message=Request.Form["your_message"];
var insertMessege="INSERT INTO messegesFromCustomers(name,email,content,isCustomer)"+"VALUES (@0,@1,@2,@3)";
db.Execute(insertMessege,name,email,message,"not customer yet");
db.Close();
}
}
我需要在我的代码中添加哪个代码才能出现接受消息?
谢谢..