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
Σχόλια
https://aka.ms/ContentUserFeedback.
Σύντομα διαθέσιμα: Καθ' όλη τη διάρκεια του 2024 θα καταργήσουμε σταδιακά τα ζητήματα GitHub ως μηχανισμό ανάδρασης για το περιεχόμενο και θα το αντικαταστήσουμε με ένα νέο σύστημα ανάδρασης. Για περισσότερες πληροφορίες, ανατρέξτε στο θέμα:Υποβολή και προβολή σχολίων για