Click here to Skip to main content
15,895,837 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
i am using calendar in asp.net.

in that calendar when i select any date on that calendar, date,month and year will display separtely in the textboxes.


suppose when i select the 18th Feb 2013 in the calendar means

in the textbox display as follows;

textbox1 18
textbox2 2
textbox3 2013


Then i have one button called show, when i click that button the textbox1,textbox2 and textbox3
values will be displayed in the textbox4.

How can i do using csharp.

please help me.

REgards,
Narasiman P
Posted
Comments
Sergey Alexandrovich Kryukov 9-Apr-13 11:13am    
I feels like a shame to answer such simple question. Do you feel the same about asking? :-)

This is not how it works out here. No, please do it yourself and ask some question if you are stuck.

—SA

That seems very odd, but here you go:
protected void Button_Click(object sender, EventArgs e)
{
     string result = TextBox1.Text + "/" + TextBox2.Text + "/" + TextBox3.Text;
     TextBox4.Text = result;
}
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 9-Apr-13 11:15am    
I would not answer this question this way, by the reasons explained in 1) my comment to the question, 2) my answer.
—SA
Richard C Bishop 9-Apr-13 11:24am    
Usually I wouldn't, but I am in a good mood today and understand some simple things can be tricky to newbies at first. Notice how I prefaced my solution as the request being odd though.
Sergey Alexandrovich Kryukov 9-Apr-13 11:27am    
May be I'm not is so good mood, but... It a beginner is going to always get such answers, she/he is doomed to never begin. Not a write approach to learning anything...
—SA
Richard C Bishop 9-Apr-13 11:29am    
I agree and I usually point that out. Guess I should follow my own advice regardless of my mood.
Sergey Alexandrovich Kryukov 9-Apr-13 11:32am    
Self-control is a great thing. But in other cases following the mood can be very productive... :-)
—SA
By the way, using text boxes does not look reasonable, as you can use a DateTimePicker:
DateTimePicker Web Control[^].

Also, please see my comment to the question. It's not a right way to solve the problems like that.

—SA
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900