Set - 6

Question 11 :

On order to get assembly info which namespace we should import?

Answer :

System.Reflection Namespace

Question 12 :

How do you declare a static variable and what is its lifetime? Give an example.

Answer :

static int Myint–The life time is during the entire application.
br> Answer2
The static modifier is used to declare a static member, which belongs to the type itself rather than to a specific object. The static modifier can be used with fields, methods, properties, operators, events and constructors, but cannot be used with indexers, destructors, or types. In C#, the static keyword indicates a class variable. In VB, the equivalent keyword is Shared. Its scoped to the class in which it occurs.

a. Static int var //in
b. static void Time( ) //in

Question 13 :

What is the maximum length of a varchar in SQL Server?

Answer :

Null-terminated Unicode character string of length n,
with a maximum of 255 characters. If n is not supplied, then 1 is assumed.


The business logic is the aspx.cs or the aspx.vb where the code is being written. The presentation logic is done with .aspx extention.

Question 14 :

How do you define an integer in SQL Server?

Answer :

We define integer in Sql server as
var_name int

Question 15 :

How do you separate business logic while creating an ASP.NET application?

Answer :

There are two level of debugging
1. Page level debugging
For this we have to edit the page level debugging enable the trace to true in the line in the html format of the page.

%@ Page Language="vb" trace="true"AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" Inherits="WebApplication2.WebForm1?>

2. You can enable the debugging in the application level for this
Edit the following trace value in web.config file

Enable trace enabled=true.