Click here to Skip to main content
15,910,603 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
See more:
Dear All,

I created one web page that page contain : categories(textbox1),title(textbox2),description(textbox3),location(textbox4), mobile(textbox5)


once fill these like: categories:jobs,title:accountant,description:Sr.accountant,location:mumbai, mobile:1234567890

after enter these store in database table but here without enter mobile number means: jobs, accountant, sr.accountant,mumbai,no number(optional means: 1234567890/no number) store in database table

i want like this output means : jobs, accountant, sr.accountant,mumbai,no number this data store in database table please reply me any logic or examples
Posted
Comments
Bh@gyesh 22-Apr-14 2:26am    
Hi,
Does it mean without providing mobile number data can not be save in database? i.e. Messge will be shown to user "Please enter mobile number" like this?
member258 22-Apr-14 2:31am    
Dear Bh,
message ok but i want optional mobile number or no number or like 0000000000 also just output without and with mobile number please reply me
Bh@gyesh 22-Apr-14 2:34am    
Hi,
Which datatype you are using to store mobile number? Please share your code so I can suggest you which changes or enhancement required.
member258 22-Apr-14 2:38am    
bigint
Tom Marvolo Riddle 22-Apr-14 2:50am    
what ?storing the mobile no in Bigint?. Use nvarchar datatype

1 solution

its very simple..
declare as in html like
Mobile number
if you post without any value its default value No number will store in database
try this..
this should helps you
 
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