首 页WAP教程WAP源码WAP电子书客户留言龙腾电脑维修网158网络电视本站论坛繁體中文
设为首页
加入收藏
联系我们
您当前的位置:WAP开发网 -> WAP教程 -> ASP WAP开发教程 -> 文章内容 退出登录 用户管理
栏目导航
· ASP WAP开发教程 · ASP.net WAP开发教程
· PHP WAP开发教程 · WML教程
· JSP开发WAP教程 · WAP 2.0
· 综合杂谈
热门文章
· WAP 2.0教程
· WML语言基础(WAP建站...
· 用VS2005实现ASP.NE...
· [组图] php WAp开发教程
· WML语言基础(WAP建站...
· VS.NET 2003开发移动...
· [图文] ASP技术进行动态WAP...
· [图文] WML语言基础(WAP建站...
· asp.net移动控件开发...
· [图文] 创建移动Web应用程序...
相关文章
· [图文] ASP.NET移动开发之S...
· ASP.NET 2.0移动开发...
· [图文] ASP技术进行动态WAP...
· ASP.NET 移动 Web 窗...
· asp.net移动控件开发...
· ASP.NET 2.0移动开发...
· Wap页面使用asp.net...
· ASP.NET 2.0移动开发...
· ASP.NET 2.0移动开发...
· asp WAP获取手机终端...
在WAP网站上建立反馈表单
作者:不详  来源:本站整理  发布时间:2006-3-13 16:31:56  发布人:tangyunfei

减小字体 增大字体


For any one person to create a web site and then think it is perfect, is ridiculous. It is important to
allow the visitors of our web sites to comment on what we have developed so that we can learn from the end-
user, our mistakes and not to mention the overall effectiveness. We create these facilities for web sites
so why not create them for our WAP sites.

A feedback form is developed by first creating the form, in this case to capture the end-user's comments,
and second to create the SendMail code, which will be used to send the comments via e-mail to us. As
always if you have any other problems with ASP/WML then you can e-mail me at michael_wright@lineone.net.
Also if you are a company supervisor, manager or director I am always looking for work, whether it be
working remotely or on-location. Please feel free to e-mail the same address.

First we create the feedback form itself. Please remember to change the red capital letters within the
code.

<% 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>

<!-- THIS IS THE FIRST CARD IN THE DECK -->

<card id="mainCard">

<p align="left"><small><b>Your Feedback</b></small></p>

<p align="left">Please enter your email address <input type="text" name="txtFrom" format="*M"/>

Please enter your feedback <input type="text" name="txtMessage" format="*M"/></p>

<do type="accept" label="Submit!"><go href="email.asp" method="post"><postfield name="txtFrom"
value="$txtFrom"/><postfield name="txtMessage" value="$txtMessage"/></go></do>

<p align="left"><small><a href="LOCATION OF YOUR MAIN WAP PAGE">Back</a></small></p>

</card>

</wml>

Now save that code as a file called feedback.asp. Then we must create the SendMail code. This SendMail
code can only be used if you have the ASPMail component installed on your web server. It is possible to
simply change the ASP code in conjunction with your own component e.g. CDONTS.

<% Response.ContentType = "text/vnd.wap.wml" %><xml version="1.0">

<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">

<wml>

<card id="mainCard" title="Send Feedback">

<p><small><b>Your Feedback</b></small></p>

<%

sstrToName = "YOUR NAME"

sstrToAddr = "YOUR EMAIL ADDRESS"

Set Mailer = CreateObject("SMTPsvg.Mailer")

Mailer.RemoteHost = "SMTP MAIL SERVER"

Mailer.FromAddress = Request.Form("txtFrom")

Mailer.AddRecipient sstrToName, sstrToaddr

Mailer.Subject = "SUBJECT OF FEEDBACK EMAIL"

Mailer.BodyText = Request.Form("txtMessage")

If Mailer.SendMail Then

Response.Write "<p><small>Mail has been sent...</small></p>"

else

Response.Write "<p><small>Mail send failure. Error was " & Mailer.Response &"</small></p>"

end if

%>

<p align="left"><small><a href="LOCATION OF YOUR MAIN WAP PAGE">Back to Menu</a></small></p>

</card>

</wml>

Now save that code as a file called email.asp and you are ready to test it. I hope you found this article
helpful. One of the main problems I had when creating this code was the way in which the WAP input is
recognised by the ASP code i.e. You must either use Request.Form("txtFrom") or Request.QueryString
("txtFrom") and not just Request("txtForm").

[] [返回上一页] [打 印] [收 藏]
上一篇文章:用ASP发 WAP MAIL(-)
下一篇文章:WAP 技术
∷相关文章评论∷    (评论内容只代表网友观点,与本站立场无关!) [更多评论...]
关于本站 - 网站帮助 - 广告合作 - 下载声明 - 友情连接 - 网站地图 - 管理登录
Copyright © 2002-2005 wapkf.com. All Rights Reserved .
浙ICP备06013604号|站长QQ:274273595