Set - 6

Question 16 :

If there is a calendar control to be included in each page of your application, and and we do not intend to use the Microsoft-provided calendar control, how do you develop it? Do you copy and paste the code into each and every page of your application?

Answer :

Create the Calendar User Control
The control we will create will contain a calendar control and a label which has the corresponding date and time written
Steps are:-

Creating a CalenderControl
1) To begin, open Visual Studio .NET and begin a new C# Windows Control Library.
2) You may name it whatever you like, for this sample the project name will be CalenderControl

Using the Calender Control in a Windows Application
It's just like adding any other control like a button or a label.
1) First, create a new Windows Application project named: CustomControl.
2) Add a reference to the Calender Control DLL named: CalenderControl.dll.
3) Now you a can customize the Toolbox:
Right-Click the Toolbox> .NET Framework Components> Browse> select the CalenderControl.dll.
4)The Calender Control is now added to the Toolbox and can be inserted in Windows Form as any other control. The control itself will take care of the date display


Question 17 :

How can you deploy an asp.net application ?

Answer :

You can deploy an ASP.NET Web application using any one of the following three deployment options.
a) Deployment using VS.NET installer
b) Using the Copy Project option in VS .NET
c) XCOPY Deployment


Question 18 :

Explain similarities and differences between Java and .NET?

Answer :

Comparing Java and .NET is comparing apples and oranges. Either the question needs to be to compare Java and C# or J2EE and .NET.


Question 19 :

What are the XML files that are important in developing an ASP.NET application?

Answer :

The XML file necessary for the for developing an asp.net application is Web.config


Question 20 :

Specify the best ways to store variables so that we can access them in various pages of ASP.NET application?

Answer :

Declare the variables in Global.aspx