Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 406
  • 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

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

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