asp. net direct Response output WML page sample code

  • 2020-06-23 00:11:13
  • OfStack

 
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=\" Open information Access Center \">"); 
builder.AppendLine("<p><img src=\"images/logo.png\" alt=\" Open information Access Center \" /><br/>"); 
builder.AppendLine("<a href=\"\" title=\" news \"> news </a>|<a href=\"Department.aspx\" title=\" institutional \"> institutional </a><br/>"); 
builder.AppendLine("<a href=\"\" title=\" archive \"> archive </a>|<a href=\"\" title=\" The latest files \"> The latest files </a><br/>"); 
builder.AppendLine(""); 
builder.AppendLine(" </p></card>"); 
builder.AppendLine("</wml>"); 
Response.Write(builder.ToString()); 
Response.End(); 
} 

Related articles: