asp.net - Client populating server collections at runtime -
I select a date on the calendar control by the client, adding it to a list of date-time objects on the server every time Amen, and in turn, highlight all the selected dates on the controls. I am able to highlight all the immediate dates (change back color) in the list on page load, and publish the date the customer first selects. Although the next date selection on the control is changing only on the date which has been highlighted on the date ie, No more highlighting
I thought the date by which the object was selected by adding a list to the list on the runtime and then adding them to the "selected dates" in the calendar, the property was selected around the problem of calendar control The selected duty shows a list of debugging textbox shows by printing all the dates within the property date on the selection of a new date, starting dates with the list. Defense was the latest selection within the list, rather than the previous selection. My question and what I think is the problem, can a list on the server run from the client's runtime, and can be added to it? I am using ASP with C # .NET3.5 on VS 2008. Thanks
My code system. Selection. Generic.list dates;
Protected Zero Page_Old (Object Sender, EventAgds E) {this.dates = new list & lt; DateTime & gt; (); This.dates.Add (New Date Time (2009,12,2)); This.dates.Add (New Date Time (2009, 12, 3)); This.dates.Add (new date time (2009, 12, 16)); FillDates (); } Select Secure Zero ContributorGentered (Object Sender, EventAgps E) {This DedicatedAdd (this.AvalCalendar. Selected date); Foreign Currency (Date Date Date) {This Avell Calendar Selected date Add (date); This.displayText.Text = this.displayText.Text + date.ToShortDateString (); } Fill (); } Protected void fillers () {foreach (Date data in this data) {this.AvailCalender.SelectedDates.Add (dates); } This.AvailCalender.SelectedDayStyle.BackColor = System.Drawing.Color.Blue; }
list & lt; DateTime & gt;
is being created with each postback so this is not saving the previous selection. You need to continue using it in some way like using viewstate
, session
or storing it in DB
Page.IsPostBack
to test it.
Comments
Post a Comment