手机
当前位置:查字典教程网 >编程开发 >asp.net教程 >asp.net直接Response输出WML页面示例代码
asp.net直接Response输出WML页面示例代码
摘要:复制代码代码如下:protectedvoidPage_Load(objectsender,EventArgse){Response.Cont...

复制代码 代码如下:

protected void Page_Load(object sender, EventArgs e)

{

Response.ContentType = "text/vnd.wap.wml";

StringBuilder builder = new StringBuilder();

builder.AppendLine("<?xml version="1.0" encoding="UTF-8" ?>");

builder.AppendLine("<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN" "http://www.wapforum.org/DTD/wml12.dtd">");

builder.AppendLine("<wml>");

builder.AppendLine("<head>");

builder.AppendLine("<meta http-equiv="Cache-Control" content="max-age=0" />");

builder.AppendLine("</head>");

builder.AppendLine("<card title="公开信息查阅中心">");

builder.AppendLine("<p><img src="images/logo.png" alt="公开信息查阅中心" /><br/>");

builder.AppendLine("<a href="" title="新闻动态">新闻动态</a>|<a href="Department.aspx" title="部门机构">部门机构</a><br/>");

builder.AppendLine("<a href="" title="档案文件">档案文件</a>|<a href="" title="最新文件">最新文件</a><br/>");

builder.AppendLine("");

builder.AppendLine(" </p></card>");

builder.AppendLine("</wml>");

Response.Write(builder.ToString());

Response.End();

}

【asp.net直接Response输出WML页面示例代码】相关文章:

asp.net连接数据库读取数据示例分享

asp.net 网页编码自动识别代码

asp.net 文章内容分页显示的代码

asp.net文件上传示例

asp.net下定制日期输出格式的代码

asp.net输出重写压缩页面文件实例代码

asp.net 多字段模糊查询代码

asp.net发送邮件示例分享

asp.net HttpWebRequest自动识别网页编码

asp.net中WebResponse 跨域访问实例代码

精品推荐
分类导航