PasswordRecovery.QuestionTemplate Property
Assembly: System.Web (in system.web.dll)
[TemplateContainerAttribute(typeof(PasswordRecovery))] public: virtual property ITemplate^ QuestionTemplate { ITemplate^ get (); void set (ITemplate^ value); }
/** @property */ public ITemplate get_QuestionTemplate () /** @property */ public void set_QuestionTemplate (ITemplate value)
public function get QuestionTemplate () : ITemplate public function set QuestionTemplate (value : ITemplate)
Not applicable.
Property Value
An ITemplate that contains the template for displaying the PasswordRecovery control in Question view. The default is a null reference (Nothing in Visual Basic).The QuestionTemplate property contains the template that defines the appearance of the PasswordRecovery control in Question view.
The following table lists the required and optional controls used in the Question view template.
| ID or Command name | Control type | Required/optional |
|---|---|---|
| Answer | Any control that implements IEditableTextControl. | Required |
| Submit | Any control that causes event bubbling. | Optional |
The Submit control can be any control that causes event bubbling, such as Button, LinkButton, or ImageButton. The control's command name property must be set to "Submit".
The PasswordRecovery control throws an HttpException exception if the Question view does not contain the required controls. No exception is thrown if you give an optional control ID to a control of the wrong type; however, the control is subsequently ignored by the PasswordRecovery control.
When you use a template to define the appearance of the Question view, only the following properties affect the behavior of the control:
-
All properties inherited from WebControl (for details, see the PasswordRecovery control members table).
All other properties are inactive when you use a template for the Question view.
The following code example shows the default template for the Question view.
Security Note: |
|---|
| This example contains a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see Script Exploits Overview (Visual Studio). |
Security Note: