System.Web.UI.Page.SetFocus C# (CSharp) Метод

SetFocus() публичный Метод

public SetFocus ( string clientID ) : void
clientID string
Результат void
	public void SetFocus (string clientID)
	{
		if (String.IsNullOrEmpty (clientID))
			throw new ArgumentNullException ("control");

		if (IsPrerendered)
			throw new InvalidOperationException ("SetFocus can only be called before and during PreRender.");

		if(Form==null)
			throw new InvalidOperationException ("A form tag with runat=server must exist on the Page to use SetFocus() or the Focus property.");

		_focusedControlID = clientID;
	}

Same methods

Page::SetFocus ( Control control ) : void

Usage Example

 void IPage.SetFocus(Control control)
 {
     _page.SetFocus(control);
 }
Page