合并所有3个文本框值并放入另一个文本框 [英] combine all the 3 textbox values and put into the another textbox
问题描述
我在asp.net中使用日历。
在该日历中,当我选择该日历上的任何日期,日期,月份和年份时,将分别显示在该日历中文本框。
假设我在日历中选择2013年2月18日意味着
文本框中的
显示如下;
textbox1 18
textbox2 2
textbox3 2013 < br $> b $ b
然后我有一个名为show的按钮,当我点击那个按钮时,textbox1,textbox2和textbox3
值将显示在文本框4中。
如何使用csharp。
请帮帮我。
REgards,
Narasiman P
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
推荐答案
这似乎很奇怪,但是你去吧:
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;
}
顺便说一句,使用文本框看起来不合理,因为你可以使用DateTimePicker
:
DateTimePicker Web Control [ ^ ]。
此外,请参阅我对该问题的评论。这不是解决这类问题的正确方法。
-SA
By the way, using text boxes does not look reasonable, as you can use aDateTimePicker
:
DateTimePicker Web Control[^].
Also, please see my comment to the question. It''s not a right way to solve the problems like that.
—SA
这篇关于合并所有3个文本框值并放入另一个文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!