QUESTION 17
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You create a page that contains the following control.
You write the following code segment in the code-behind file for the page.
void LoadDate(object sender, EventArgs e) {
if (IsPostBack) {
calBegin.SelectedDate = (DateTime)ViewState["date"];
}
}
void SaveDate(object sender, EventArgs e) {
ViewState["date"] = calBegin.SelectedDate;
}
You need to ensure that the calBegin Calendar control maintains the selected date.
Which code segment should you insert in the constructor of the page?
A.this.Load += new EventHandler(LoadDate); this.Unload += new EventHandler(SaveDate);
B.this.Init += new EventHandler(LoadDate); this.Unload += new EventHandler(SaveDate);
C.this.Init += new EventHandler(LoadDate); this.PreRender += new EventHandler(SaveDate);
D.this.Load += new EventHandler(LoadDate); this.PreRender += new EventHandler(SaveDate);
Answer: D
QUESTION 18
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You create a FormView control to access the results of a query.
The query contains the following fields:
EmployeID
FirstNam
QUESTION 19
You are maintaining a Microsoft ASP.NET Web Application that was created by using the Microsoft .NET Framework version 3.5.
You obtain the latest version of the project from the source control repository. You discover that an assembly reference is missing when you attempt to compile the project on your computer.
You need to compile the project on your computer.
What should you do?
A.Add a reference path in the property pages of the project to the location of the missing assembly.
B.Add a working directory in the property pages of the project to the location of the missing assembly.
C.Change the output path in the property pages of the project to the location of the missing assembly.
D.Delete the assembly reference. Add a reference to the missing assembly by browsing for it on your computer.
Answer: A