0

i am new to asp.net ,i have two textboxes and in one user will enter value which will get added to the other automatically generated textbox value.But is user is not entering any value it is showing error.Any solution to solve this

4
Contributors
6
Replies
8
Views
7 Years
Discussion Span
Last Post by Ramesh S
0

i am new to asp.net ,i have two textboxes and in one user will enter value which will get added to the other automatically generated textbox value.But is user is not entering any value it is showing error.Any solution to solve this

0

Hi,
Check the availability of the value for the first checkbox before inserting the value into another textbox

if(textbox1.text!=" ")
{
  textbox2.text=textbox1.text);
}

All The Best

0

Assigning an empty textbox value another textbox will not throw error.

Could you please post the error messge that you are getting.

You can also post some code which will help us to understand the problem and provide quick solution to you.

0

if (this.TextBox1.Text.Trim().Length > 0)

{

this.TextBox2.Text = this.TextBox1.Text;

}

SNIP

Edited by happygeek: fake sig snipped

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.