EDN Admin
Well-known member
Im using a datepicker for my dynamic website. But I get the following errors:
c:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Fileswebsite51b9cb3f1ed1676cd6App_Web_4rtyod4l.28.cs(533,17): error CS1002: ; expected<br/>
c:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Fileswebsite51b9cb3f1ed1676cd6App_Web_4rtyod4l.28.cs(533,17): error CS1525: Invalid expression term .<br/>
c:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Fileswebsite51b9cb3f1ed1676cd6App_Web_4rtyod4l.28.cs(533,18): error CS1002: ; expected<br/>
Validation Complete
My code:
<pre class="prettyprint This is my code for "DateTime_Edit.ascx.cs"
<%@ Control Language="C#" CodeFile="DateTime_Edit.ascx.cs" Inherits="DateTime_EditField" %>
<script type="text/javascript
$(document).ready(function () {
$(#<%TextBox1.ClientID %>).datepicker();
});
</script>
<asp:TextBox ID="TextBox1" runat="server" CssClass="DDTextBox" Text=<%# FieldValueEditString %> Columns="20 </asp:TextBox>
<asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator1" CssClass="DDControl DDValidator" ControlToValidate="TextBox1" Display="Static" Enabled="false" />
<asp:RegularExpressionValidator runat="server" ID="RegularExpressionValidator1" CssClass="DDControl DDValidator" ControlToValidate="TextBox1" Display="Static" Enabled="false" />
<aspynamicValidator runat="server" ID="DynamicValidator1" CssClass="DDControl DDValidator" ControlToValidate="TextBox1" Display="Static" />
<asp:CustomValidator runat="server" ID="DateValidator" CssClass="DDControl DDValidator" ControlToValidate="TextBox1" Display="Static" EnableClientScript="false" Enabled="false" OnServerValidate="DateValidator_ServerValidate" />
[/code]
<pre class="prettyprint And this is where I added Jquery in my masterpage(Here you can find the head section):
<head runat="server
<title>Dynamic Data Site</title>
<link href="~/Site.css" rel="stylesheet" type="text/css" />
<script src="../Scripts/jquery-1.8.2.min.js" type="text/javascript </script>
<script src="../Scripts/jquery-ui-1.9.0.custom.min.js" type="text/javascript </script>
<link href="~/Styles/ui-lightness/jquery-ui-1.9.0.custom.css" rel="stylesheet" type="text/css" />
<asp:ContentPlaceHolder id="head" runat="server
</asp:ContentPlaceHolder>
</head>[/code]
Do you have any idea why Im getting the mentioned errors?
Many thanks <br/>
View the full article
c:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Fileswebsite51b9cb3f1ed1676cd6App_Web_4rtyod4l.28.cs(533,17): error CS1002: ; expected<br/>
c:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Fileswebsite51b9cb3f1ed1676cd6App_Web_4rtyod4l.28.cs(533,17): error CS1525: Invalid expression term .<br/>
c:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Fileswebsite51b9cb3f1ed1676cd6App_Web_4rtyod4l.28.cs(533,18): error CS1002: ; expected<br/>
Validation Complete
My code:
<pre class="prettyprint This is my code for "DateTime_Edit.ascx.cs"
<%@ Control Language="C#" CodeFile="DateTime_Edit.ascx.cs" Inherits="DateTime_EditField" %>
<script type="text/javascript
$(document).ready(function () {
$(#<%TextBox1.ClientID %>).datepicker();
});
</script>
<asp:TextBox ID="TextBox1" runat="server" CssClass="DDTextBox" Text=<%# FieldValueEditString %> Columns="20 </asp:TextBox>
<asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator1" CssClass="DDControl DDValidator" ControlToValidate="TextBox1" Display="Static" Enabled="false" />
<asp:RegularExpressionValidator runat="server" ID="RegularExpressionValidator1" CssClass="DDControl DDValidator" ControlToValidate="TextBox1" Display="Static" Enabled="false" />
<aspynamicValidator runat="server" ID="DynamicValidator1" CssClass="DDControl DDValidator" ControlToValidate="TextBox1" Display="Static" />
<asp:CustomValidator runat="server" ID="DateValidator" CssClass="DDControl DDValidator" ControlToValidate="TextBox1" Display="Static" EnableClientScript="false" Enabled="false" OnServerValidate="DateValidator_ServerValidate" />
[/code]
<pre class="prettyprint And this is where I added Jquery in my masterpage(Here you can find the head section):
<head runat="server
<title>Dynamic Data Site</title>
<link href="~/Site.css" rel="stylesheet" type="text/css" />
<script src="../Scripts/jquery-1.8.2.min.js" type="text/javascript </script>
<script src="../Scripts/jquery-ui-1.9.0.custom.min.js" type="text/javascript </script>
<link href="~/Styles/ui-lightness/jquery-ui-1.9.0.custom.css" rel="stylesheet" type="text/css" />
<asp:ContentPlaceHolder id="head" runat="server
</asp:ContentPlaceHolder>
</head>[/code]
Do you have any idea why Im getting the mentioned errors?
Many thanks <br/>
View the full article