asp.net直接Response輸出WML頁(yè)面示例代碼
更新時(shí)間:2013年08月28日 15:53:21 作者:
本例實(shí)現(xiàn)直接Response輸出WML頁(yè)面,具體代碼如下,有需要的朋友可以和參考下
復(fù)制代碼 代碼如下:
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=\"公開(kāi)信息查閱中心\">");
builder.AppendLine("<p><img src=\"images/logo.png\" alt=\"公開(kāi)信息查閱中心\" /><br/>");
builder.AppendLine("<a href=\"\" title=\"新聞動(dòng)態(tài)\">新聞動(dòng)態(tài)</a>|<a href=\"Department.aspx\" title=\"部門(mén)機(jī)構(gòu)\">部門(mén)機(jī)構(gòu)</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.ContentType類型匯總
- asp.net 頁(yè)面轉(zhuǎn)向 Response.Redirect, Server.Transfer, Server.Execute的區(qū)別
- asp.net 使用Response.Filter 過(guò)濾非法詞匯
- asp.net中Response.Redirect與Server.Transfer的區(qū)別分析
- ASP.NET筆記之 Request 、Response 與Server的使用
- ASP.NET之Response.Cookies.Remove 無(wú)法刪除COOKIE的原因
- asp.net中WebResponse 跨域訪問(wèn)實(shí)例代碼
- Asp.net response對(duì)象與request對(duì)象使用介紹
- Asp.net中Response.Charset與Response.ContentEncoding區(qū)別示例分析
- asp.net內(nèi)置對(duì)象 Response對(duì)象使用介紹
相關(guān)文章
asp.net(c#) RSS功能實(shí)現(xiàn)代碼
這兩天一邊從網(wǎng)上找資料,自己再測(cè)試,終于完成本站的RSS功能了!先自我恭喜下!!2008-11-11配置Visual Studio 以調(diào)試.net framework源代碼
看到.net框架代碼發(fā)布了,興奮了一下,把在Visual Studio 2008上配置的內(nèi)容翻譯了一下,只翻譯了原文的基本步驟,高級(jí)用戶篇和QA沒(méi)有翻譯。2009-04-04asp.net mvc 動(dòng)態(tài)編譯生成Controller的方法
本篇文章主要介紹了asp.net mvc 動(dòng)態(tài)編譯生成Controller的方法,具有一定的參考價(jià)值,有興趣的可以了解一下2017-08-08MVC使用MvcPager實(shí)現(xiàn)分頁(yè)效果
這篇文章主要為大家詳細(xì)介紹了MVC使用MvcPager實(shí)現(xiàn)分頁(yè)效果,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2022-03-03.Net Core自動(dòng)化部署之利用docker版jenkins部署dotnetcore應(yīng)用的方法
這篇文章主要給大家介紹了關(guān)于.Net Core自動(dòng)化部署之利用docker版jenkins部署dotnetcore應(yīng)用的相關(guān)資料,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧2018-06-06ASP.NET Core MVC 過(guò)濾器的使用方法介紹
本篇文章主要介紹了ASP.NET Core MVC 過(guò)濾器的使用方法介紹,小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧2017-09-09