1

姓名:

<%= Html.TextBox("txtName", "20", new { @class = "hello" }) %>

我想要在 VB.NET 中,是 .cssclass="hello" 还是别的什么?

4

2 回答 2

4

这有效:

<%=Html.TextBox("TextName", "TextBox value", New With {.class = "theClass"})%>
于 2009-08-27T13:42:53.947 回答
1

您需要使用“With”关键字和一个点,如下所示:

于 2009-08-27T13:43:39.267 回答