TextBox value doesnot update if Calender control placed below the textbox control [modified]
-
In the calnder control when I click on the last selected value for the 2nd time the value should be removed from the textbox. right now the value is not getting removed from the textbox. Also when I click on calnder control for 2nd time, in the codebehind where I set the textbox value I can see the updated value been set to Textbox in the SelectedDates() event but that value is not reflected on the webpage. This code for making Calender to work as multiple select. EX: select 3 values from the calender controls all those values will be displayed in the textbox, when u click on calender control and if the value already exits the value gets removed from the textbox. Now the calender has 3 values and the default select on the calnder is the 3rd value. If the user clicks on the 3rd value again on the calnder control the value from the textbox is not removed whereas if clicks on one of the previos 2 values in the calender control that value gets removed and then if he clicks the 3rd value now it gets removed. Whereas if we put the Calender control above textbox control and textbox has 3 values and now if u select 3rd value in the calnder, the value gets removed from the textbox. Concern: How to remove the last selected value from the textbox when calnder control is placed below the textbox. ASPX CODE: -------------------------------------------------------------------------------------
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %>
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;namespace WebApplication1
{
public partial class WebForm1 : System.Web.UI.Page
{
public static List list = new List();private bool calenderStatus = false;