源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

asp.net直接Response输出WML页面示例代码

  • 时间:2021-03-28 14:05 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:asp.net直接Response输出WML页面示例代码
[u]复制代码[/u] 代码如下:
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(); }
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部