HtmlTextWriter.SlashChar Pole

Definice

Představuje značku lomítka (/).

public: char SlashChar;
public const char SlashChar;
val mutable SlashChar : char
Public Const SlashChar As Char 

Hodnota pole

Příklady

Následující příklad kódu ukazuje, jak ručně vykreslit src atribut elementu <img> . Příklad kódu používá metodu WriteSlashChar s polem jako jeho parametr k vykreslení lomítek v cestě, která je použita pro src atribut.

Tento příklad kódu vykreslí následující kód:

src="/images/

// Write the src attribute and the path
// for the image file.
writer.Write("src");
writer.Write(HtmlTextWriter.EqualsChar);
writer.Write(HtmlTextWriter.DoubleQuoteChar);
writer.Write(HtmlTextWriter.SlashChar);
writer.Write("images");
writer.Write(HtmlTextWriter.SlashChar);
' Write the src attribute and the path
' for the image file.
writer.Write("src")
writer.Write(HtmlTextWriter.EqualsChar)
writer.Write(HtmlTextWriter.DoubleQuoteChar)
writer.Write(HtmlTextWriter.SlashChar)
writer.Write("images")
writer.Write(HtmlTextWriter.SlashChar)

Poznámky

SlashChar Pomocí pole vykreslujte lomítko při psaní adresy URL. Metoda WriteEndTag používá SlashChar pole při zápisu koncové značky prvku značky.

Platí pro

Viz také