Which code segment should you use?

You create the following Web user control named ErrorMessages.

<%@ Control Language=”VB” AutoEventWireup=”false”
CodeFile=”ErrorMessages.ascx.vb” Inherits=”ErrorMessages” %> <script>
Protected m_Text As String = “This is a default message!”

Public Property Text() As String
Get
Return m_Text
End Get
Set(ByVal value As String)
m_Text = value
End Set
End Property
</script>

The ErrorMessages control uses a public property that displays the error message. You need to change the default error message property on the Web Form in which the control is implemented. Which code segment should you use?

You create the following Web user control named ErrorMessages.

<%@ Control Language=”VB” AutoEventWireup=”false”
CodeFile=”ErrorMessages.ascx.vb” Inherits=”ErrorMessages” %> <script>
Protected m_Text As String = “This is a default message!”

Public Property Text() As String
Get
Return m_Text
End Get
Set(ByVal value As String)
m_Text = value
End Set
End Property
</script>

The ErrorMessages control uses a public property that displays the error message. You need to change the default error message property on the Web Form in which the control is implemented. Which code segment should you use?

A.
<fabrikam:Message id=”MyMessage” MyMessage-Text=”This is a custom message!” runat=”server”/>

B.
<fabrikam:Message id=”MyMessage” MessageText=”This is a custom message!” runat=”server”/>

C.
<fabrikam:Message id=”MyMessage” Text=”This is a custom message!” runat=”server”/>

D.
<fabrikam:Message id=”MyMessage” Message_Text=”This is a custom message!” runat=”server”/>



Leave a Reply 0

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