本例实现直接Response输出WML页面,具体代码如下,有需要的朋友可以和参考下
复制代码 代码如下:
protected void Page_Load(object sender, EventArgs e)
{
Response.ContentType = "text/vnd.wap.wml";
StringBuilder builder = new StringBuilder();
builder.AppendLine("<?xml version=https://www.jb51.net/article/\"1.0\" encoding=https://www.jb51.net/article/\"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=https://www.jb51.net/article/\"Cache-Control\" content=https://www.jb51.net/article/\"max-age=0\" />");
builder.AppendLine("</head>");
builder.AppendLine("<card title=https://www.jb51.net/article/\"公开信息查阅中心\">");
builder.AppendLine("<p><img src=https://www.jb51.net/article/\"images/logo.png\" alt=https://www.jb51.net/article/\"公开信息查阅中心\" /><br/>");
builder.AppendLine("<a href=https://www.jb51.net/article/\"https://www.jb51.net/article/\" title=https://www.jb51.net/article/\"新闻动态\">新闻动态</a>|<a href=https://www.jb51.net/article/\"Department.aspx\" title=https://www.jb51.net/article/\"部门机构\">部门机构</a><br/>");
builder.AppendLine("<a href=https://www.jb51.net/article/\"https://www.jb51.net/article/\" title=https://www.jb51.net/article/\"档案文件\">档案文件</a>|<a href=https://www.jb51.net/article/\"https://www.jb51.net/article/\" title=https://www.jb51.net/article/\"最新文件\">最新文件</a><br/>");
builder.AppendLine("");
builder.AppendLine(" </p></card>");
builder.AppendLine("</wml>");
Response.Write(builder.ToString());
Response.End();
}
您可能感兴趣的文章:
相关文章
最新评论
站长推荐 正版Windows 10 家庭/专业版,操作系统限时抢购[¥1088→¥248] 站长推荐 Microsoft Office 2016/2019/365 正版最低价仅需[ ¥148元]
大家感兴趣的内容
最近更新的内容
常用在线小工具