|
Este artigo foi traduzido por máquina. Coloque o ponteiro do mouse sobre as frases do artigo para ver o texto original. Mais informações.
|
Tradução
Original
|
Classe HttpServerUtility
Namespace: System.Web
Assembly: System.Web (em System.Web.dll)
O tipo HttpServerUtility expõe os membros a seguir.
| Nome | Descrição | |
|---|---|---|
![]() | MachineName | |
![]() | ScriptTimeout |
| Nome | Descrição | |
|---|---|---|
![]() | ClearError | |
![]() | CreateObject(String) | |
![]() | CreateObject(Type) | |
![]() | CreateObjectFromClsid | |
![]() | Equals(Object) | |
![]() | Execute(String) | |
![]() | Execute(String, Boolean) | |
![]() | Execute(String, TextWriter) | |
![]() | Execute(IHttpHandler, TextWriter, Boolean) | |
![]() | Execute(String, TextWriter, Boolean) | |
![]() | GetHashCode | |
![]() | GetLastError | |
![]() | GetType | |
![]() | HtmlDecode(String) | |
![]() | HtmlDecode(String, TextWriter) | |
![]() | HtmlEncode(String) | |
![]() | HtmlEncode(String, TextWriter) | |
![]() | MapPath | |
![]() | ToString | |
![]() | Transfer(String) | |
![]() | Transfer(IHttpHandler, Boolean) | |
![]() | Transfer(String, Boolean) | |
![]() | TransferRequest(String) | |
![]() | TransferRequest(String, Boolean) | |
![]() | TransferRequest(String, Boolean, String, NameValueCollection) | |
![]() | TransferRequest(String, Boolean, String, NameValueCollection, Boolean) | |
![]() | UrlDecode(String) | |
![]() | UrlDecode(String, TextWriter) | |
![]() | UrlEncode(String) | |
![]() | UrlEncode(String, TextWriter) | |
![]() | UrlPathEncode | |
![]() ![]() | UrlTokenDecode | |
![]() ![]() | UrlTokenEncode |
<%@ Page Language="C#" %> <!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) { if (!String.IsNullOrEmpty(TextBox1.Text)) { // Access the HttpServerUtility methods through // the intrinsic Server object. Label1.Text = "Welcome, " + Server.HtmlEncode(TextBox1.Text) + ".<br/> The url is " + Server.UrlEncode(Request.Url.ToString()); } } </script> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>HttpServerUtility Example</title> </head> <body> <form id="form1" runat="server"> <div> Enter your name:<br /> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Submit" /> <br /> <asp:Label ID="Label1" runat="server"/> </div> </form> </body> </html>
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Função Server Core sem suporte), Windows Server 2008 R2 (Função Server Core com suporte com o SP1 ou posterior, Itanium sem suporte)
O .NET Framework não oferece suporte a todas as versões de cada plataforma. Para obter uma lista das versões com suporte, consulte .Requisitos de sistema do NET Framework.
