日期:2014-05-18 浏览次数:20439 次
<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script runat="server"> protected void Button1_Click(object sender, EventArgs e) { System.IO.File.WriteAllBytes(Server.MapPath("~/images/xx.gif"), Convert.FromBase64String(Request.Form["content"])); Response.Redirect("~/images/xx.gif"); } </script> <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <title></title> </head> <body> <form id="formd1" runat="server"> <textarea name="content">R0lGODdhEAAQALMAAAAAAIAAAACAAICAAAAAgIAAgACAgMDAwICAgP8AAAD/AP//AAAA//8A/wD//////ywAAAAAEAAQAAAEOvDJSSt4K+u9r05gCGoel40kZqLpKb5ZySWm/NFc+cKLfv4LnC8IFKpwSKBnt+upTLUntPMAWK/YbAQAOw==</textarea> <asp:Button ID="Button1" runat="server" OnClientClick="getContent()" OnClick="Button1_Click" Text="服务器端的得到" /> </form> </body> </html>