ASP.NET 是开源,跨平台,高性能,轻量级的 Web 应用构建框架,常用于通过 HTML、CSS、JavaScript 以及服务器脚本来构建网页和网站。
get方法
html页面:
发送GET请求
发送GET请求
对应的aspx页面:
接收GET请求
接收GET方法传来的内容:
<% string content = Request.QueryString["content1"]; Response.Write("GET方法发送过来的内容为:"+content); %>
post方法
html页面:
发送post请求
发送post请求
对应的aspx页面:
接收post请求
接收post方法传来的内容:
<% string content=Request .Form ["content1"]; Response.Write("POST方法发送过来的内容为:"+content); %>
用get方法,当执行aspx页面时,地址栏的显示有一段字符“?content1=html输入的值”,而用post方法,没显示,相比之下,post方法比较安全适用。