• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 409
  • Last Modified:

TimeTracker Calendar Date-Name not declared.

Hi again,
I wanted to rebuild the calender from TimeTracker example. In my form view i have date from and date to textboxes. Now, I have the problem that i get the message "Name 'txtDateVon' is not declared." Do you now, what I have done wrong?
Thanks in advance for your help.
lanter007

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        Dim txtDateVon As TextBox = CType(frmCreateKursdurchfuehrung.FindControl("txtDateVon"), TextBox)
        Dim dt As DateTime = CDate(Date.Now.ToShortDateString)
        txtDateVon.Text = dt                    
......


<asp:TextBox ID="txtDateVon" runat="server" Text='<%# Bind("date_bis") %>'></asp:TextBox>&nbsp;
<a href="javascript:OpenPopupPage('Calendar.aspx','<%= txtDateVon %>','<%= Page.IsPostBack %>');">
<img src="pics/icon-calendar.gif" border="0"  title="Datum ausw√§hlen"></a>
0
lanter007
Asked:
lanter007
  • 3
  • 2
1 Solution
 
RamuncikasCommented:
try
<a href="javascript:OpenPopupPage('Calendar.aspx','<%= txtDateVon.Text %>','<%= Page.IsPostBack %>');">
0
 
lanter007Author Commented:
I already tried this, but it also doesn't work.
0
 
RamuncikasCommented:
<a href="javascript:OpenPopupPage('Calendar.aspx','<%= CType(frmCreateKursdurchfuehrung.FindControl("txtDateVon"), TextBox).Text %>','<%= Page.IsPostBack %>');">
0
 
lanter007Author Commented:
thanks ramuncikas. it works.
greets
lanter007
0
 
RamuncikasCommented:
Glad to hear that
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now