Hey! we are glad to announce that we Omistic moved on to our official website at www.omistic.com
Task: Making a Calender in Visual ASP .NET (Using Visual Studio 2012)
Objectives:
- Text Box
- Command Button
- Date time Function
Step 1:
Open your Visual Studio > File > New > Project
Step 2:
Now you will find the dialog box shown below, Select the ASP.NET Web Forms Application
Step 3:
Now Right Click on your Project and Add new a Web Form rename it to 'Calendar'
Step 4:
Now Go to design mode and drag & drop text box and a command button from Tool Box.
Step 5:
Click on Text Box and Go to the Properties of the Text box and rename ID as 'txtCalender' you can also set the properties of the Text Box control like Font, Fore Color etc.
Step 6:
Click on the Button and Rename ID from default to 'btnCalender' in properties window.
Step 7:
Then double click on the Button and code window will be open. Write down code in btnCalender_Click event body,
txtCalender.Text = DateTime.Today.ToString();
Step 8:
After all steps we will run the program by Pressing F5. Now program will run and output will be as below:
------------------------------------------------------------------------------------------------------
Now we are going to enhance the Calendar program Step by Step providing a selection option to user which types of calendar user want to select. For which a 'Drop down List Control' will be add to the Page.
Working with:
- Drop down List Control
- if and else if
Step 1:
Go to the Design mode and add a 'Drop down List Control' from the Tool box and change its ID to 'DDview' from properties.
Step 2:
Now Click on the 'Drop down List Control' a small Pop-Up will be appear as below and select the Edit item.
Step 3:
Now you can see the list item collection Editor Dialog box. Click on the Add button and add four members in it. Name it from properties shown in the right side in the Text write 'Short Date' and put 1 to the value properties. In this way complete the fill up as per picture as below:
Step 4:
Here We will use the if and else if conditions to select the format of the calendar. Write down the code as written below and run the program












0 comments:
Post a Comment