Click here to Skip to main content
15,912,897 members
Please Sign up or sign in to vote.
1.00/5 (5 votes)
See more:
One example will be display

Two textbox in my web form txtminlength and txtmaxlength and one button using sql server database

minlength maxlength

3 4 Store in database
3 - Store in database
- 5 Store in databse
5 3 Not store in database
Posted
Updated 5-Sep-12 2:24am
v2
Comments
Prasad_Kulkarni 5-Sep-12 8:21am    
..and what to do with that?

Where's your question??
Sandeep Mewara 5-Sep-12 8:22am    
This is not a well framed question! We cannot work out what you are trying to do/ask from the post. Please elaborate and be specific.
Use the "Improve question" link to edit your question and provide better information.
ridoy 5-Sep-12 9:32am    
what is your question?!

1 solution

I believe if txtminLength value is greater than txtmaxlength value, then it shouldnt save into database.

C#
int min;
int max;
Int32.TryParse(txtminLength.Text.ToString(),out min);
Int32.TryParse(txtmaxLength.Text.ToString(),out max);

if(min<max)>
{
//write logic to save into database
}
else
{
//throw error
}
 
Share this answer
 

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