[問題] ASP.net驗證控制項的資料型別轉換

看板Web_Design作者 (網路只是噓你世界)時間18年前 (2008/03/15 01:26), 編輯推噓2(201)
留言3則, 2人參與, 最新討論串1/1
書上的範例檔如下 <html> <head> <title>RangeValidator Control Sample</title> </head> <body> <form runat="server"> <p>What date would you like to book your space flight?<br /> <asp:TextBox id="booking" runat="server" /><br /> <asp:RangeValidator id="rvbooking" Type="Date" ControlToValidate="booking" MaximumValue="12/31/2008" MinimumValue="1/1/2005" ErrorMessage="Please enter a date between 2005 and 2008!" runat="server" /><br /> <asp:Button id="btnSubmit" Text="Submit" runat="server" /></p> </form> </body> </html> 卻出現 'rvbooking' 的 MaximumValue 屬性值 '12/31/2008' 無法轉換成型別 'Date'。 的錯誤訊息 我只用Notepad++來編輯,要如何使他會轉換資料型別成為Date呢? -- ◥█████ ◥████ ◢████ ◢█████ ◥██◤◥█ ◥◤ ◥ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 118.169.3.253

03/15 13:17, , 1F
31/12/2008?
03/15 13:17, 1F

03/15 14:26, , 2F
建議下載Visual Web Developer Express來用,寫ASP.Net的
03/15 14:26, 2F

03/15 14:27, , 3F
好夥伴
03/15 14:27, 3F
文章代碼(AID): #17shKvlJ (Web_Design)