Adobe certification Adobe
Apple certification Apple
Avaya certification Avaya
Business Objects certification Business Objects
Check Point certification Check Point
Cisco certification Cisco
Citrix certification Citrix
CIW certification CIW
Cognos certification Cognos
CompTIA certification CompTIA
CWNP certification CWNP
ECCouncil certification EC-Council
EMC certification EMC
Exam Express certification Exam Express
Exin certification Exin
F5 Networks certification F5 Networks
FileMaker certification FileMaker
Hitachi certification Hitachi
HP certification HP
Hyperion certification Hyperion
IBM certification IBM
Isaca certification Isaca
ISC certification ISC
ISEB certification ISEB
Juniper certification Juniper
Lotus certification Lotus
LPI certification LPI
McData certification McData
Microsoft certification Microsoft
Mile2 certification Mile2
MySQL certification MySQL
Network Appliance certification Network Appliance
Network General certification Network General
Nortel certification Nortel
Novell certification Novell
OMG certification OMG
Oracle certification Oracle
PMI certification PMI
SAIR certification SAIR
SAS Institute certification SAS Institute
SNIA certification SNIA
Sun certification Sun
Sybase certification Sybase
Symantec certification Symantec
Teradata certification Teradata
Tibco certification Tibco
VMware certification VMware
All Exams

Microsoft 70-528 Exam - BestSheet.com

Free 70-528 Sample Questions:

1. Your Web site uses custom Themes. Your Web site must support additional Themes based on the user's company name.
The company name is set when a user logs on to the Web site. The company's Theme name is stored in a variable named ThemeName.
You need to use this variable to dynamically set the Web site's Theme. What should you do?
A. Add the following code segment to the markup source of each page on the Web site.
<%@ Page Theme="ThemeName" ... %>
B. Add the following code segment to the Load event of each page on the Web site.
Page.Theme = ThemeName;
C. Add the following code segment to the PreInit event of each page on the Web site.
Page.Theme = ThemeName;
D. Add the following code segment to the Web site's configuration file.
<pages theme="ThemeName" />
Answer: C

2. Your Web site uses custom Themes. Your Web site must support additional Themes based on the user's company name.
The company name is set when a user logs on to the Web site. The company's Theme name is stored in a variable named ThemeName.
You need to use this variable to dynamically set the Web site's Theme. What should you do?
A. Add the following code segment to the markup source of each page on the Web site.
<%@ Page Theme="ThemeName" ... %>
B. Add the following code segment to the Load event of each page on the Web site.
Page.Theme = ThemeName
C. Add the following code segment to the PreInit event of each page on the Web site.
Page.Theme = ThemeName
D. Add the following code segment to the Web site's configuration file.
<pages theme="ThemeName" />
Answer: C

3. You have an SQL query that takes one minute to execute. You use the following code segment to execute the SQL query asynchronously.
Dim ar As IAsyncResult = cmd.BeginExecuteReader()
You need to execute a method named DoWork() that takes one second to run while the SQL query is executing. DoWork() must run as many times as possible while the SQL query is executing.
Which code segment should you use?
A. While ar.AsyncWaitHandle Is Nothing
DoWork() End While
dr = cmd.EndExecuteReader(ar)
B. While Not ar.IsCompleted
DoWork() End While
dr = cmd.EndExecuteReader(ar)
C. While Thread.CurrentThread.ThreadState = ThreadState.Running
DoWork() End While
dr = cmd.EndExecuteReader(ar)
D. While Not ar.AsyncWaitHandle.WaitOne() DoWork()
End While
dr = cmd.EndExecuteReader(ar)
Answer: B

4. You write a Web application. This application must support multiple languages. You store the localized strings in the application as resources. You want these resources to be accessed according to a users language preference. You create the following resource files in the App_GlobalResources folder of your application.

Each resource file stores a localized version of the following strings: Name, E­mail, Address, and Phone.
You create a Web Form that contains one label for each of these strings.
You need to ensure that the correct localized version of each string is displayed in each label, according to a users language preference. What should you do?
A. Add the following configuration section to the Web.config file.
<globalization culture="Auto" />
B. Set the directive for each page in your site as follows:
<%@ Page UICulture="Auto" %>
C. Add the following code segment to the pages load event. lblName.Text = "{myStrings}Name"
lblAddress.Text = "{myStrings}Address"
lblEmail.Text = "{myStrings}Email"
lblPhone.Text = "{myStrings}Phone"
D. Add the following code segment to the pages load event. lblName.Text = Resources.myStrings.Name lblAddress.Text = Resources.myStrings.Address lblEmail.Text = Resources.myStrings.Email
lblPhone.Text = Resources.myStrings.Phone
Answer: D

5. You create a Web Form. The Web Form allows users to calculate values and display the results in a label named lblResults.
You need to capture all unhandled exceptions on the Web Form through the Error event. The Error event must capture each unhandled exception and display it on the Web Form.
Which code segment should you use?
A. protected void Page_Error(object sender, EventArgs e) {
lblResults.Text = e.ToString();
e=null;
}
B. protected void Page_Error(object sender, EventArgs e) { lblResults.Text = Server.GetLastError().ToString(); Server.ClearError();
}
C. protected void Page_Error(object sender, EventArgs e) { Response.Write(e.ToString());
e=null;
}
D. protected void Page_Error(object sender, EventArgs e) { Response.Write(Server.GetLastError().ToString()); Server.ClearError();
}
Answer: D

6. You create a Web Form. The Web Form allows users to calculate values and display the results in a label named lblResults.
You need to capture all unhandled exceptions on the Web Form through the Error event. The Error event must capture each unhandled exception and display it on the Web Form.
Which code segment should you use?
A. Protected Sub Page_Error(ByVal sender As Object, _ ByVal e As System.EventArgs) Handles Me.Error lblResults.Text = e.ToString()
e = Nothing
End Sub
B. Protected Sub Page_Error(ByVal sender As Object, _ ByVal e As System.EventArgs) Handles Me.Error? lblResults.Text = Server.GetLastError().ToString() Server.ClearError()
End Sub
C. Protected Sub Page_Error(ByVal sender As Object, _ ByVal e As System.EventArgs) Handles Me.Error?
Response.Write(e.ToString())
e = Nothing
End Sub
D. Protected Sub Page_Error(ByVal sender As Object, _ ByVal e As System.EventArgs) Handles Me.Error Response.Write(Server.GetLastError().ToString()) Server.ClearError()
End Sub
Answer: D

7. You create a Web Form. The Web Form uses the FormView control to enable a user to edit a record in the database.
When the user clicks the Update button on the FormView control, the application must validate that the user has entered data in all of the fields.
You need to ensure that the Web Form does not update if the user has not entered data in all of the fields. Which code segment should you use?
A. protected void FormView1_ItemUpdating(object sender, FormViewUpdateEventArgs e) {
foreach (DictionaryEntry entry in e.Keys) {
if (entry.Value.ToString() == System.String.Empty) {
e.Cancel = true;
return;
}
}
}
B. protected void FormView1_ItemUpdated(object sender, FormViewUpdatedEventArgs e) {
foreach (DictionaryEntry entry in e.NewValues) {
if (entry.Value.Equals("")) { e.KeepInEditMode = true; return;
}
}
}
C. protected void FormView1_ItemUpdating(object sender, FormViewUpdateEventArgs e) {
foreach (DictionaryEntry entry in e.NewValues) {
if (entry.Value.Equals("")) {
e.Cancel = true;
return;
}
}
}
D. protected void FormView1_ItemUpdated(object sender, FormViewUpdatedEventArgs e) {
foreach (DictionaryEntry entry in e.Keys) {
if (entry.Value.ToString() == System.String.Empty) {
e.KeepInEditMode = true;
return;
}
}
}
Answer: C

8. You create a Web Form. The Web Form uses the FormView control to enable a user to edit a record in the database.
When the user clicks the Update button on the FormView control, the application must validate that the user has entered data in all of the fields.
You need to ensure that the Web Form does not update if the user has not entered data in all of the fields. Which code segment should you use?
A. Protected Sub FormView1_ItemUpdating(ByVal sender As Object, _ByVal e As System.Web.UI.WebControls.FormViewUpdateEventArgs) _ Handles FormView1.ItemUpdating Dim entry As DictionaryEntry For Each entry In e.Keys
If entry.Value.ToString() = System.String.Empty Then e.Cancel = True
Return End If Next entry End Sub
B. Protected Sub FormView1_ItemUpdated(ByVal sender As Object, _ ByVal e As System.Web.UI.WebControls.FormViewUpdatedEventArgs) _
Handles FormView1.ItemUpdated
Dim entry As DictionaryEntry For Each entry In e.NewValues If entry.Value.Equals("") Then e.KeepInEditMode = True Return
End If Next entry End Sub
C. Protected Sub FormView1_ItemUpdating(ByVal sender As Object, _ ByVal e As System.Web.UI.WebControls.FormViewUpdateEventArgs) _ Handles FormView1.ItemUpdating
Dim entry As DictionaryEntry For Each entry In e.NewValues If entry.Value.Equals("") Then e.Cancel = True Return End If Next entry
End Sub
D. Protected Sub FormView1_ItemUpdated(ByVal sender As Object, _ ByVal e As System.Web.UI.WebControls.FormViewUpdatedEventArgs) _ Handles FormView1.ItemUpdated Dim entry As DictionaryEntry For Each entry In e.Keys
If entry.Value.ToString() = System.String.Empty Then e.KeepInEditMode = True
Return
End If
Next entry End Sub
Answer: C

9. You are creating a Web Form. You write the following code segment to create a SqlCommand object.

You need to display the number of customers in the Customers table.
Which two code segments can you use to achieve this goal? (Each correct answer presents a complete solution. Choose two.)
A. object customerCount = cmd.ExecuteScalar(); lblCompanyName.Text = customerCount.ToString();
B. int customerCount = cmd.ExecuteNonQuery(); lblCompanyName.Text = customerCount.ToString();
C. SqlDataReader dr = cmd.ExecuteReader(); dr.Read();
lblCompanyName.Text = dr[0].ToString();
D. SqlDataReader dr = cmd.ExecuteReader();
dr.Read();
lblCompanyName.Text = dr.ToString();
Answer: A, C

10. You have an SQL query that takes one minute to execute. You use the following code segment to execute the SQL query asynchronously.
IAsyncResult ar = cmd.BeginExecuteReader();
You need to execute a method named DoWork() that takes one second to run while the SQL query is executing. DoWork() must run as many times as possible while the SQL query is executing.
Which code segment should you use?
A. while (ar.AsyncWaitHandle == null) {
DoWork();
}
dr = cmd.EndExecuteReader(ar);
B. while (!ar.IsCompleted) { DoWork();
}
dr = cmd.EndExecuteReader(ar);
C. while (Thread.CurrentThread.ThreadState == ThreadState.Running) { DoWork();
}
dr = cmd.EndExecuteReader(ar);
D. while (!ar.AsyncWaitHandle.WaitOne()) { DoWork();
}
dr = cmd.EndExecuteReader(ar);
Answer: B