How to select customer name frim to dropdown list and displa
Hi frnds
How to display customer info from to select dropdown and display table using data base approach in mvc
I have a 2 tables customer and Customer Info
--------------------------------–-----------------------------------
ID Name City Designation
---------------------------------------------------------------------
---------------------------------------------------------------------
2.Customer Info
---------------------------------------------------------------------
ID Name
----------------------------------------------------------------------
---------------------------------------------------------------------
I need to create like this type of form using data base approach
Here i want to create page where if i select name from to dropdown list and submit details should be display all details
?
Answers (1)
2
Try like below:
- DateTime dateTimeObj = DateTime.ParseExact(tbxFromDate.Value, "dd/MM/yyyy", CultureInfo.InvariantCulture);
-
- if (tbxFromDate.Value != "" && dateTimeObj > DateTime.Today)
- {
- Messagebox.Show("From Date should be earlier or equal To Today Date", MessageHelper.MessageType.Warning);
- }
Accepted 2
Hi Raja,
You have to parse the date value before validation. Use the below code:
- DateTime date = DateTime.ParseExact(this.myTextBox.Text, "dd/MM/yyyy", null);
Here you can send the text value entered by the user or a value picked up from your datePicker control. The next key thing is to format your Date to be parsed and if time doesn't bother you, pass the "null" value.
Hope this helps.
Regards,
Amresh S.
1
What is the value you are getting in tbxFromDate.Value?
0
Manas Mohapatra
Amresh S
Thank You so much! 0
Manas Mohapatra
22/11/2016