Reputation:
I want to increase and decrease date on image button click.e.g. < 10/11/09 >. how can i do that???
Upvotes: 0
Views: 505
Reputation: 39284
The easiest way to code is with two regular buttons and (server side) code behind. Read the date from the input field, AddDays(1) or AddDays(-1) and rewrite that input field.
A more user-friendly way would use client-side javascript.
See also for example the Ajax Toolkit Library that adds a (client side) calendar selector to a TextBox. See http://www.asp.net/AJAX/AjaxControlToolkit/Samples/Calendar/Calendar.aspx .
Upvotes: 2
Reputation: 46425
In the button click event get the date, create a new instance with the AddDays, AddMonths method etc., then set the text back as necessary.
Upvotes: 1