The error is caused by code when clicked on popup calender:
var mydate = $("TextBox1").mydate;
The error message is Object is required
<%@dotnet.itags.org. Page Language="VB" AutoEventWireup="false" CodeFile="test2.aspx.vb" Inherits="test2" %>
<%@dotnet.itags.org. Register Assembly="AtlasControlToolkit" Namespace="AtlasControlToolkit" TagPrefix="atlasToolkit" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<atlas:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true" />
<div>
<script type="text/javascript" language="javascript">
function commitScript1() {
var mydate = $("TextBox1").mydate;
if("" == mydate) {
mydate = "";
}
$object("TextBoxWatermarkBehavior_TextBox1").set_Text(mydate);
}
</script>
<asp:TextBox ID="TextBox1" runat="server" Width="150"></asp:TextBox>
<asp:Panel ID="Panel4" runat="server" CssClass="popupControl">
<atlas:UpdatePanel ID="UpdatePanel6" runat="server" Mode="Conditional" RenderMode="Block">
<ContentTemplate>
<center>
<asp:Calendar ID="Calendar3" runat="server" BackColor="White" BorderColor="#999999"
CellPadding="1" DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt"
ForeColor="Black" Width="160px" OnSelectionChanged="Calendar3_SelectionChanged">
<SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" />
<TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" />
<SelectorStyle BackColor="#CCCCCC" />
<WeekendDayStyle BackColor="#FFFFCC" />
<OtherMonthDayStyle ForeColor="#808080" />
<NextPrevStyle VerticalAlign="Bottom" />
<DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" />
<TitleStyle BackColor="#999999" BorderColor="Black" Font-Bold="True" />
</asp:Calendar>
</center>
</ContentTemplate>
</atlas:UpdatePanel>
</asp:Panel>
<atlasToolkit:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender3" runat="server">
<atlasToolkit:TextBoxWatermarkProperties TargetControlID="TextBox1" WatermarkCssClass="watermarked"
WatermarkText="<DD/MM/YYYY>" ID="TextBoxWatermarkBehavior" />
</atlasToolkit:TextBoxWatermarkExtender>
<atlasToolkit:PopupControlExtender ID="PopupControlExtender3" runat="server">
<atlasToolkit:PopupControlProperties TargetControlID="TextBox1" PopupControlID="Panel4"
Position="Bottom" ID="PopControlBehavior1" CommitProperty="mydate" CommitScript="commitScript1()" />
</atlasToolkit:PopupControlExtender> </div>
</form>
</body>
</html
CodeFile:
Partial Class test2
Inherits System.Web.UI.Page
Protected Sub Calendar3_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs)
PopupControlExtender3.Commit(Calendar3.SelectedDate.ToShortDateString())
Calendar3.SelectedDate = Nothing
End Sub
End ClassI believe this thread addresses the issue you're seeing (hard-coded ID changed by inclusion in a different naming container):http://forums.asp.net/thread/1368445.aspx
No comments:
Post a Comment