C# 响应一个html页面

  System.Text.StringBuilder sb = new System.Text.StringBuilder();
            sb.Append("<html><head><script>alert(11);$()</script></head><body style=\"margin:0 auto;\"><div>");
            sb.Append("<form action=" + "/test/abcdef" + " method=\"post\">");
            sb.Append("<input style=\"width:30%;height:25px;\" name=\"pMerCode\" value=" + "123" + " />");
            sb.Append("<input name=\"pBillno\" value=" + "456" + "  />");
            sb.Append("<input name=\"pAmount\" value=" + "789" + " />");
            sb.Append("<input name=\"pDate\" value=" + "123" + "  />");           
            sb.Append("</form>");
            sb.Append("</div></body></html>");         
            Response.Write(sb.ToString());
            return View();

 

posted @ 2018-06-21 18:29  enych  阅读(491)  评论(0编辑  收藏  举报