hello, I'm a junior coder having trouble with what the subject state.
Currently, I'm working on a c# project. I have a form where the user enters in a credit card number and a purchase amount. I have a created a web service so once the information is entered, the credit card number searches through my table to find the credit limit. If the purchase amount exceeds the credit limit, then it would return "not enough credit" and vice versa.
Anyways, I'm having trouble with handling if the textbox is blank. Should I be building the web service to handle empty values or should it be at the form level? Also, how would I be checking it?
I've tried:
- credit.equals(null)
- credit.equals("")
- credit.ToString().length == 0
and none of them seem to help.
Thanks in advance for any help
Currently, I'm working on a c# project. I have a form where the user enters in a credit card number and a purchase amount. I have a created a web service so once the information is entered, the credit card number searches through my table to find the credit limit. If the purchase amount exceeds the credit limit, then it would return "not enough credit" and vice versa.
Anyways, I'm having trouble with handling if the textbox is blank. Should I be building the web service to handle empty values or should it be at the form level? Also, how would I be checking it?
I've tried:
- credit.equals(null)
- credit.equals("")
- credit.ToString().length == 0
and none of them seem to help.
Thanks in advance for any help