c# - 无法更改文本框属性

标签 c# asp.net

我正在创建网页。我在设计时添加了一个 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>&nbsp;</td>

最佳答案

您似乎还没有安装 .Net Framework 4.5。低于 .Net Framework 4.5 TextMode 有 只有三种模式,即单线、多线和密码。

关于c# - 无法更改文本框属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14909295/

相关文章:

c# - 如何让 2 个 `Panel` 对象同时滚动?

c# - 方法调用公共(public)/私有(private)成员或方法最佳实践 - C#.NET

c# - WinForm 中的 OpenID?

c# - IL 格式错误 - 奇怪的 .NET 错误

c# - 试图在文本框 C# 中隐藏护照号码

c# - Entity Framework 首先在数据库中的 AddRange 上滥用 sp_execsql

c# - 我可以在 Entity Framework 的 Where 方法中使用自定义委托(delegate)方法吗?

asp.net - Iframe 与相框

javascript - 通过 Ajax 下载生成的 CSV 文件

c# - WebSecurity.IsAuthenticated 如何检查您是否已登录?