You are developing an ASP.NET web application.
The application includes a class library named Contoso.dll that will be used by other ASP.Net applications on the same server.
You need to ensure that only one copy of the class library exists on the server.
What should you do?
A. Add the following code segment to the top of each web page.You need to dynamically add TestUserControl.ascx to TestPage.aspx. Which code segment should you use?
A. Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LoadDim userControl As Control = Page.LoadControl("TestUserControl.ascx")Page.Form.Controls.Add(userControl)End SubYou are implementing an ASP.NET Web site. The site contains the following class. Public Class Address Public AddressType As Integer Public Line1 As String Public Line2 As String Public City As String Public ZipPostalCode As String End Class The Web site interacts with an external data service that requires Address instances to be given in the following XML format.
You need to ensure that Address instances that are serialized by the XmlSerializer class meet the XML format requirements of the external data service.
Which two actions should you perform (Each correct answer presents part of the solution. Choose two.)
A. Add the following attribute to the AddressType field.You are creating an ASP.NET Web site. You create a HTTP module named CustomModule, and you register the module in the web.config file. The CustomModule class contains the following code.
Public Class CustomModule Implements IHttpModule Dim footerContent As String = "
You need to add code to CustomModule to append the footer content to each processed ASP.NET page.
Which code segment should you use?
A. Public Sub New(ByVal app As HttpApplication)AddHandler app.EndRequest, AddressOf app_EndRequestEnd SubSub app_EndRequest(ByVal sender As Object, ByVal e As EventArgs)Dim app As HttpApplication = TryCast(sender, HttpApplication)app.Response.Write(footerContent)End SubYou are implementing an ASP.NET Web site that will be accessed by an international audience. The site contains global and local resources for display elements that must be translated into the language that is selected by the user. You need to ensure that the Label control named lblCompany displays text in the users selected language from the global resource file. Which control markup should you use?
C. C.You are implementing an ASP.NET Web site. The site uses a component that must be dynamically configured before it can be used within site pages.
You create a static method named SiteHelper.Configure that configures the component. You need to add a code segment to the Global.asax file that invokes the SiteHelper.Configure method the first time, and only the first time, that any page
in the site is requested.
Which code segment should you use?
A. Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs) SiteHelper.Configure()End SubYou create a Web page named TestPage.aspx and a user control named TestUserControl. ascx. TestPage.aspx uses TestUserControl.ascx as shown in the following line of code.
On TestUserControl.ascx, you need to add a read-only member named CityName to return the value "New York". You also must add code to TestPage.aspx to read this value.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
A. Add the following line of code to the TestUserControl.ascx.vb code-behind file.Public ReadOnly Property CityName As StringGetReturn "New York"End GetEnd PropertyYou create a Web page named TestPage.aspx and a user control named TestUserControl.ascx. TestPage.aspx uses TestUserControl.ascx as shown in the following line of code.
On TestUserControl.ascx, you need to add a read-only member named CityName to return the value "New York". You also must add code to TestPage.aspx to read this value.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
A. Add the following line of code to the TestUserControl.ascx.cs code-behind file.public string CityName {get { return "New York" ; } }You are developing an ASP.NET MVC 2 application.
You create a view that will be returned by action methods in multiple controllers.
You need to place the view in the appropriate folder.
To which subfolder within the Views folder should you add the view?
A. MasterYou are implementing custom ASP.NET server controls.
You have a base class named RotaryGaugeControl and two subclasses named CompassGaugeControl and SpeedGaugeControl.
Each control requires its own client JavaScript code in order to function properly. The JavaScript includes functions that are used to create the proper HTML elements for the control. You need to ensure that the JavaScript for each of these
controls that is used in an ASP.NET page is included in the generated HTML page only once, even if the ASP.NET page uses multiple instances of the given control.
What should you do?
A. Place the JavaScript in a file named controls.js and add the following code line to the Page_Load method of each control.Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "script","controls.js");Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Microsoft exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your 70-515 exam preparations and Microsoft certification application, do not hesitate to visit our Vcedump.com to find your solutions here.