Set - 3

Question 36 :

What property must you set, and what method must you call in your code, in order to bind the data from some data source to the Repeater control?

Answer :

You must set the DataMember property which Gets or sets the specific table in the DataSource to bind to the control and the DataBind method to bind data from a source to a server control. This method is commonly used after retrieving a data set through a database query.


Question 37 :

What base class do all Web Forms inherit from?

Answer :

System.Web.UI.Page


Question 38 :

What method do you use to explicitly kill a users session?
The Abandon method destroys all the objects stored in a Session object and releases their resources.
If you do not call the Abandon method explicitly, the server destroys these objects when the session times out.
Syntax: Session.Abandon

Answer :


Question 39 :

How do you turn off cookies for one page in your site?

Answer :

Use the Cookie.Discard Property which Gets or sets the discard flag set by the server. When true, this property instructs the client application not to save the Cookie on the users hard disk when a session ends.


Question 40 :

Which two properties are on every validation control?

Answer :

ControlToValidate & ErrorMessage properties