Which of the following is used for adding client side script to C# code ?

  1. AddJavaScript

  2. RegisterClientScript

  3. AddClientScript

  4. RegisterJavascript


Correct Option: B

AI Explanation

To answer this question, you need to understand how to add client-side script to C# code.

Let's go through each option to understand why it is correct or incorrect:

Option A) AddJavaScript - This option is incorrect because there is no built-in method named "AddJavaScript" in C# for adding client-side script.

Option B) RegisterClientScript - This option is correct because the "RegisterClientScript" method is used in C# to add client-side script to the page.

Option C) AddClientScript - This option is incorrect because there is no built-in method named "AddClientScript" in C# for adding client-side script.

Option D) RegisterJavascript - This option is incorrect because the correct method name is "RegisterClientScript", not "RegisterJavascript".

The correct answer is B) RegisterClientScript. This option is correct because it is the method used in C# for adding client-side script to the page.

Find more quizzes: