Which two actions should you perform?

You create several ASP.NET applications by using the .NET Framework 3.5.

You create a custom server control in a class library named CustomControls. The custom server control uses a JavaSchpt file to provide client-side validation logic.

You plan to reuse the custom server control in all the applications.

You need to ensure that the JavaScript file is deployed along with the custom server control and that it is accessible from the applications. You have already decorated the CustomControls assembly with the WebResource attribute.

Which two actions should you perform? (Each correct answer presents part of the solution.
Choose two)

You create several ASP.NET applications by using the .NET Framework 3.5.

You create a custom server control in a class library named CustomControls. The custom server control uses a JavaSchpt file to provide client-side validation logic.

You plan to reuse the custom server control in all the applications.

You need to ensure that the JavaScript file is deployed along with the custom server control and that it is accessible from the applications. You have already decorated the CustomControls assembly with the WebResource attribute.

Which two actions should you perform? (Each correct answer presents part of the solution.
Choose two)

A.
Implement the JavaScript file as Embedded Resource in the CustomControls class library.

B.
Implement the JavaScript file as Resource in the CustomControls class library.

C.
Add a <script> element in the Web forms that host the custom server control to reference the JavaScript file.

D.
Add a <ScriptReference> element in the Web forms that host the custom server control to reference the JavaScript file.

Explanation:
see also: http://msdn.microsoft.com/en-us/library/system.web.ui.webresourceattribute.aspx and http://msdn.microsoft.com/en-us/library/system.web.ui.scriptmanager.aspx



Leave a Reply 0

Your email address will not be published. Required fields are marked *