ASP.NET Interview Questions and Answers
1) Explain Asp.net
Ans: It is data-access technology, primarily disconnected and designed to provide efficient, scalable data access.
The disconnected data is represented within a DataSet object.
A data provider is a set of classes that provide access to databases.
The main components of data provider are:
1. Connection
2. Command
3. DataReader
4. DataAdapter
Visual Studio .NET includes two data providers:
1. SQL Data Provider
2. OleDb Data Provider
Two additional data providers are included in Visual Studio .NET 2003:
1. ODBC Data Provider
2. Oracle Data Provider
2) What is CLR? Ans: 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.
3) In Visual Studio .NET, how do I create a new ASP.NET application for an existing ASP.NET project? Ans: First create an IIS application using the IIS MMC. Then in Visual Studio .NET, use the “New Project In Existing Folder” project template (at the end of the template list). It will first ask you for the project name (use the same one you created for the IIS application). Click OK button. Then enter in physical folder location.
4) What is the Difference between HTML controls and ASP.net Controls? Ans: HTML controls are run on client side, where as ASP.net controls runs on server side and for execute on client side, they generate HTML controls.
5) Can a .NET web application consume Java web service? Ans: Yes.Actually Webservices are independent to language. it depends on WSDL and SOAP. so any one can develope the Webservices anddisclose the wsdl and users can cosume the webservices.wsdl and soap both are xml based.. and all languages having xml parsing capability and access to http protocol will be able to work with Webservices
6) What’s the difference between Codebehind=”MyCode.aspx.cs” andSrc=”MyCode.aspx.cs”? Ans: CodeBehind is relevant to Visual Studio.NET only.
7) What’s a bubbled event? Ans: 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.
8) Suppose you want a certain ASP.NET function executed on MouseOver overa certain button. Where do you add an event handler? Ans: It’s the Attributesproperty, the Add function inside that property. So btnSubmit.Attributes.Add(“onMouseOver”,”someClientCode();”)
9) What data type does the RangeValidator control support? Ans: Integer,String and Date.
10) Explain the differences between Server-side and Client-side code? Ans: Server-side code runs on the server. Client-side code runs in the clients’ browser.
11) What type of code (server or client) is found in a Code-Behind class? Ans: Server-side code.
12) Should validation (did the user enter a real date) occur server-side or client-side? Why? Ans: Client-side. This reduces an additional request to the server to validate the users input.
13) What does the “EnableViewState” property do? Why would I want it on or off? Ans: It enables the viewstate on the page. It allows the page to save the users input on a form.
14) What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over the other? Ans: Server.Transfer is used to post a form to another page. Response.Redirect is used to redirect the user to another page or site.
15) Can you explain the difference between an ADO.NET Dataset and an ADO Recordset? Ans: 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 fordifferent data sources.
16) Can you give an example of what might be best suited to place in the Application_Start and Session_Start subroutines? Ans: This is where you can set the specific variables for the Application and Session objects.
17) 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? Ans: Maintain the login state security through a database.
18) Can you explain what inheritance is and an example of when you might use it? Ans: 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.
19) Whats an assembly? Ans: Assemblies are the building blocks of the .NET framework. Overview of assemblies from MSDN
20) Describe the difference between inline and code behind. Ans: 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.
21) Explain what a diffgram is, and a good use for one? Ans: 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.
22) Whats MSIL, and why should my developers need an appreciation of it if at all? Ans: MSIL is the Microsoft Intermediate Language. All .NET compatible languages will get converted to MSIL.
23) Which method do you invoke on the DataAdapter control to load your generated dataset with data? Ans: The .Fill() method
24) Can you edit data in the Repeater control? Ans: No, it just reads the information from its data source
25) Which template must you provide, in order to display data in a Repeater control? Ans: ItemTemplate
26) How can you provide an alternating color scheme in a Repeater control? Ans: Use the AlternatingItemTemplate
27) 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? Ans: You must set the DataSource property and call the DataBind method.
28) What base class do all Web Forms inherit from? Ans: The Page class.
29) Name two properties common in every validation control? Ans: ControlToValidate property and Text property.
30) What tags do you need to add within the asp:datagrid tags to bind columns manually? Ans: Set AutoGenerateColumns Property to false on the datagrid tag
31) What tag do you use to add a hyperlink column to the DataGrid? Ans: Anchor tag is used to add a hyperlink column to the datagrid
32) What is the transport protocol you use to call a Web service? Ans: SOAP is the preferred protocol.
33) True or False: A Web service can only be written in .NET? Ans: False
34) What does WSDL stand for? Ans: Web Services Description Language
35) 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? Ans: DataTextField property
36) Which control would you use if you needed to make sure the values in two different controls matched? Ans: CompareValidator Control
37) To test a Web service you must create a windows application or Web pplication to consume this service? Ans: False, the webservice comes with a test page and it provides HTTP-GET method to test.
38) How many classes can a single .NET DLL contain? Ans: It can contain many classes.
39) Describe the role of inetinfo.exe, aspnet_isapi.dll and aspnet_wp.exe in the page loading process. Ans: inetinfo.exe is the Microsoft IIS server running, handling ASP.NET requests. 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.
40) What’s the difference between Response.Write() and Response.Output.Write()? Ans: The latter one allows you to write formattedoutput.
41) What methods are fired during the page load? Ans: 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 asHTML, Unload() – when page finishes loading.
42) Where does the Web page belong in the .NET Framework class hierarchy? Ans: System.Web.UI.Page
43) Where do you store the information about the user’s locale? Ans: System.Web.UI.Page.Culture
44) What’s the difference between Codebehind=”MyCode.aspx.cs” and Src=”MyCode.aspx.cs”? Ans: CodeBehind is relevant to Visual Studio.NET only.
45) What’s a bubbled event? Ans: 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.
46) Suppose you want a certain ASP.NET function executed on MouseOver over a certain button. Where do you add an event handler? Ans: It’s the Attributes property, The Add function inside that property. So btnSubmit.Attributes.Add(“onMouseOver”,”someClientCode();”)
47) What data type does the RangeValidator control support? Ans: Integer, String and Date.
48) Explain the differences between Server-side and Client-side code? Ans: Server-side code runs on the server. Client-side code runs in the clients’ browser.
49) What type of code (server or client) is found in a Code-Behind class? Ans: Server-side code.
50) Should validation (did the user enter a real date) occur server-side or client-side? Why? Ans: Client-side. This reduces an additional request to the server to validate the users input.
51) What does the “EnableViewState” property do? Why would I want it on or off? Ans: It enables the viewstate on the page. It allows the page to save the users input on a form.
52) What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over the other? Ans: Server.Transfer is used to post a form to another page. Response.Redirect is used to redirect the user to another page or site.
53) Can you explain the difference between an ADO.NET Dataset and an ADO Recordset? Ans: 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.
54) Can you give an example of what might be best suited to place in the Application_Start and Session_Start subroutines? Ans: This is where you can set the specific variables for the Application and Session objects.
55) 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? Ans: Maintain the login state security through a database.
56) Can you explain what inheritance is and an example of when you might use it? Ans: 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.
57) Whats an assembly? Ans: Assemblies are the building blocks of the .NET framework. Overview of assemblies from MSDN
58) Describe the difference between inline and code behind. Ans: 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.
59) Explain what a diffgram is, and a good use for one? Ans: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.
60) Whats MSIL, and why should my developers need an appreciation of it if at all? Ans: MSIL is the Microsoft Intermediate Language. All .NET compatible languages will get converted to MSIL.
61) Which method do you invoke on the DataAdapter control to load your generated dataset with data? Ans: The .Fill() method
62) Can you edit data in the Repeater control? Ans: No, it just reads the information from its data source
63) Which template must you provide, in order to display data in a Repeater control? Ans: ItemTemplate
64) How can you provide an alternating color scheme in a Repeater control? Ans: Use the AlternatingItemTemplate
65) 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? Ans: You must set the DataSource property and call the DataBind method.
66) What base class do all Web Forms inherit from? Ans: The Page class.
67) Name two properties common in every validation control? Ans: ControlToValidate property and Text property.
68) What tags do you need to add within the asp:datagrid tags to bind columns manually? Ans: Set AutoGenerateColumns Property to false on the datagrid tag
69) What is the transport protocol you use to call a Web service? Ans: SOAP is the preferred protocol.
70) A Web service can only be written in .NET? Ans: False
71) 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? Ans: DataTextField property
72) Which control would you use if you needed to make sure the values in two different controls matched? Ans: CompareValidator Control
73) To test a Web service you must create a windows application or Web application to consume this service? Ans: False, the webservice comes with a test page and it provides HTTP-GET method to test.
74) How many classes can a single .NET DLL contain? Ans: It can contain many classes.
75) Briefly explain how code behind works and contrast that using the inline style. Ans: Many of the web developers that are currently moving to ASP.NET were previously ASP developers, which made them used to developing their script code inline with the HTML. This coding style of using inline code is still available within the ASP.NET framework, but a new coding style designed for large team development has also been introduced with ASP.NET this has been dubbed code-behind. This coding style places all the code that is to be executed by the server into separate files for each .aspx page. This allows web designers who specialize in the HTML development of a site, and application developers who specialize in the programming logic of the site to work together in a way that the page designer does not disturb the code in the page. This also allows a company who is interested in protecting it’s investment or who are developing web applications for resale to distribute just the .aspx files and the compiled code-behind files as a .dll file for the site. There are three ways of working with .aspx pages. 1. Inline code that is compiled on the web server as it is needed. 2. Code-behind files that are compiled into a .dll file and then removed from production. 3. Code-behind files that are compiled on the web server as they are needed. With these options in mind it becomes very important to consider how a developer will work with .aspx pages in ASP.NET.
76) What is a DataReader? Ans: A DataReader is a read-only stream of data returned from the database as the query executes. It only contains one row of data in memory at a time and is restricted to navigating forward only in the results one record at a time. The DataReader does support access to multiple result sets, but only one at a time and in the order retrieved. Just as in the original version of ADO, the data is no longer available through the DataReader once the connection to the data source is closed, which means a DataReader requires a connection to the database throughout its usage. Output parameters or return values are only available through the DataReader once the connection is closed.
2) What is CLR? Ans: 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.
3) In Visual Studio .NET, how do I create a new ASP.NET application for an existing ASP.NET project? Ans: First create an IIS application using the IIS MMC. Then in Visual Studio .NET, use the “New Project In Existing Folder” project template (at the end of the template list). It will first ask you for the project name (use the same one you created for the IIS application). Click OK button. Then enter in physical folder location.
4) What is the Difference between HTML controls and ASP.net Controls? Ans: HTML controls are run on client side, where as ASP.net controls runs on server side and for execute on client side, they generate HTML controls.
5) Can a .NET web application consume Java web service? Ans: Yes.Actually Webservices are independent to language. it depends on WSDL and SOAP. so any one can develope the Webservices anddisclose the wsdl and users can cosume the webservices.wsdl and soap both are xml based.. and all languages having xml parsing capability and access to http protocol will be able to work with Webservices
6) What’s the difference between Codebehind=”MyCode.aspx.cs” andSrc=”MyCode.aspx.cs”? Ans: CodeBehind is relevant to Visual Studio.NET only.
7) What’s a bubbled event? Ans: 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.
8) Suppose you want a certain ASP.NET function executed on MouseOver overa certain button. Where do you add an event handler? Ans: It’s the Attributesproperty, the Add function inside that property. So btnSubmit.Attributes.Add(“onMouseOver”,”someClientCode();”)
9) What data type does the RangeValidator control support? Ans: Integer,String and Date.
10) Explain the differences between Server-side and Client-side code? Ans: Server-side code runs on the server. Client-side code runs in the clients’ browser.
11) What type of code (server or client) is found in a Code-Behind class? Ans: Server-side code.
12) Should validation (did the user enter a real date) occur server-side or client-side? Why? Ans: Client-side. This reduces an additional request to the server to validate the users input.
13) What does the “EnableViewState” property do? Why would I want it on or off? Ans: It enables the viewstate on the page. It allows the page to save the users input on a form.
14) What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over the other? Ans: Server.Transfer is used to post a form to another page. Response.Redirect is used to redirect the user to another page or site.
15) Can you explain the difference between an ADO.NET Dataset and an ADO Recordset? Ans: 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 fordifferent data sources.
16) Can you give an example of what might be best suited to place in the Application_Start and Session_Start subroutines? Ans: This is where you can set the specific variables for the Application and Session objects.
17) 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? Ans: Maintain the login state security through a database.
18) Can you explain what inheritance is and an example of when you might use it? Ans: 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.
19) Whats an assembly? Ans: Assemblies are the building blocks of the .NET framework. Overview of assemblies from MSDN
20) Describe the difference between inline and code behind. Ans: 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.
21) Explain what a diffgram is, and a good use for one? Ans: 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.
22) Whats MSIL, and why should my developers need an appreciation of it if at all? Ans: MSIL is the Microsoft Intermediate Language. All .NET compatible languages will get converted to MSIL.
23) Which method do you invoke on the DataAdapter control to load your generated dataset with data? Ans: The .Fill() method
24) Can you edit data in the Repeater control? Ans: No, it just reads the information from its data source
25) Which template must you provide, in order to display data in a Repeater control? Ans: ItemTemplate
26) How can you provide an alternating color scheme in a Repeater control? Ans: Use the AlternatingItemTemplate
27) 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? Ans: You must set the DataSource property and call the DataBind method.
28) What base class do all Web Forms inherit from? Ans: The Page class.
29) Name two properties common in every validation control? Ans: ControlToValidate property and Text property.
30) What tags do you need to add within the asp:datagrid tags to bind columns manually? Ans: Set AutoGenerateColumns Property to false on the datagrid tag
31) What tag do you use to add a hyperlink column to the DataGrid? Ans: Anchor tag is used to add a hyperlink column to the datagrid
32) What is the transport protocol you use to call a Web service? Ans: SOAP is the preferred protocol.
33) True or False: A Web service can only be written in .NET? Ans: False
34) What does WSDL stand for? Ans: Web Services Description Language
35) 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? Ans: DataTextField property
36) Which control would you use if you needed to make sure the values in two different controls matched? Ans: CompareValidator Control
37) To test a Web service you must create a windows application or Web pplication to consume this service? Ans: False, the webservice comes with a test page and it provides HTTP-GET method to test.
38) How many classes can a single .NET DLL contain? Ans: It can contain many classes.
39) Describe the role of inetinfo.exe, aspnet_isapi.dll and aspnet_wp.exe in the page loading process. Ans: inetinfo.exe is the Microsoft IIS server running, handling ASP.NET requests. 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.
40) What’s the difference between Response.Write() and Response.Output.Write()? Ans: The latter one allows you to write formattedoutput.
41) What methods are fired during the page load? Ans: 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 asHTML, Unload() – when page finishes loading.
42) Where does the Web page belong in the .NET Framework class hierarchy? Ans: System.Web.UI.Page
43) Where do you store the information about the user’s locale? Ans: System.Web.UI.Page.Culture
44) What’s the difference between Codebehind=”MyCode.aspx.cs” and Src=”MyCode.aspx.cs”? Ans: CodeBehind is relevant to Visual Studio.NET only.
45) What’s a bubbled event? Ans: 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.
46) Suppose you want a certain ASP.NET function executed on MouseOver over a certain button. Where do you add an event handler? Ans: It’s the Attributes property, The Add function inside that property. So btnSubmit.Attributes.Add(“onMouseOver”,”someClientCode();”)
47) What data type does the RangeValidator control support? Ans: Integer, String and Date.
48) Explain the differences between Server-side and Client-side code? Ans: Server-side code runs on the server. Client-side code runs in the clients’ browser.
49) What type of code (server or client) is found in a Code-Behind class? Ans: Server-side code.
50) Should validation (did the user enter a real date) occur server-side or client-side? Why? Ans: Client-side. This reduces an additional request to the server to validate the users input.
51) What does the “EnableViewState” property do? Why would I want it on or off? Ans: It enables the viewstate on the page. It allows the page to save the users input on a form.
52) What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over the other? Ans: Server.Transfer is used to post a form to another page. Response.Redirect is used to redirect the user to another page or site.
53) Can you explain the difference between an ADO.NET Dataset and an ADO Recordset? Ans: 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.
54) Can you give an example of what might be best suited to place in the Application_Start and Session_Start subroutines? Ans: This is where you can set the specific variables for the Application and Session objects.
55) 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? Ans: Maintain the login state security through a database.
56) Can you explain what inheritance is and an example of when you might use it? Ans: 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.
57) Whats an assembly? Ans: Assemblies are the building blocks of the .NET framework. Overview of assemblies from MSDN
58) Describe the difference between inline and code behind. Ans: 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.
59) Explain what a diffgram is, and a good use for one? Ans: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.
60) Whats MSIL, and why should my developers need an appreciation of it if at all? Ans: MSIL is the Microsoft Intermediate Language. All .NET compatible languages will get converted to MSIL.
61) Which method do you invoke on the DataAdapter control to load your generated dataset with data? Ans: The .Fill() method
62) Can you edit data in the Repeater control? Ans: No, it just reads the information from its data source
63) Which template must you provide, in order to display data in a Repeater control? Ans: ItemTemplate
64) How can you provide an alternating color scheme in a Repeater control? Ans: Use the AlternatingItemTemplate
65) 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? Ans: You must set the DataSource property and call the DataBind method.
66) What base class do all Web Forms inherit from? Ans: The Page class.
67) Name two properties common in every validation control? Ans: ControlToValidate property and Text property.
68) What tags do you need to add within the asp:datagrid tags to bind columns manually? Ans: Set AutoGenerateColumns Property to false on the datagrid tag
69) What is the transport protocol you use to call a Web service? Ans: SOAP is the preferred protocol.
70) A Web service can only be written in .NET? Ans: False
71) 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? Ans: DataTextField property
72) Which control would you use if you needed to make sure the values in two different controls matched? Ans: CompareValidator Control
73) To test a Web service you must create a windows application or Web application to consume this service? Ans: False, the webservice comes with a test page and it provides HTTP-GET method to test.
74) How many classes can a single .NET DLL contain? Ans: It can contain many classes.
75) Briefly explain how code behind works and contrast that using the inline style. Ans: Many of the web developers that are currently moving to ASP.NET were previously ASP developers, which made them used to developing their script code inline with the HTML. This coding style of using inline code is still available within the ASP.NET framework, but a new coding style designed for large team development has also been introduced with ASP.NET this has been dubbed code-behind. This coding style places all the code that is to be executed by the server into separate files for each .aspx page. This allows web designers who specialize in the HTML development of a site, and application developers who specialize in the programming logic of the site to work together in a way that the page designer does not disturb the code in the page. This also allows a company who is interested in protecting it’s investment or who are developing web applications for resale to distribute just the .aspx files and the compiled code-behind files as a .dll file for the site. There are three ways of working with .aspx pages. 1. Inline code that is compiled on the web server as it is needed. 2. Code-behind files that are compiled into a .dll file and then removed from production. 3. Code-behind files that are compiled on the web server as they are needed. With these options in mind it becomes very important to consider how a developer will work with .aspx pages in ASP.NET.
76) What is a DataReader? Ans: A DataReader is a read-only stream of data returned from the database as the query executes. It only contains one row of data in memory at a time and is restricted to navigating forward only in the results one record at a time. The DataReader does support access to multiple result sets, but only one at a time and in the order retrieved. Just as in the original version of ADO, the data is no longer available through the DataReader once the connection to the data source is closed, which means a DataReader requires a connection to the database throughout its usage. Output parameters or return values are only available through the DataReader once the connection is closed.
Naveen E
Author
Hola peeps! Meet an adventure maniac, seeking life in every moment, interacting and writing at Asha24.