Questão de TI - Desenvolvimento de Sistemas — ASP e VB Script — VUNESP 2023
TI - Desenvolvimento de SistemasASP e VB Script
- Código
- vu196114
- Banca
- VUNESP
- Órgão
- TCM SP
- Ano
- 2023
- Cargo
- ACE ( )
No ASP.NET MVC 5, para que um auxiliar de HTML personalizado (Custom HTML Helper) possa ser invocado como @Html.Quoted("texto"), ele deve ser declarado como:
- APublic Shared Class MyExtension Public Shared Function Quoted( this ByVal helper As HtmlHelper, ByVal text As String ) As String Return " " " " & text & " " " " End Function End Class
- BPublic Module MyExtension Public Function Quoted( ByVal helper As HtmlHelper, ByVal text As String ) As String Return " " " " & text & " " " " End Function End Module
- CImports System.Runtime.CompilerServices Public Module MyExtension <Extension()> Public Shared Function Quoted( this helper As HtmlHelper, ByVal text As String ) As String Return " " " " & text & " " " " End Function End Module
- DImports System.Runtime.CompilerServices Public Module MyExtension <Extension()> Public Function Quoted( ByVal helper As HtmlHelper, ByVal text As String ) As String Return " " " " & text & " " " " End Function End Module
- EImports System.Runtime.CompilerServices Public Class MyExtension <Extension()> Public Shared Function Quoted( ByVal helper As HtmlHelper, ByVal text As String ) As String Return " " " " & text & " " " " End Function End Class