ControlBuilder.AppendLiteralString(String) Method

Definition

將指定的常值內容加入控制項。Adds the specified literal content to a control. 此方法由 ASP.NET 網頁架構呼叫。This method is called by the ASP.NET page framework.

public:
 virtual void AppendLiteralString(System::String ^ s);
public virtual void AppendLiteralString (string s);
abstract member AppendLiteralString : string -> unit
override this.AppendLiteralString : string -> unit
Public Overridable Sub AppendLiteralString (s As String)

Parameters

s
String

要加入該控制項的內容。The content to add to the control.

Exceptions

字串常值的語式不正確。The string literal is not well formed.

Examples

// Override the AppendLiteralString method so that literal
// text between rows of controls are ignored.  
public override void AppendLiteralString(string s) 
{
  // Ignores literals between rows.
}
  ' Override the AppendLiteralString method so that literal
  ' text between rows of controls are ignored.  
  Public Overrides Sub AppendLiteralString(s As String)
  End Sub
End Class

Remarks

覆寫 AppendLiteralString 方法,以控制如何處理控制項的開頭和結束記號之間的常值內容。Override the AppendLiteralString method to control how literal content between the control's opening and closing tags is processed. 常值內容可以是瀏覽器傳遞至伺服器控制項的任何文字。Literal content can be any text that is passed by the browser to the server control. 例如,在其開頭和結束記號之間的任何 HTML 專案和文字都是常值內容。For example, any HTML elements and text, between their opening and closing tags, are literal content.

Applies to