HtmlTextWriter.WriteEncodedUrlParameter(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Encodes the specified URL parameter for the requesting device, and then writes it to the output stream.
public:
virtual void WriteEncodedUrlParameter(System::String ^ urlText);
public virtual void WriteEncodedUrlParameter (string urlText);
abstract member WriteEncodedUrlParameter : string -> unit
override this.WriteEncodedUrlParameter : string -> unit
Public Overridable Sub WriteEncodedUrlParameter (urlText As String)
Parameters
- urlText
- String
The URL parameter string to encode and write to the output stream.
Examples
The following code example shows how to use the WriteEncodedUrlParameter method, which generates the following output:
ID%3dCity+State
// Assign a value to a string variable
// and encode it to a page as a
// URL parameter.
param = "ID=City State";
writer.WriteBreak();
writer.WriteEncodedUrlParameter(param);
' Assign a value to a string variable
' and encode it to a page as a
' URL parameter.
param = "ID=City State"
writer.WriteBreak()
writer.WriteEncodedUrlParameter(param)
Remarks
Spaces in the parameter part of a URL are encoded as plus signs (+), and equal signs (=) are encoded as %3d
.
Applies to
See also
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET