How do you register a user control?

  1. Add Tag prefix, Tag name

  2. Add Source, Tag prefix

  3. Add Src, Tagprefix, Tagname

  4. None of these


Correct Option: B

AI Explanation

To register a user control in ASP.NET, you need to add the source and tag prefix. Let's go through each option to understand why it is correct or incorrect:

Option A) Add Tag prefix, Tag name - This option is incorrect because it does not include the source attribute, which is necessary to specify the location of the user control.

Option B) Add Source, Tag prefix - This option is correct because it includes both the source attribute and the tag prefix. The source attribute specifies the location of the user control, and the tag prefix allows you to use the user control in your markup.

Option C) Add Src, Tagprefix, Tagname - This option is incorrect because it uses "Src" instead of "Source" to specify the location of the user control. The correct attribute name is "Source".

Option D) None of these - This option is incorrect because the correct answer is option B, which includes the source and tag prefix.

The correct answer is B. This option is correct because it includes both the source attribute and the tag prefix, which are required to register a user control in ASP.NET.

Find more quizzes: