Visual Studio With C Sharp

Today's Query n Question:
-----------------------------------

I have 2 table's Productmaster n second is best dealmaster. Making of best deal products follow the logic of making bunch [group] of 2 or three product. I am saving the record in best deal separtly but maintaing information about productid by seperation of (",").

i.e 1,2,6,12,76,100    [ProductId in group in bestdeal product table]

Now I want to find the best deal product matching with main product like as I am showing any product and if any bestdeal exits related to this product id then it should be fatched...

Note: This query covers the topic of  string based looping, i.e : loop depend on string in SQL Server and Cursor example.

Product Table :

USE [DataBase]
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[nil_product_master](
    [productid] [int] IDENTITY(1,1) NOT NULL,
    [categoryid] [int] NOT NULL,
    [othercatflag] [int] NOT NULL,
    [productcode] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
    [productname] [varchar](500) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
    [productdesc] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
    [ourprice] [float] NOT NULL,
    [retailprice] [float] NOT NULL,
    [b2bprice] [float] NULL,
    [minb2bqty] [int] NULL,
    [tax] [float] NULL,
    [weight] [float] NULL,
    [deliverytime] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    [stock] [int] NOT NULL,
    [vendorid] [int] NOT NULL,
    [discount] [float] NULL,
    [metapagetitle] [varchar](1000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    [metakeyword] [varchar](500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    [metadesc] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    [rank] [int] NOT NULL,
    [producttype] [int] NOT NULL,
    [matchingproduct] [varchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    [festival] [varchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    [hits] [int] NULL,
    [isbestseller] [int] NOT NULL,
    [isfeatured] [int] NOT NULL,
    [isspecial] [int] NOT NULL,
    [status] [int] NOT NULL,
    [createddate] [datetime] NOT NULL,
 CONSTRAINT [PK_Product] PRIMARY KEY CLUSTERED
(
    [productid] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
SET ANSI_PADDING OFF

BestDeal Product Table :

USE [YourDataBase]
GO
/****** Object:  Table [dbo].[nil_bestdeal_master]    Script Date: 04/13/2009 17:15:26 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[nil_bestdeal_master](
    [bestdealid] [int] IDENTITY(1,1) NOT NULL,
    [products] [varchar](250) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
    [totalprice] [float] NOT NULL,
    [dealprice] [float] NOT NULL,
    [bestdealimg] [varchar](200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
    [startdate] [datetime] NOT NULL,
    [enddate] [datetime] NOT NULL,
    [description] [varchar](500) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
    [status] [int] NOT NULL,
    [title] [varchar](200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
 CONSTRAINT [PK_MstBestDeal] PRIMARY KEY CLUSTERED
(
    [bestdealid] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF

In the above table column products hold the productid such as :   2,5,8,21,10

Now the Solution is to make procedure below:


set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go

CREATE PROCEDURE profront_matchingbestdealproduct_sel
    @CurrentDate DATETIME,
    @CATEGORYNAME VARCHAR(100)
AS
BEGIN
    
    SET NOCOUNT ON;
DECLARE @CATEGORYTID INT
DECLARE @IDIN VARCHAR(100)
DECLARE @DEALID INT

SELECT @CATEGORYTID=CATEGORYID FROM NIL_CATEGORY_MASTER WHERE CATNAME=@CATEGORYNAME

DECLARE db_cursor CURSOR FOR
SELECT BESTDEALID
FROM NIL_BESTDEAL_MASTER
WHERE STATUS=1
AND ENDDATE >=@CurrentDate
SET @IDIN=''
OPEN db_cursor  
FETCH NEXT FROM db_cursor INTO @DEALID  

WHILE @@FETCH_STATUS = 0  
BEGIN  

DECLARE @PRODUCTID VARCHAR(20)
DECLARE @STRCOUNT INT
DECLARE @CATID INT
DECLARE @FLAG INT
DECLARE @PID VARCHAR(20)
DECLARE @INDEX INT

SELECT @PRODUCTID =PRODUCTS FROM NIL_BESTDEAL_MASTER WHERE BESTDEALID=@DEALID AND STATUS=1
SET @FLAG=0
WHILE (max(len(ltrim(rtrim(@PRODUCTID))))>=0)
BEGIN
BEGIN

SET @PID=SUBSTRING(@PRODUCTID,0,charindex(',',@PRODUCTID))
SET @INDEX=charindex(',',@PRODUCTID)

SELECT @CATID=CATEGORYID FROM NIL_PRODUCT_MASTER WHERE PRODUCTID=@PID

IF(@CATEGORYTID=@CATID)
SET @FLAG=1


SET @STRCOUNT=max(len(ltrim(rtrim(@PRODUCTID))))

SET @PRODUCTID=SUBSTRING(@PRODUCTID,3,@STRCOUNT)


SET @STRCOUNT=max(len(ltrim(rtrim(@PRODUCTID))))

END
IF(@STRCOUNT<=0)
BREAK
ELSE
CONTINUE
END

IF(@FLAG=1)

SET @IDIN=@IDIN+','+CAST(@DEALID AS VARCHAR)


 FETCH NEXT FROM db_cursor INTO @DEALID  
END  

CLOSE db_cursor  
DEALLOCATE db_cursor

DECLARE @CNT INT
DECLARE @SQL VARCHAR(2000)
SET @CNT=max(len(ltrim(rtrim(@IDIN))))
SET @IDIN=SUBSTRING(@IDIN,2,@CNT)

IF(@IDIN='')
SET @IDIN='0'
SET @SQL='SELECT TOP 4 * FROM NIL_BESTDEAL_MASTER WHERE BESTDEALID IN('+@IDIN+')'
EXEC(@SQL)



END




 

You can try the code below to get your system Information, Like hardware configuration etc.


Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Try
            'OS information
            ListView1.Items.Add("OS Name")
            ListView1.Items(0).SubItems.Add(My.Computer.Info.OSFullName)
            Dim info As Management.ManagementObject
            Dim search As New Management.ManagementObjectSearcher("SELECT * FROM Win32_OperatingSystem")
            For Each info In search.Get()
                ListView1.Items.Add("Version")
                ListView1.Items(1).SubItems.Add(My.Computer.Info.OSVersion & " Service Pack " & info("ServicePackMajorVersion").ToString & "." & info("ServicePackMinorVersion").ToString)
                ListView1.Items.Add("OS Manufacturer")
                ListView1.Items(2).SubItems.Add(info("Manufacturer").ToString())
            Next

            'Processor
            Dim search1 As New Management.ManagementObjectSearcher("SELECT * FROM Win32_Processor")
            For Each info In search1.Get()
                ListView2.Items.Add("Address Width")
                ListView2.Items(0).SubItems.Add(info("AddressWidth").ToString())
                ListView2.Items.Add("Architecture")
                ListView2.Items(1).SubItems.Add(info("Architecture").ToString())
                ListView2.Items.Add("Availability")
                ListView2.Items(2).SubItems.Add(info("Availability").ToString())
                ListView2.Items.Add("CPU Status")
                ListView2.Items(3).SubItems.Add(info("CpuStatus").ToString())
                ListView2.Items.Add("Processor Clock Speed")
                ListView2.Items(4).SubItems.Add(info("CurrentClockSpeed").ToString())
                ListView2.Items.Add("Data Width")
                ListView2.Items(5).SubItems.Add(info("DataWidth").ToString())
                ListView2.Items.Add("Description")
                ListView2.Items(6).SubItems.Add(info("Description").ToString())
                ListView2.Items.Add("Device ID")
                ListView2.Items(7).SubItems.Add(info("DeviceID").ToString())
                ListView2.Items.Add("Ext Clock")
                ListView2.Items(8).SubItems.Add(info("ExtClock").ToString())
                ListView2.Items.Add("Family")
                ListView2.Items(9).SubItems.Add(info("Family").ToString())
                ListView2.Items.Add("L2 Cache Size")
                ListView2.Items(10).SubItems.Add(info("L2CacheSize").ToString())
                ListView2.Items.Add("Manufacturer")
                ListView2.Items(11).SubItems.Add(info("Manufacturer").ToString())
                ListView2.Items.Add("Name")
                ListView2.Items(12).SubItems.Add(LTrim(info("Name").ToString()))
                ListView2.Items.Add("Processor Id")
                ListView2.Items(13).SubItems.Add(info("ProcessorId").ToString())
                ListView2.Items.Add("Processor Type")
                ListView2.Items(14).SubItems.Add(info("ProcessorType").ToString())
                ListView2.Items.Add("Socket Designation")
                ListView2.Items(15).SubItems.Add(info("SocketDesignation").ToString())
                ListView2.Items.Add("Status Information")
                ListView2.Items(16).SubItems.Add(info("StatusInfo").ToString())
                ListView2.Items.Add("Version")
                ListView2.Items(17).SubItems.Add(info("Version").ToString())
            Next

            'Motherboard
            Dim search2 As New Management.ManagementObjectSearcher("SELECT * FROM Win32_BaseBoard")
            For Each info In search2.Get()
                ListView3.Items.Add("Description")
                ListView3.Items(0).SubItems.Add(info("Description").ToString())
                ListView3.Items.Add("Hosting Board")
                ListView3.Items(1).SubItems.Add(info("HostingBoard").ToString())
                ListView3.Items.Add("Manufacturer")
                ListView3.Items(2).SubItems.Add(info("Manufacturer").ToString())
                ListView3.Items.Add("Name")
                ListView3.Items(3).SubItems.Add(info("Name").ToString())
                ListView3.Items.Add("Powered On")
                ListView3.Items(4).SubItems.Add(info("PoweredOn").ToString())
                ListView3.Items.Add("Product")
                ListView3.Items(5).SubItems.Add(info("Product").ToString())
                ListView3.Items.Add("Serial Number")
                ListView3.Items(6).SubItems.Add(info("SerialNumber").ToString())
            Next


        Catch ex As Exception
            MsgBox(ex.Message.ToString)
        End Try
    End Sub

 

1.    What are the new Data Controls in Asp.net 2.0?
Data access in ASP.NET 2.0 can be accomplished completely declaratively (no code) using the new data-bound and data source controls. There are new data source controls to represent different data backends such as SQL database, business objects, and XML, and there are new data-bound controls for rendering common UI for data, such as gridview, detailsview, and formview.
2.    What are the new Navigation Controls in Asp.net 2.0?
The navigation controls provide common UI for navigating between pages in your site, such as treeview, menu, and sitemappath. These controls use the site navigation service in ASP.NET 2.0 to retrieve the custom structure you have defined for your site.
3.    What are the new Login Controlsin Asp.net 2.0?
The new login controls provide the building blocks to add authentication and authorization-based UI to your site, such as login forms, create user forms, password retrieval, and custom UI for logged in users or roles. These controls use the built-in membership and role services in ASP.NET 2.0 to interact with the user and role information defined for your site.
4.    What are the new Web Part Controls in Asp.net 2.0 ?
Web parts are an exciting new family of controls that enable you to add rich, personalized content and layout to your site, as well as the ability to edit that content and layout directly from your application pages. These controls rely on the personalization services in ASP.NET 2.0 to provide a unique experience for each user in your application.
5.    What are Master Pages?
This feature provides the ability to define common structure and interface elements for your site, such as a page header, footer, or navigation bar, in a common location called a "master page", to be shared by many pages in your site. In one simple place you can control the look, feel, and much of functionality for an entire Web site. This improves the maintainability of your site and avoids unnecessary duplication of code for shared site structure or behavior.
6.    What are Themes and Skins in 2.0, explain usgae scenario?
The themes and skins features in ASP.NET 2.0 allow for easy customization of your site's look-and-feel. You can define style information in a common location called a "theme", and apply that style information globally to pages or controls in your site. Like Master Pages, this improves the maintainability of your site and avoid unnecessary duplication of code for shared styles.
7.    What is a profile object, why is it used?
Using the new personalization services in ASP.NET 2.0 you can easily create customized experiences within Web applications. The Profile object enables developers to easily build strongly-typed, sticky data stores for user accounts and build highly customized, relationship based experiences. At the same time, a developer can leverage Web Parts and the personalization service to enable Web site visitors to completely control the layout and behavior of the site, with the knowledge that the site is completely customized for them. Personalizaton scenarios are now easier to build than ever before and require significantly less code and effort to implement.

8.    What is Configuration API?
ASP.NET 2.0 contains new configuration management APIs, enabling users to programmatically build programs or scripts that create, read, and update Web.config and machine.config configuration files.
9.    What is MMC Admin Tool?
ASP.NET 2.0 provides a new comprehensive admin tool that plugs into the existing IIS Administration MMC, enabling an administrator to graphically read or change common settings within our XML configuration files.
10.    Explain the use of Pre-compilation Tool?
ASP.NET 2.0 delivers a new application deployment utility that enables both developers and administrators to precompile a dynamic ASP.NET application prior to deployment. This precompilation automatically identifies any compilation issues anywhere within the site, as well as enables ASP.NET applications to be deployed without any source being stored on the server (one can optionally remove the content of .aspx files as part of the compile phase), further protecting your intellectual property. 
11.    How is application management and maintenance improved in Asp.net 2.0?
ASP.NET 2.0 also provides new health-monitoring support to enable administrators to be automatically notified when an application on a server starts to experience problems. New tracing features will enable administrators to capture run-time and request data from a production server to better diagnose issues. ASP.NET 2.0 is delivering features that will enable developers and administrators to simplify the day-to-day management and maintenance of their Web applications.
12.    What are Provider-driven Application Services? explain in detail?
ASP.NET 2.0 now includes built-in support for membership (user name/password credential storage) and role management services out of the box. The new personalization service enables quick storage/retrieval of user settings and preferences, facilitating rich customization with minimal code. The new site navigation system enables developers to quickly build link structures consistently across a site. As all of these services are provider-driven, they can be easily swapped out and replaced with your own custom implementation. With this extensibility option, you have complete control over the data store and schema that drives these rich application services.
13.    Explain Server Control Extensibility with reference to Asp.net 2.0 ?
ASP.NET 2.0 includes improved support for control extensibility, such as more base classes that encapsulate common behaviors, improved designer support, more APIs for interacting with client-side script, metadata-driven support for new features like themes and accessibility verification, better state management, and more.
14.    What are the Data Source Controls?
Data access in ASP.NET 2.0 is now performed declaratively using data source controls on a page. In this model, support for new data backend storage providers can be easily added by implementing custom data source controls. Additionally, the SqlDataSource control that ships in the box has built-in support for any ADO.NET managed provider that implements the new provider factory model in ADO.NET.
15.    What are Compilation Build Providers?
Dynamic compilation in ASP.NET 2.0 is now handled by extensible compilation build providers, which associate a particular file extension with a handler that knows how to compile that extension dynamically at runtime. For example, .resx files can be dynamically compiled to resources, .wsdl files to web service proxies, and .xsd files to typed DataSet objects. In addition to the built-in support, it is easy to add support for additional extensions by implementing a custom build provider and registering it in Web.config.
16.    What is Expression Builders, why would you use it?
ASP.NET 2.0 introduces a declarative new syntax for referencing code to substitute values into the page, called Expression Builders. ASP.NET 2.0 includes expression builders for referencing string resources for localization, connection strings, application settings, and profile values. You can also write your own expression builders to create your own custom syntax to substitute values in a page rendering.
17.    Is ASP.NET 64-Bit enabled? how?
ASP.NET 2.0 is now 64-bit enabled, meaning it can take advantage of the full memory address space of new 64-bit processors and servers. Developers can simply copy existing 32-bit ASP.NET applications onto a 64-bit ASP.NET 2.0 server and have them automatically be JIT compiled and executed as native 64-bit applications (no source code changes or manual re-compile are required).
18.    Explain how Caching in Asp.net 2.0 is different from Caching in Asp.net 1.1?
ASP.NET 2.0 also now includes automatic database server cache invalidation. This powerful and easy-to-use feature allows developers to aggressively output cache database-driven page and partial page content within a site and have ASP.NET automatically invalidate these cache entries and refresh the content whenever the back-end database changes. Developers can now safely cache time-critical content for long periods without worrying about serving visitors stale data.

 

ASP.net 2.0

General Questions:
1.1 Do I need IIS to run Web applications?        


If you are using Visual Studio, you can use the ASP.NET Development Server built into Visual Studio to test your pages. The server functions as a local Web server, running ASP.NET Web pages in a manner virtually identical to how they run in IIS. To deploy a Web application, you need to copy it to a computer running IIS version 5 or 6.

1.2 How do I create pages for mobile devices?        


ASP.NET will automatically detect the type of browser making the request. This information is used by the page and by individual controls to render appropriate markup for that browser. You therefore do not need to use a special set of pages or controls for mobile devices. (Whether you can design a single page to work with all types of browsers will depend on the page, on the browsers you want to target, and on your own goals.)

1.3 Are ASP.NET pages XHTML compatible?        


Yes. Individual controls render markup that is compatible with the XHTML 1.1 standard. It is up to you, however, to include the appropriate document type declaration and other XHTML document elements. ASP.NET does not insert elements for you to ensure XHTML compatibility. For details, see ASP.NET and XHTML Compliance.

1.4 Can I hide the source code for my page?        


Server-side code is processed on the server and is not sent to the browser, so users cannot see it. However, client script is not protected; any client script that you add to your page, or that is injected into the page by server processing, is visible to users. If you are concerned about protecting your source code on the server, you can precompile your site and deploy the compiled version. For details, see Publishing Web Sites.

1.5 When I run a page, I get the error "The page cannot be displayed" and an HTTP 502 Proxy Error. Why?        


This error can occur if you are running ASP.NET Web pages using the Visual Web Developer Web server, because the URL includes a randomly selected port number. Proxy servers do not recognize the URL and return this error. To get around the problem, change your settings in Internet Explorer to bypass the proxy server for local addresses, so that the request is not sent to the proxy. In Internet Explorer, you can make this change in Tools > Internet Options. In the Connections tab, click LAN Settings and then select Bypass proxy server for local addresses.

1.6 Which page code model is preferable, single-file or code-behind?        


Both models function the same and have the same performance. The choice of using single-file pages versus code-behind pages is one of personal preference and convenience. For details, see ASP.NET Web Page Code Model.

The QuickStart examples and examples in the API reference seem to use single-file pages frequently. Does this mean that single-file is the preferred model for pages?

No. Single-file pages are frequently used in examples because they are easier to illustrate — the writer does not have to create a separate file to show the code.

1.7 Is it better to write code in C# or Visual Basic?        


You can write code for your Web application in any language supported by the .NET Framework. That includes Visual Basic, C#, J#, JScript, and others. Although the languages have different syntax, they all compile to the same object code. The languages have small differences in how they support different features. For example, C# provides access to unmanaged code, while Visual Basic supports implicit event binding via the Handles clause. However, the differences are minor, and unless your requirements involve one of these small differences, the choice of programming language is one of personal preference. Once programs are compiled, they all perform identically; that is, Visual Basic programs run just as fast as C# programs, since they both produce the same object code.

1.8 Do I have to use one programming language for all my Web pages?        


No. Each page can be written in a different programming language if you want, even in the same application. If you are creating source code files and putting them in the \App_Code folder to be compiled at run time, all the code in must be in the same language. However, you can create subfolders in the \App_Code folder and use the subfolders to store components written in different programming languages.

1.9 Is the code in single-file and code-behind pages identical?        


Almost. A code-behind file contains an explicit class declaration, which is not required for single-file pages.

1.10 Is the old code-behind model still supported?        


Old projects will continue to run without change. In Visual Studio 2005, if you open a project created in Visual Studio .NET 2002 or 2003, by default, the project is converted to the new project layout used in Visual Studio 2005. As part of the conversion, pages that use the old code-behind model are converted to use the new code-behind model. Visual Studio 2005 Web Application Projects provide an alternative web project model that uses the same project, build and compilation semantics as the Visual Studio .NET 2003 code-behind model. For details, see Visual Studio 2005 Web Application Projects.

 

61.    Give a few examples of types of applications that can benefit from using XML.
There are literally thousands of applications that can benefit from XML technologies. The point of this question is not to have the candidate rattle off a laundry list of projects that they have worked on, but, rather, to allow the candidate to explain the rationale for choosing XML by citing a few real world examples. For instance, one appropriate answer is that XML allows content management systems to store documents independently of their format, which thereby reduces data redundancy. Another answer relates to B2B exchanges or supply chain management systems. In these instances, XML provides a mechanism for multiple companies to exchange data according to an agreed upon set of rules. A third common response involves wireless applications that require WML to render data on hand held devices.
62.    What is DOM and how does it relate to XML?
The Document Object Model (DOM) is an interface specification maintained by the W3C DOM Workgroup that defines an application independent mechanism to access, parse, or update XML data. In simple terms it is a hierarchical model that allows developers to manipulate XML documents easily Any developer that has worked extensively with XML should be able to discuss the concept and use of DOM objects freely. Additionally, it is not unreasonable to expect advanced candidates to thoroughly understand its internal workings and be able to explain how DOM differs from an event-based interface like SAX.
63.    What is SOAP and how does it relate to XML?
The Simple Object Access Protocol (SOAP) uses XML to define a protocol for the exchange of information in distributed computing environments. SOAP consists of three components: an envelope, a set of encoding rules, and a convention for representing remote procedure calls. Unless experience with SOAP is a direct requirement for the open position, knowing the specifics of the protocol, or how it can be used in conjunction with HTTP, is not as important as identifying it as a natural application of XML.
64.    Can you walk us through the steps necessary to parse XML documents?
Superficially, this is a fairly basic question. However, the point is not to determine whether candidates understand the concept of a parser but rather have them walk through the process of parsing XML documents step-by-step. Determining whether a non-validating or validating parser is needed, choosing the appropriate parser, and handling errors are all important aspects to this process that should be included in the candidate's response.
65.    What are possible implementations of distributed applications in .NET?
.NET Remoting and ASP.NET Web Services. If we talk about the Framework Class Library, noteworthy classes are in System.Runtime.Remoting and System.Web.Services.
66.    What are the consideration in deciding to use .NET Remoting or ASP.NET Web Services?
Remoting is a more efficient communication exchange when you can control both ends of the application involved in the communication process. Web Services provide an open-protocol-based exchange of informaion. Web Services are best when you need to communicate with an external organization or another (non-.NET) technology.
67.    What’s a proxy of the server object in .NET Remoting?
It’s a fake copy of the server object that resides on the client side and behaves as if it was the server. It handles the communication between real server object and the client object. This process is also known as marshaling.
68.    What are remotable objects in .NET Remoting?
Remotable objects are the objects that can be marshaled across the application domains. You can marshal by value, where a deep copy of the object is created and then passed to the receiver. You can also marshal by reference, where just a reference to an existing object is passed.
69.    What are channels in .NET Remoting?
Channels represent the objects that transfer the other serialized objects from one application domain to another and from one computer to another, as well as one process to another on the same box. A channel must exist before an object can be transferred.
70.    What security measures exist for .NET Remoting in System.Runtime.Remoting?
None. Security should be taken care of at the application level. Cryptography and other security techniques can be applied at application or server level.
71.    What is a formatter?
A formatter is an object that is responsible for encoding and serializing data into messages on one end, and deserializing and decoding messages into data on the other end.
72.    Choosing between HTTP and TCP for protocols and Binary and SOAP for formatters, what are the trade-offs?
Binary over TCP is the most effiecient, SOAP over HTTP is the most interoperable.
73.    What’s SingleCall activation mode used for?
If the server object is instantiated for responding to just one single request, the request should be made in SingleCall mode.
74.    What’s Singleton activation mode?
A single object is instantiated regardless of the number of clients accessing it. Lifetime of this object is determined by lifetime lease.
75.    How do you define the lease of the object?
By implementing ILease interface when writing the class code.
76.    Can you configure a .NET Remoting object via XML file?
Yes, via machine.config and application level .config file (or web.config in ASP.NET). Application-level XML settings take precedence over machine.config.
77.    How can you automatically generate interface for the remotable object in .NET with Microsoft tools?
Use the Soapsuds tool.

 

26.  How do I create an ASPX page that periodically refreshes itself?

The following META tag can be used as a trigger to automatically refresh the page every n seconds:

27.  How do I initialize a TextBox whose TextMode is "password", with a password?

The TextBox’s Text property cannot be used to assign a value to a password field. Instead, its Value field can be used for that purpose.

                      ID="Password" RunAt="server" />

28.  Why does the control's PostedFile property always show null when using HtmlInputFile control to upload files to a Web server?

This occurs when an enctype="multipart/form-data" attribute is missing in the

tag.

29.  How can the focus be set to a specific control when a Web form loads?

This can be achieved by using client-side script:

document.forms[0].TextBox1.focus ()

The above code will set the focus to a TextBox named TextBox1 when the page loads.

30.  How does System.Web.UI.Page's IsPostBack property work?

IsPostBack checks to see whether the HTTP request is accompanied by postback data containing a __VIEWSTATE or __EVENTTARGET parameter. If there are none, then it is not a postback.

31.  What is WSDL?

WSDL is an XML format for describing network services as a set of endpoints operating on messages containing either document-oriented or procedure-oriented information. The operations and messages are described abstractly, and then bound to a concrete network protocol and message format to define an endpoint. Related concrete endpoints are combined into abstract endpoints (services). (Source: www.w3.org)

32.  What is UDDI?

UDDI stands for Universal Description, Discovery, and Integration. It is like an "Yellow Pages" for Web Services. It is maintained by Microsoft, IBM, and Ariba, and is designed to provide detailed information regarding registered Web Services for all vendors. The UDDI can be queried for specific Web Services.

33.  Is it possible to generate the source code for an ASP.NET Web service from a WSDL?

The Wsdl.exe tool (.NET Framework SDK) can be used to generate source code for an ASP.NET web service with its WSDL link.

Example: wsdl /server http://api.google.com/GoogleSearch.wsdl.

34.  Why do uploads fail while using an ASP.NET file upload control to upload large files?

ASP.NET limits the size of file uploads for security purposes. The default size is 4 MB. This can be changed by modifying the maxRequestLength attribute of Machine.config's element.

35.  Describe the difference between inline and code behind.

Inline code is written along side the HTML in a page. Code-behind is code written in a separate file and referenced by the .aspx page.

51.  Describe the role of inetinfo.exe, aspnet_isapi.dll andaspnet_wp.exe in the page loading process.

inetinfo.exe is theMicrosoft IIS server running, handling ASP.NET requests among other things.When an ASP.NET request is received (usually a file with .aspx extension), the ISAPI filter aspnet_isapi.dll takes care of it by passing the request tothe actual worker process aspnet_wp.exe.

52.  Can you explain the difference between an ADO.NET Dataset and an ADO Recordset?

Valid answers are:

o        A DataSet can represent an entire relational database in memory, complete with tables, relations, and views.

o        A DataSet is designed to work without any continuing connection to the original data source.

o        Data in a DataSet is bulk-loaded, rather than being loaded on demand.

o        There's no concept of cursor types in a DataSet.

o        DataSets have no current record pointer You can use For Each loops to move through the data.

o        You can store many edits in a DataSet, and write them to the original data source in a single operation.

o        Though the DataSet is universal, other objects in ADO.NET come in different versions for different data sources.

53.  What’s a bubbled event?

When you have a complex control, like DataGrid, writing an event processing routine for each object (cell, button, row, etc.) is quite tedious. The controls can bubble up their eventhandlers, allowing the main DataGrid event handler to take care of its constituents.

54.  What data types do the RangeValidator control support?

Integer, String, and Date.

55.  Explain what a diffgram is, and a good use for one?

The DiffGram is one of the two XML formats that you can use to render DataSet object contents to XML. A good use is reading database data to an XML file to be sent to a Web Service.

56.  What is the transport protocol you use to call a Web service?

SOAP (Simple Object Access Protocol) is the preferred protocol.

57.  What is ViewState?

ViewState allows the state of objects (serializable) to be stored in a hidden field on the page. ViewState is transported to the client and back to the server, and is not stored on the server or any other external source. ViewState is used the retain the state of server-side objects between postabacks.

58.  What does the "EnableViewState" property do? Why would I want it on or off?

It allows the page to save the users input on a form across postbacks. It saves the server-side values for a given control into ViewState, which is stored as a hidden value on the page before sending the page to the clients browser. When the page is posted back to the server the server control is recreated with the state stored in viewstate.

59.  What are the different types of Session state management options available with ASP.NET?

ASP.NET provides In-Process and Out-of-Process state management. In-Process stores the session in memory on the web server. This requires the a "sticky-server" (or no load-balancing) so that the user is always reconnected to the same web server. Out-of-Process Session state management stores data in an external data source. The external data source may be either a SQL Server or a State Server service. Out-of-Process state management requires that all objects stored in session are serializable.

 

1.    What do I need to create and run an ASP.NET application?
•    Windows 2000, Windows Server 2003 or Windows XP.
•    ASP.NET, which can be either the redistributable (included in the .NET SDK) or Visual Studio .NET.
1.    Where can I download the .NET SDK?
.NET SDK can be obtained here.
(You have to install the Microsoft .NET Framework Version 1.1 Redistributable Package before installing the .NET SDK.)
2.    Are there any free IDEs for the .NET SDK?
o    Microsoft provides Visual Studio 2005 Express Edition Beta for free. Of particular interest to the ASP.NET developers would be the Visual Web Developer 2005 Express Edition Beta 2 available as a free download.
o    The ASP.NET Web Matrix Project (supported by Microsoft) is a free IDE for developing ASP.NET applications and is available here.
o    There is also a free open-source UNIX version of the Microsoft .NET development platform called Mono available for download here.
o    Another increasingly popular Open Source Development Environment for .NET is the #develop (short for SharpDevelop) available for download here.
3.    When was ASP.NET released?
ASP.NET is a part of the .NET framework which was released as a software platform in 2002.
4.    Is a new version coming up?
ASP.NET 2.0, Visual Studio 2005 (Whidbey), Visual Web Developer 2005 Express Edition are the next releases of Microsoft's Web platform and tools. They have already been released as Beta versions. They are scheduled to be released in the week of November 7, 2005.
5.    Explain Namespace.
Namespaces are logical groupings of names used within a program. There may be multiple namespaces in a single application code, grouped based on the identifiers’ use. The name of any given identifier must appear only once in its namespace.
6.    List the types of Authentication supported by ASP.NET.
o    Windows (default)
o    Forms
o    Passport
o    None (Security disabled)
7.    What is CLR?
Common Language Runtime (CLR) is a run-time environment that manages the execution of .NET code and provides services like memory management, debugging, security, etc. The CLR is also known as Virtual Execution System (VES).
8.    What is CLI?
The CLI is a set of specifications for a runtime environment, including a common type system, base class library, and a machine-independent intermediate code known as the Common Intermediate Language (CIL). (Source: Wikipedia.)
9.    List the various stages of Page-Load lifecycle.
o    Init()
o    Load()
o    PreRender()
o    Unload()
10.    Explain Assembly and Manifest.
An assembly is a collection of one or more files and one of them (DLL or EXE) contains a special metadata called Assembly Manifest. The manifest is stored as binary data and contains details like versioning requirements for the assembly, the author, security permissions, and list of files forming the assembly. An assembly is created whenever a DLL is built. The manifest can be viewed programmatically by making use of classes from the System.Reflection namespace. The tool Intermediate Language Disassembler (ILDASM) can be used for this purpose. It can be launched from the command prompt or via Start> Run.
11.    What is Shadow Copy?
In order to replace a COM component on a live web server, it was necessary to stop the entire website, copy the new files and then restart the website. This is not feasible for the web servers that need to be always running. .NET components are different. They can be overwritten at any time using a mechanism called Shadow Copy. It prevents the Portable Executable (PE) files like DLLs and EXEs from being locked. Whenever new versions of the PEs are released, they are automatically detected by the CLR and the changed components will be automatically loaded. They will be used to process all new requests not currently executing, while the older version still runs the currently executing requests. By bleeding out the older version, the update is completed.
12.    What is DLL Hell?
DLL hell is the problem that occurs when an installation of a newer application might break or hinder other applications as newer DLLs are copied into the system and the older applications do not support or are not compatible with them. .NET overcomes this problem by supporting multiple versions of an assembly at any given time. This is also called side-by-side component versioning.
13.    Explain Web Services.
Web services are programmable business logic components that provide access to functionality through the Internet. Standard protocols like HTTP can be used to access them. Web services are based on the Simple Object Access Protocol (SOAP), which is an application of XML. Web services are given the .asmx extension.
14.    Explain Windows Forms.
Windows Forms is employed for developing Windows GUI applications. It is a class library that gives developers access to Windows Common Controls with rich functionality. It is a common GUI library for all the languages supported by the .NET Framework.
15.    What is Postback?
When an action occurs (like button click), the page containing all the controls within the tag performs an HTTP POST, while having itself as the target URL. This is called Postback.
16.    Explain the differences between server-side and client-side code?
Server side scripting means that all the script will be executed by the server and interpreted as needed. Client side scripting means that the script will be executed immediately in the browser such as form field validation, clock, email validation, etc. Client side scripting is usually done in VBScript or JavaScript. Since the code is included in the HTML page, anyone can see the code by viewing the page source. It also poses as a possible security hazard for the client computer.
17.    Enumerate the types of Directives.
o    @ Page directive
o    @ Import directive
o    @ Implements directive
o    @ Register directive
o    @ Assembly directive
o    @ OutputCache directive
o    @ Reference directive
18.    What is Code-Behind?
Code-Behind is a concept where the contents of a page are in one file and the server-side code is in another. This allows different people to work on the same page at the same time and also allows either part of the page to be easily redesigned, with no changes required in the other. An Inherits attribute is added to the @ Page directive to specify the location of the Code-Behind file to the ASP.NET page.
19.    Describe the difference between inline and code behind.
Inline code is written along side the HTML in a page. There is no separate distinction between design code and logic code. Code-behind is code written in a separate file and referenced by the .aspx page.
20.    List the ASP.NET validation controls?
o    RequiredFieldValidator
o    RangeValidator
o    CompareValidator
o    RegularExpressionValidator
o    CustomValidator
o    ValidationSummary
21.    What is Data Binding?
Data binding is a way used to connect values from a collection of data (e.g. DataSet) to the controls on a web form. The values from the dataset are automatically displayed in the controls without having to write separate code to display them.
22.    Describe Paging in ASP.NET.
The DataGrid control in ASP.NET enables easy paging of the data. The AllowPaging property of the DataGrid can be set to True to perform paging. ASP.NET automatically performs paging and provides the hyperlinks to the other pages in different styles, based on the property that has been set for PagerStyle.Mode.
23.    Should user input data validation occur server-side or client-side? Why?
All user input data validation should occur on the server and minimally on the client-side, though it is a good way to reduce server load and network traffic because we can ensure that only data of the appropriate type is submitted from the form. It is totally insecure. The user can view the code used for validation and create a workaround for it. Secondly, the URL of the page that handles the data is freely visible in the original form page. This will allow unscrupulous users to send data from their own forms to your application. Client-side validation can sometimes be performed where deemed appropriate and feasible to provide a richer, more responsive experience for the user.
24.    What is the difference between Server.Transfer and Response.Redirect?
o    Response.Redirect: This tells the browser that the requested page can be found at a new location. The browser then initiates another request to the new page loading its contents in the browser. This results in two requests by the browser.
o    Server.Transfer: It transfers execution from the first page to the second page on the server. As far as the browser client is concerned, it made one request and the initial page is the one responding with content. The benefit of this approach is one less round trip to the server from the client browser. Also, any posted form variables and query string parameters are available to the second page as well.    
26.    What is an interface and what is an abstract class?
In an interface, all methods must be abstract (must not be defined). In an abstract class, some methods can be defined. In an interface, no accessibility modifiers are allowed, whereas it is allowed in abstract classes.
27.    Session state vs. View state:
In some cases, using view state is not feasible. The alternative for view state is session state. Session state is employed under the following situations:
o    Large amounts of data - View state tends to increase the size of both the HTML page sent to the browser and the size of form posted back. Hence session state is used.
o    Secure data - Though the view state data is encoded and may be encrypted, it is better and secure if no sensitive data is sent to the client. Thus, session state is a more secure option.
o    Problems in serializing of objects into view state - View state is efficient for a small set of data. Other types like DataSet are slower and can generate a very large view state.
28.    Can two different programming languages be mixed in a single ASPX file?
ASP.NET’s built-in parsers are used to remove code from ASPX files and create temporary files. Each parser understands only one language. Therefore mixing of languages in a single ASPX file is not possible.
29.    Is it possible to see the code that ASP.NET generates from an ASPX file?
By enabling debugging using a <%@ Page Debug="true" %> directive in the ASPX file or a statement in Web.config, the generated code can be viewed. The code is stored in a CS or VB file (usually in the \%SystemRoot%\Microsoft.NET\Framework\v1.0.nnnn\Temporary ASP.NET Files).
30.    Can a custom .NET data type be used in a Web form?
This can be achieved by placing the DLL containing the custom data type in the application root's bin directory and ASP.NET will automatically load the DLL when the type is referenced.
31.    List the event handlers that can be included in Global.asax?
o    Application start and end event handlers
o    Session start and end event handlers
o    Per-request event handlers
o    Non-deterministic event handlers
32.    Can the view state be protected from tampering?
This can be achieved by including an @ Page directive with an EnableViewStateMac="true" attribute in each ASPX file that has to be protected. Another way is to include the statement in the Web.config file.
33.    Can the view state be encrypted?
The view state can be encrypted by setting EnableViewStateMac to true and either modifying the element in Machine.config to tag. Then, a byte[] can be declared to read in the data from the input file. This can then be sent to the server.

 

1.    What do I need to create and run an ASP.NET application?
•    Windows 2000, Windows Server 2003 or Windows XP.
•    ASP.NET, which can be either the redistributable (included in the .NET SDK) or Visual Studio .NET.
1.    Where can I download the .NET SDK?
.NET SDK can be obtained here.
(You have to install the Microsoft .NET Framework Version 1.1 Redistributable Package before installing the .NET SDK.)
2.    Are there any free IDEs for the .NET SDK?
o    Microsoft provides Visual Studio 2005 Express Edition Beta for free. Of particular interest to the ASP.NET developers would be the Visual Web Developer 2005 Express Edition Beta 2 available as a free download.
o    The ASP.NET Web Matrix Project (supported by Microsoft) is a free IDE for developing ASP.NET applications and is available here.
o    There is also a free open-source UNIX version of the Microsoft .NET development platform called Mono available for download here.
o    Another increasingly popular Open Source Development Environment for .NET is the #develop (short for SharpDevelop) available for download here.
3.    When was ASP.NET released?
ASP.NET is a part of the .NET framework which was released as a software platform in 2002.
4.    Is a new version coming up?
ASP.NET 2.0, Visual Studio 2005 (Whidbey), Visual Web Developer 2005 Express Edition are the next releases of Microsoft's Web platform and tools. They have already been released as Beta versions. They are scheduled to be released in the week of November 7, 2005.
5.    Explain Namespace.
Namespaces are logical groupings of names used within a program. There may be multiple namespaces in a single application code, grouped based on the identifiers’ use. The name of any given identifier must appear only once in its namespace.
6.    List the types of Authentication supported by ASP.NET.
o    Windows (default)
o    Forms
o    Passport
o    None (Security disabled)
7.    What is CLR?
Common Language Runtime (CLR) is a run-time environment that manages the execution of .NET code and provides services like memory management, debugging, security, etc. The CLR is also known as Virtual Execution System (VES).
8.    What is CLI?
The CLI is a set of specifications for a runtime environment, including a common type system, base class library, and a machine-independent intermediate code known as the Common Intermediate Language (CIL). (Source: Wikipedia.)
9.    List the various stages of Page-Load lifecycle.
o    Init()
o    Load()
o    PreRender()
o    Unload()
10.    Explain Assembly and Manifest.
An assembly is a collection of one or more files and one of them (DLL or EXE) contains a special metadata called Assembly Manifest. The manifest is stored as binary data and contains details like versioning requirements for the assembly, the author, security permissions, and list of files forming the assembly. An assembly is created whenever a DLL is built. The manifest can be viewed programmatically by making use of classes from the System.Reflection namespace. The tool Intermediate Language Disassembler (ILDASM) can be used for this purpose. It can be launched from the command prompt or via Start> Run.
11.    What is Shadow Copy?
In order to replace a COM component on a live web server, it was necessary to stop the entire website, copy the new files and then restart the website. This is not feasible for the web servers that need to be always running. .NET components are different. They can be overwritten at any time using a mechanism called Shadow Copy. It prevents the Portable Executable (PE) files like DLLs and EXEs from being locked. Whenever new versions of the PEs are released, they are automatically detected by the CLR and the changed components will be automatically loaded. They will be used to process all new requests not currently executing, while the older version still runs the currently executing requests. By bleeding out the older version, the update is completed.
12.    What is DLL Hell?
DLL hell is the problem that occurs when an installation of a newer application might break or hinder other applications as newer DLLs are copied into the system and the older applications do not support or are not compatible with them. .NET overcomes this problem by supporting multiple versions of an assembly at any given time. This is also called side-by-side component versioning.
13.    Explain Web Services.
Web services are programmable business logic components that provide access to functionality through the Internet. Standard protocols like HTTP can be used to access them. Web services are based on the Simple Object Access Protocol (SOAP), which is an application of XML. Web services are given the .asmx extension.
14.    Explain Windows Forms.
Windows Forms is employed for developing Windows GUI applications. It is a class library that gives developers access to Windows Common Controls with rich functionality. It is a common GUI library for all the languages supported by the .NET Framework.
15.    What is Postback?
When an action occurs (like button click), the page containing all the controls within the tag performs an HTTP POST, while having itself as the target URL. This is called Postback.
16.    Explain the differences between server-side and client-side code?
Server side scripting means that all the script will be executed by the server and interpreted as needed. Client side scripting means that the script will be executed immediately in the browser such as form field validation, clock, email validation, etc. Client side scripting is usually done in VBScript or JavaScript. Since the code is included in the HTML page, anyone can see the code by viewing the page source. It also poses as a possible security hazard for the client computer.
17.    Enumerate the types of Directives.
o    @ Page directive
o    @ Import directive
o    @ Implements directive
o    @ Register directive
o    @ Assembly directive
o    @ OutputCache directive
o    @ Reference directive
18.    What is Code-Behind?
Code-Behind is a concept where the contents of a page are in one file and the server-side code is in another. This allows different people to work on the same page at the same time and also allows either part of the page to be easily redesigned, with no changes required in the other. An Inherits attribute is added to the @ Page directive to specify the location of the Code-Behind file to the ASP.NET page.
19.    Describe the difference between inline and code behind.
Inline code is written along side the HTML in a page. There is no separate distinction between design code and logic code. Code-behind is code written in a separate file and referenced by the .aspx page.
20.    List the ASP.NET validation controls?
o    RequiredFieldValidator
o    RangeValidator
o    CompareValidator
o    RegularExpressionValidator
o    CustomValidator
o    ValidationSummary

 

21.    Describe the difference between inline and code behind. Inline code written along side the html in a page. Code-behind is code written in a separate file and referenced by the .aspx page.
22.    Explain what a diffgram is, and a good use for one? The DiffGram is one of the two XML formats that you can use to render DataSet object contents to XML. For reading database data to an XML file to be sent to a Web Service.
23.    Whats MSIL, and why should my developers need an appreciation of it if at all? MSIL is the Microsoft Intermediate Language. All .NET compatible languages will get converted to MSIL.
24.    Which method do you invoke on the DataAdapter control to load your generated dataset with data? The .Fill() method
25.    Can you edit data in the Repeater control?  No, it just reads the information from its data source
26.    Which template must you provide, in order to display data in a Repeater control? ItemTemplate
27.    How can you provide an alternating color scheme in a Repeater control? Use the AlternatingItemTemplate
28.    What property must you set, and what method must you call in your code, in order to bind the data from some data source to the Repeater control? You must set the DataSource property and call the DataBind method.
29.    What base class do all Web Forms inherit from?  The Page class.
30.    Name two properties common in every validation control? ControlToValidate property and Text property.
31.    What tags do you need to add within the asp:datagrid tags to bind columns manually? Set AutoGenerateColumns Property to false on the datagrid tag
32.    What tag do you use to add a hyperlink column to the DataGrid?
33.    What is the transport protocol you use to call a Web service? SOAP is the preferred protocol.
34.    True or False: A Web service can only be written in .NET? False
35.    What does WSDL stand for? (Web Services Description Language)
36.    Where on the Internet would you look for Web services? (http://www.uddi.org)
37.    Which property on a Combo Box do you set with a column name, prior to setting the DataSource, to display data in the combo box? DataTextField property
38.    Which control would you use if you needed to make sure the values in two different controls matched?  CompareValidator Control
39.    True or False: To test a Web service you must create a windows application or Web application to consume this service? False, the webservice comes with a test page and it provides HTTP-GET method to test.

 

1.    What is the .NET Framework?
The .NET Framework is a development and execution environment that allows different programming languages & libraries to work together seamlessly to create Windows, Web, or Mobile applications that are easier to build, manage, deploy, and integrate with other networked systems or as stand alone applications.
The .NET Framework consists of:
The Common Language Runtime (CLR)
A language-neutral development & execution environment that provides services to help "manage" application execution

The Framework Class Libraries (FCL)
A consistent, object-oriented library of prepackaged functionality
2.    Describe the role of inetinfo.exe, aspnet_isapi.dll andaspnet_wp.exe in the page loading process. 
 inetinfo.exe is the Microsoft IIS server running, handling ASP.NET requests among other things. When an ASP.NET request is received (usually a file with .aspx extension),the ISAPI filter aspnet_isapi.dll takes care of it by passing the request to the actual worker process aspnet_wp.exe.
3.    What’s the difference between Response.Write() andResponse.Output.Write()? The latter one allows you to write formatted output.
4.    What methods are fired during the page load? Init() - when the page is instantiated, Load() - when the page is loaded into server memory,PreRender() - the brief moment before the page is displayed to the user as HTML, Unload() - when page finishes loading.
5.    Where does the Web page belong in the .NET Framework class hierarchy? System.Web.UI.Page
6.    Where do you store the information about the user’s locale? System.Web.UI.Page.Culture
7.    What’s the difference between Codebehind="MyCode.aspx.cs" andSrc="MyCode.aspx.cs"? CodeBehind is relevant to Visual Studio.NET only.
8.    What’s a bubbled event? When you have a complex control, like DataGrid, writing an event processing routine for each object (cell, button, row, etc.) is quite tedious. The controls can bubble up their eventhandlers, allowing the main DataGrid event handler to take care of its constituents.
9.    Suppose you want a certain ASP.NET function executed on MouseOver overa certain button. Where do you add an event handler? It’s the Attributes property, the Add function inside that property. So btnSubmit.Attributes.Add("onMouseOver","someClientCode();")
10.    What data type does the RangeValidator control support? Integer, String and Date.
11.    Explain the differences between Server-side and Client-side code?  Server-side code runs on the server. Client-side code runs in the clients’ browser.
12.    What type of code (server or client) is found in a Code-Behind class? Server-side code.
13.    Should validation (did the user enter a real date) occur server-side or client-side? Why? Client-side. This reduces an additional request to the server to validate the users input.
14.    What does the "EnableViewState" property do? Why would I want it on or off?  It enables the viewstate on the page. It allows the page to save the users input on a form.
15.    What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over the other? Server.Transfer is used to post a form to another page. Response.Redirect is used to redirect the user to another page or site.
16.    Can you explain the difference between an ADO.NET Dataset and an ADO Recordset?
•    A DataSet can represent an entire relational database in memory, complete with tables, relations, and views.
•    A DataSet is designed to work without any continuing connection to the original data source.
•    Data in a DataSet is bulk-loaded, rather than being loaded on demand.
•    There's no concept of cursor types in a DataSet.
•    DataSets have no current record pointer You can use For Each loops to move through the data.
•    You can store many edits in a DataSet, and write them to the original data source in a single operation.
•    Though the DataSet is universal, other objects in ADO.NET come in different versions for different data sources.
17.    Can you give an example of what might be best suited to place in the Application_Start and Session_Start subroutines?  This is where you can set the specific variables for the Application and Session objects.
18.    If I’m developing an application that must accommodate multiple security levels though secure login and my ASP.NET web application is spanned across three web-servers (using round-robin load balancing) what would be the best approach to maintain login-in state for the users? Maintain the login state security through a database.
19.    Can you explain what inheritance is and an example of when you might use it? When you want to inherit (use the functionality of) another class. Base Class Employee. A Manager class could be derived from the Employee base class.
20.    Whats an assembly?  Assemblies are the building blocks of the .NET framework. Overview of assemblies from MSDN

 

What is ASP.NET?

Posted In: . By KK

---------------------------------

For years now, Active Server Pages (ASP) has been arguably the leading choice
for Web developers building dynamic Websites on Windows Web servers. ASP
has gained popularity by offering the simplicity of flexible scripting via several
languages. That, combined with the fact that it’s built into every Microsoft
Windows-based Web server, has made ASP a difficult act to follow.

Early in 2002, Microsoft released its new technology for Internet development.
Originally called ASP+, it was finally released as ASP.NET, and represents a leap
forward from ASP both in sophistication and productivity for the developer. It
continues to offer flexibility in terms of the languages it supports, but instead of
a range of simple scripting languages, developers can now choose between several
fully-fledged programming languages. Development in ASP.NET requires not
only an understanding of HTML and Web design, but also a firm grasp of the
concepts of object-oriented programming and development.

In the next few sections, I’ll introduce you to the basics of ASP.NET. I’ll walk
you through installing it on your Web server, and take you through a simple dynamic example that demonstrates how ASP.NET pages are constructed. First, let’s define what ASP.NET actually is.
ASP.NET is a server-side technology for developing Web applications based on the Microsoft .NET Framework. Let’s break that jargon-filled sentence down.

ASP.NET is server-side; that is, it runs on the Web server. Most Web designers start by learning client-side technologies like HTML, JavaScript, and Cascading Style Sheets (CSS). When a Web browser requests a Web page created with clientside technologies, the Web server simply grabs the files that the browser (the
client) requests and sends them down the line. The client is entirely responsible for reading the code in the files and interpreting it to display the page on the screen. Server-side technologies, like ASP.NET, are different. Instead of being interpreted by the client, server-side code (for example, the code in an ASP.NET page) is interpreted by the Web server. In the case of ASP.NET, the code in the page is read by the server and used dynamically to generate standard HTML/JavaScript/CSS that is then sent to the browser. As all processing of
ASP.NET code occurs on the server, it’s called a server-side technology. As Figure 1.1 shows, the user (client) only sees the HTML, JavaScript, and CSS within the browser. The server (and server-side technology) is entirely responsible for processing the dynamic portions of the page.
 
ASP.NET is a technology for developing Web applications. A Web application is just a fancy name for a dynamic Website. Web applications usually (but not always) store information in a database on the Web server, and allow visitors to the site to access and change that information. Many different programming technologies and supported languages have been developed to create Web applications; PHP, JSP (using Java), CGI (using Perl), and ColdFusion (using CFML) are just a few of the more popular ones. Rather than tying you to a specific technology and language, however, ASP.NET lets you write Web applications
using a variety of familiar programming languages. Finally, ASP.NET is based on the Microsoft .NET Framework. The .NET Framework collects all the technologies needed for building Windows applications,
Web applications, and Web Services into a single package with a set of more than twenty programming languages. To develop Websites with ASP.NET, you’ll need to download the .NET Framework Software Development Kit, which I’ll guide you through in the next few sections. Even with all the jargon demystified, you’re probably still wondering: what makes ASP.NET so good? Compared with other options for building Web applications, ASP.NET has the following advantages:
1.  ASP.NET lets you use your favorite programming language, or at least one that’s really close to it. The .NET Framework currently supports over twenty languages, four of which may be used to build ASP.NET Websites.
2. ASP.NET pages are compiled, not interpreted. Instead of reading and interpreting your code every time a dynamic page is requested, ASP.NET compiles dynamic pages into efficient binary files that the server can execute very quickly. This represents a big jump in performance when compared with the technology’s interpreted predecessor, ASP.
3. ASP.NET has full access to the functionality of the .NET Framework. Support for XML, Web Services, database interaction, email, regular expressions, and many other technologies are built right into .NET, which saves you from having to reinvent the wheel.
4. ASP.NET allows you to separate the server-side code in your pages from the HTML layout. When you’re working with a team composed of programmers and design specialists, this separation is a great help, as it lets programmers modify the server-side code without stepping on the designers’ carefully crafted HTML—and vice versa. With all these advantages, ASP.NET has relatively few downsides. In fact, only
two come to mind:
5.  ASP.NET is a Microsoft technology. While this isn’t a problem in itself, it does mean that, at least for now, you need to use a Windows server to run an ASP.NET Website. If your organization uses Linux or some other operating system for its Web servers, you’re out of luck.
6. Serious ASP.NET development requires an understanding of object-oriented programming, which we’ll cover over the next few chapters. Still with me? Great! It’s time to gather the tools and start building!

 

Introduction

Posted In: . By KK

What is .NET?
--------------------
.NET is the result of a complete make-over of Microsoft’s software development
products, and forms part of the company’s new strategy for delivering software
as a service. The key features that .NET offers include:
1. .NET Platform: The .NET platform includes the .NET Framework and tools
    to build and operate services, clients, and so on. ASP.NET, the focus of this
    book, is a part of the .NET Framework.
    2. .NET Products: .NET products currently include MSN.NET, Office.NET,
      Visual Studio.NET, and Windows Server 2003, originally known as Windows
      .NET Server. This suite of extensively revised systems provides developers
      with a friendly, usable environment in which they may create applications
      with a range of programming languages including C++. NET, Visual Basic.
      NET, ASP.NET, and C#. Because all these products are built on top of
      .NET, they all share key components, and underneath their basic syntaxes
      you’ll find they have much in common.
        3. .NET My Services: An initiative formerly known as "Hailstorm", .NET My Services is a set of XML Web Services1 currently being provided by a host of
        partners, developers, and organizations that are hoping to build corporate
        services and applications for devices and applications, as well as the Internet.
        The collection of My Services currently extends to passport, messenger, contacts,
        email, calendars, profiles, lists, wallets, location, document stores, application
        settings, favorite Websites, devices owned, and preferences for receiving
        alerts.

         

        By KK

        gigouho'
        ughg
        ihi