Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get auto calculated exp date on lost focus event of reg date

Status
Not open for further replies.

frmsasp

Programmer
Sep 2, 2005
9
IN
Hello There,

I am working with c# & I have used two textbox server control.
1> Registration Date
2> Expiry Date
First of all, user enters value for the first textbox namely Registration Date and then the expiry date should be auto calculated by adding 30 days into currently entered registration date when he user leaves the first textbox.

That means there are two textboxes - user enters the value for first textbox and the second textbox should be auto calcuated on lost focus event of first textbox.
So pls let me know..... Waiting for your answer....

Thanks,
Paresh
 
DateTime regDate = DateTime.Parse(txtRegistrationDate.Text);

txtExpiryDate.Text = regDate.AddDays(30).ToString();

<insert stupid signature here>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top