Author: chrysolite | Posted on: 3/10/2009 8:52:47 AM | Views : 559

 I get an error while adding a date picker in details view by using
template field. Here is the error: "The name 'txtEventDate' does not
exist in the current context". I couldn't find out where the error come
from. In the database,i've already set TimelineDate with datatype
'DateTime'.

Code in .aspx.cs
protected void calEventDate_SelectionChanged(object sender, EventArgs e)
    {
        txtEventDate.Text = calEventDate.SelectedDate.ToString("d");
    }

Code in .aspx
<head>
<script type="text/javascript">
    function displayCalendar()
    {
        var datePicker = document.getElementById('datePicker');
        datePicker.style.display = 'block'; ...

Go to the complete details ...