2012年微软认证考试备考,为了能让更多的考生考试通过,微软认证考试网特搜集了有关复习资料,帮助大家复习。以下是关于2012年微软认证考试考前冲刺试题。
QUESTION 24
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. The application runs on Microsoft IIS 6.0.
You create a page named oldPage.aspx.
You need to ensure that the following requirements are met when a user attempts to access the page:
The browser diplays the URL of the oldPage.aspx page.
The browser displays the page named newPage.aspx Which code segment should you use?
A.Server.Transfer("newPage.aspx");
B.Response.Redirect("newPage.aspx");
C.if (Request.Url.UserEscaped) { Server.TransferRequest("newPage.aspx"); }
else { Response.Redirect("newPage.aspx", true); }
D.if (Request.Url.UserEscaped) { Response.RedirectLocation = "oldPage.aspx"; Response.Redirect("newPage.aspx", true); }
else { Response.Redirect("newPage.aspx"); }
Answer: A
QUESTION 25
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You create a Web page named enterName.aspx. The Web page contains a TextBox control named txtName. The Web page cross posts to a page named displayName.aspx that contains a Label control named lblName.
You need to ensure that the lblName Label control displays the text that was entered in the txtName TextBox control.
Which code segment should you use?
A.lblName.Text = Request.QueryString["txtName"];
B.TextBox txtName = FindControl("txtName") as TextBox; lblName.Text = txtName.Text;
C.TextBox txtName = Parent.FindControl("txtName") as TextBox; lblName.Text = txtName.Text;
D.TextBox txtName = PreviousPage.FindControl("txtName") as TextBox; lblName.Text = txtName.Text;
Answer: D