ScriptManager.RegisterHiddenField Método
Definição
Registra um campo oculto.Registers a hidden field.
Sobrecargas
| RegisterHiddenField(Control, String, String) |
Registra um campo oculto com o controle ScriptManager para um controle que está dentro de um controle UpdatePanel.Registers a hidden field with the ScriptManager control for a control that is inside an UpdatePanel control. |
| RegisterHiddenField(Page, String, String) |
Registra um campo oculto com o controle ScriptManager durante cada postback assíncrono.Registers a hidden field with the ScriptManager control during every asynchronous postback. |
RegisterHiddenField(Control, String, String)
Registra um campo oculto com o controle ScriptManager para um controle que está dentro de um controle UpdatePanel.Registers a hidden field with the ScriptManager control for a control that is inside an UpdatePanel control.
public:
static void RegisterHiddenField(System::Web::UI::Control ^ control, System::String ^ hiddenFieldName, System::String ^ hiddenFieldInitialValue);
public static void RegisterHiddenField (System.Web.UI.Control control, string hiddenFieldName, string hiddenFieldInitialValue);
static member RegisterHiddenField : System.Web.UI.Control * string * string -> unit
Public Shared Sub RegisterHiddenField (control As Control, hiddenFieldName As String, hiddenFieldInitialValue As String)
Parâmetros
- control
- Control
O controle que está registrando o campo oculto.The control that is registering the hidden field.
- hiddenFieldName
- String
O nome do campo oculto a ser registrado.The name of the hidden field to register.
- hiddenFieldInitialValue
- String
O valor inicial do campo oculto.The initial value of the hidden field.
Exceções
control é null.control is null.
- ou --or-
hiddenFieldName é null.hiddenFieldName is null.
control não está na árvore de controle da página.control is not in the page's control tree.
Comentários
Você usa o RegisterHiddenField método para registrar um campo oculto que é compatível com a renderização parcial da página e que não tem nenhuma dependência da biblioteca do Microsoft Ajax.You use the RegisterHiddenField method to register a hidden field that is compatible with partial-page rendering and that has no Microsoft Ajax Library dependencies. Esse método registra o campo oculto quando o controle que está registrando o campo está dentro de um UpdatePanel controle que está sendo atualizado.This method registers the hidden field when the control that is registering the field is inside an UpdatePanel control that is being updated. Para registrar um campo oculto toda vez que ocorrer um postback assíncrono, use a RegisterHiddenField(Page, String, String) sobrecarga desse método.To register a hidden field every time that an asynchronous postback occurs, use the RegisterHiddenField(Page, String, String) overload of this method.
Se você quiser registrar um campo oculto que não pertença a atualizações de página parcial, e se quiser registrar o campo oculto apenas uma vez durante a renderização de página inicial, use o RegisterHiddenField método da ClientScriptManager classe.If you want to register a hidden field that does not pertain to partial-page updates, and if you want to register the hidden field only one time during initial page rendering, use the RegisterHiddenField method of the ClientScriptManager class. Você pode obter uma referência para o ClientScriptManager objeto a partir da ClientScript propriedade da página.You can get a reference to the ClientScriptManager object from the ClientScript property of the page.
O RegisterHiddenField método cria um input elemento oculto na página HTML renderizada.The RegisterHiddenField method creates a hidden input element on the rendered HTML page.
Confira também
Aplica-se a
RegisterHiddenField(Page, String, String)
Registra um campo oculto com o controle ScriptManager durante cada postback assíncrono.Registers a hidden field with the ScriptManager control during every asynchronous postback.
public:
static void RegisterHiddenField(System::Web::UI::Page ^ page, System::String ^ hiddenFieldName, System::String ^ hiddenFieldInitialValue);
public static void RegisterHiddenField (System.Web.UI.Page page, string hiddenFieldName, string hiddenFieldInitialValue);
static member RegisterHiddenField : System.Web.UI.Page * string * string -> unit
Public Shared Sub RegisterHiddenField (page As Page, hiddenFieldName As String, hiddenFieldInitialValue As String)
Parâmetros
- page
- Page
O objeto de página que está registrando o campo oculto.The page object that is registering the hidden field.
- hiddenFieldName
- String
O nome do campo oculto a ser registrado.The name of the hidden field to register.
- hiddenFieldInitialValue
- String
O valor inicial do campo oculto.The initial value of the hidden field.
Exceções
page é null.page is null.
- ou --or-
hiddenFieldName é null.hiddenFieldName is null.
Comentários
Você usa o RegisterHiddenField método para registrar um campo oculto que é compatível com a renderização parcial da página e que não tem nenhuma dependência da biblioteca do Microsoft Ajax.You use the RegisterHiddenField method to register a hidden field that is compatible with partial-page rendering and that has no Microsoft Ajax Library dependencies. Esse método registra o campo oculto toda vez que um postback assíncrono ocorre.This method registers the hidden field every time that an asynchronous postback occurs. Para registrar um campo oculto para um controle que esteja dentro de um UpdatePanel controle para que o campo seja registrado somente quando o painel for atualizado, use a RegisterHiddenField(Control, String, String) sobrecarga desse método.To register a hidden field for a control that is inside an UpdatePanel control so that the field is registered only when the panel is updated, use the RegisterHiddenField(Control, String, String) overload of this method.
Se você quiser registrar um campo oculto que não pertença a atualizações de página parcial, e se quiser registrar o campo oculto apenas uma vez durante a renderização de página inicial, use o RegisterHiddenField método da ClientScriptManager classe.If you want to register a hidden field that does not pertain to partial-page updates, and if you want to register the hidden field only one time during initial page rendering, use the RegisterHiddenField method of the ClientScriptManager class. Você pode obter uma referência para o ClientScriptManager objeto a partir da ClientScript propriedade da página.You can get a reference to the ClientScriptManager object from the ClientScript property of the page.