I have a value in a textbox (varchar) in a webform of asp .net and I need to compare it with a tinyint type value of sql.
What would be the way?
Thanks
Greetings
I have a value in a textbox (varchar) in a webform of asp .net and I need to compare it with a tinyint type value of sql.
What would be the way?
Thanks
Greetings
I recommend you read this article.
There you can see the data relationship between the different SQL and C # data types
In your case, to be able to insert tinyint you must use Byte
string a = "1";
Byte b;
b = Convert.ToByte(a);
Byte c = 0;
if(b>c){
.......
}
I hope it serves you .. Greetings