I'm creating a web page. I've added a textbox at design time and changed its textmode property to date.
I'm getting the following error when viewing it in a browser: (if i change the textbox property to "single line" I dont get the error)
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>
It seems you have not installed .Net Framework 4.5. Below .Net Framework 4.5 TextMode has only three mode i.e. SingleLine, Multiline and password.
This is an alternative answer if you don't want to install the .NET FRK 4.5 :
Instead of using the attribute "TextMode", you can replace it by "type", which is the attribute's name in both cases in the generated "HTML Input"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With