|
What are web Forms?
|
|
Web Forms are an ASP.Net technology that you use to create programmable Web pages. Web Forms render themselves as browser-compatible HTML and script, which allows any browser on any platform to view the pages. Using Web Forms, you create Web pages by dragging and dropping controls onto the designer and then adding code, similar to the way that you create Visual Basic forms. For more information, see ASP.NET Web Pages Overview.
|
|
|
|
|
|
|
|
How is .NET able to support multiple languages?
|
|
A language should comply with the Common Language Runtime (CLR) standard to become a .Net language. In .Net, code is compiled to Microsoft Intermediate Language (MSIL). This is called as Managed Code. This Managed code is run in .Net environment. So after compilation to this IL the language is not a barrier. A code can call or use a function written in another language.
|
|
|
|
|
|
|
|
What environment do I need to use generics?
|
|
To deploy and run code that uses generics you need version 2.0 or higher of the .Net runtime.
|
|
|
|
|
|
|
|
Which Versions of the .NET Framework Support Generics?
|
|
Generics are only supported on version 2.0 and above of the Microsoft .Net framework, as well as version 2.0 of the compact framework.
|
|
|
|
|
|
|
|
Which namespace do you include while using ODBC connectivity?
|
|
System.Data.ODBC;
|
|
|
|
|
|
|
|
How many objects does ADO.Net have and what are they?
|
There are 5 objects in ADO.Net.
They are Connection, Adapter, Command, Reader and Dataset.
|
|
|
|
|
|
|
|
How To Find Number of Days between two Dates in C# Asp.Net?
|
|
To calculate the number of days between two dates in Asp.Net using C#, use the below piece of code.
TimeSpan timespan = Convert.ToDateTime("2009-12-31").Subtract(Convert.ToDateTime("2009-01-01"));
Response.Write(timespan.Days+1);
Here we use Subtract method to find the difference between two dates. Usually the Subtract method return a value that is one less than the correct value. So to the Timespan object Days property we can add 1 to get the exact number of days.
|
|
|
|
|
|
|
|
What is System.Web.Mail?
|
|
System.Web.Mail (SWM) is the .Net namespace used to send email in .Net Framework applications. SWM contains three classes:
1. MailMessage - used for creating and manipulating the mail message contents.
2. MailAttachments - used for creating a mail attachment to be added to the mail message.
3. SmtpMail - used for sending email to the relay mail server. More information on the System.Web.Mail Namespace can be found on MSDN here: http://msdn.microsoft.com/en-us/library/system.web.mail.aspx
|
|
|
|
|
|
|
|
What is DataReader Object in ADO.Net?
|
|
It provides a forward-only, read-only, connected recordset.
It is most efficient to use when data need not to be updated, and requires forward only traverse. In other words, it is the fastest method to read data.
Example:
- Filling dropdownlistbox.
- Comparing username and password in database.
SqlDataReader rdr = cmd.ExecuteReader(); //Reading data while (rdr.Read()) {
//Display data string contact = (string)rdr["ContactName"]; string company = (string)rdr["CompanyName"]; string city = (string)rdr["City"]; }
|
|
|
|
|
|
|
|
In order to get assembly info which namespace we should have import?
|
|
System.Reflection Namespace
|
|
|
|
|
|
|
|
What is Strongly Typed Dataset Object?
|
|
Strongly typed Dataset object allows you to create early-bound data retrieval expression. Advantage of Strongly Typed dataset - It is faster than late-bound data retrieval expression.
- Its column name is shown in intellisense as you type code.
|
|
|
|
|
|
|
|
What is the global assembly cache (GAC)?
|
|
GAC is a machine-wide cache of assemblies that allows .Net applications to share libraries. GAC solves the problems associated with dll (DLL Hell).
|
|
|
|
|
|
|
|
What is ASP.Net?
|
|
ASP.Net is a server side scripting technology that enables scripts (embedded in web pages) to be executed by an Internet server.
1. ASP.Net is a Microsoft Technology
2. ASP stands for Active Server Pages
3.ASP.Net is a program that runs inside IIS
4.IIS (Internet Information Services) is Microsofts Internet server
|
|
|
|
|
|
|
|
Where is global assembly cache located on the system?
|
|
Usually C:\winnt\assembly OR C:\windows\assembly.
|
|
|
|
|
|
|
|
What is the default ConnectionTimeOut to wait for a connection to open in ASP.Net?
|
|
The default value is 15 seconds.
|
|
|
|
|
|
|