我正在创建网页。我在设计时添加了一个 textbox
并将其 textmode
属性更改为最新。
在浏览器中查看时出现以下错误:(如果我将文本框属性更改为“单行”,我不会收到错误)
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Cannot create an object of type
'System.Web.UI.WebControls.TextBoxMode' from its string representation 'Date' for the 'TextMode' property.
Source Error:
Line 20: <tr>
Line 21: <td>
Line 22: <asp:TextBox ID="TextBox1" runat="server" TextMode="Date"></asp:TextBox>
Line 23: </td>
Line 24: <td> </td>
最佳答案
您似乎还没有安装 .Net Framework 4.5。低于 .Net Framework 4.5 TextMode 有 只有三种模式,即单线、多线和密码。
关于c# - 无法更改文本框属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14909295/