hey guys i have a text box named txtunits in which i want to set a default value 1 in that text box
can u help me guyz?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Manoj BhoirRank #599 · 4K reputationPosted Jun 4, 2015, 9:07 AM EDT
{
if (((TextBox)sender).Text == "")
{
((TextBox)sender).Text = "1";
}
}
Abhay Singhania37 reputationPosted Jun 4, 2015, 9:12 AM EDT
Manoj BhoirRank #599 · 4K reputationPosted Jun 4, 2015, 9:34 AM EDT
{
if (((Telerik.WinControls.UI.RadTextBoxControl)sender).Text == "")
{
((Telerik.WinControls.UI.RadTextBoxControl)sender).Text = "1";
}
}
Pankaj Kumar ChoudharyRank #80 · 24.4K reputationPosted Jun 4, 2015, 4:08 PM EDT
{
textBox1.Text = "12345";
}
{ if(textBox1.Text.Length==0)
textBox1.Text = "12345";
}
Najjaf Shuja39 reputationPosted Jun 4, 2015, 11:31 PM EDT