0% found this document useful (0 votes)
56 views

ASP.net Short Answers -1 to 37

Uploaded by

pjay27470
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views

ASP.net Short Answers -1 to 37

Uploaded by

pjay27470
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

ASP ANSWER OF SHORT QUESTION

1. What is ASP.NET?
 ASP.NET means "Active Server Pages" which is frontend language & it
is established & supported by Microsoft

2. Explain objective of ASP.NET


 ASP.NET is a web application which allows the programmer to build
dynamic web sites, Web applications & web services.
 ASP.NET allows to develop web applications using a full featured
programming language such as C#, VB.NET, Jscript .

3.Explain compile code.


 When code is compiled, it is first converted into Microsoft
Independent Language (MSIL). Then this independent language is
further converted into Machine Specific instructions.
4. Why is ASP.NET event driven.
 When something specific has occurred in significance for system
hardware or software is call an Event.
 A segment of code that is executed in response to an event is called
an event handler.

5. Explain ISPOSTBACK
 IsPostBack is a propety of the Asp.Net page that tells whether or not
the page is on its initial load or if a user has perform a button on your
web page that has caused the page to post back to itself.

6. What is the use of PostBackUrl Property?


 The PostBackUrl property can be useful for scenarios where you
want to collect data from multiple pages and process it on a
final page

7. What is the use of web.sitemap file?


 The SiteMapPath control is also used to display the Navigation
information on the site
 It display the current page's context within the entire structure of a
website
 You can bind this control to TreeView and Menu controls

8. What is APP_CODE and APP_DATA application folders.


 ASP.NET compiles the code in the app_code folder on the initial
request to your application and recompiles it when any changes
are detected.
 The app_data folder contains application data files, such as .mdf
database files, XML files, and other data store files.

9. What is the use of Image Map control?


 it is used to show image with in the page.
 An Image Map control is an ASP.NET web control that allows
you to create an image with defined hot spot regions.
 For example, you can use this control to display a map of a
geographical region and link each region to a different page.

10. What is inline code and code behind page?


 ASP.NET 2.0 provides two paths for structuring the cod of ASP.NET
pages: Code Behind and Code Inline
 Inline Coding :- Inline Code is embedded directly within the
ASP.NET page that has an extension of .aspx.
 Code Behind :- code is separated from content completely
and stored in a separate file.

11. What are the advantage of server side state


management?
 Server side state management is a technique of storing data on
the server instead of the client’s browser.

12. Explain @ Register directive.

2
 The @ Register directive is a directive used to register user-
defined controls on a web page.
 <code> <%@ Register tagprefix=“my”
namespace=“MyNamespace” %> <my:CustomControl
runat=server /> </code>

13. What is importance of Themes?


 Themes are a feature of ASP.NET that help you maintain a consistent look
and feel across your web pages and controls. Themes can also improve the
performance and security of your web application by reducing
the bandwidth and hiding the confidential state data from the
client

14. What is SOAP?


 SOAP is a protocol for accessing web services over HTTP. It
stands for Simple Object Access Protocol and it is based on XML

15. What is WSDL?


 WSDL stands for Web Services Description Language. It is an
XML-based language for describing web services. A WSDL file is
written in XML.

16. What is the use of global.asax file in ASP.NET?


 There are 2 types of events available in ASP.NET. We can handle both
sessions in a global.asax file.
 Session_Start(): When the new session is initialized then
the session_start event is invoked.
 2. Session_end(): When the session is expires then the
Session_End event is invoked.

17. Explain Server.Transfer().


 It sends (transfers) all the information created in one ASP file to a
second ASP file.
3
 Server.Transfer() has some advantages and disadvantages
compared to Response.Redirect(), which is another method to
navigate to a different page.

18. What is the importance of Query String?


 Query string is a way to pass some information from one page
to another in ASP.NET. It is useful when you want to transfer a
value or a parameter to a web application or a database

19. List out Data Adapter’s methods and properties.


 The DataAdapter has properties of type Command, which
represent the ways it can query, insert, delete, and update the
database.

20. Why we use the app_code and app_data folder?


 ASP.NET compiles the code in the app_code folder on the initial
request to your application and recompiles it when any changes
are detected.
 The app_data folder contains application data files, such as .mdf
database files, XML files, and other data store files.

21. What are advantages of validator control?


 Validation allows you to validate an input of the user.
 ASP.NET validation controls validate the user input data to ensure
that useless, unauthenticated, or contradictory data don't get stored
 ASP.NET provides the following validation controls :-
1 RequiredFieldValidator 2 RangeValidator 3 CompareValidator 4
RegularExpressionValidatator 5 CustomValidator 6
ValidationSummary

22. What is the use of System.Data.Oledb?


4
 To use Microsoft Access as a database, System.Data.oleDb
namespace is used. It provides classes which can work with OLE-DB
data sources using the .NET OleDb data provider.
 For Example:- OleDbConnection and OleDbCommand.

23. How CSS is applied to the ASP.NET page?

 Inline style: This is the simplest way to apply CSS to an ASP.NET


page. You can use the style attribute of any HTML or ASP.NET
element to specify the CSS properties and values for that
element.
 Internal style sheet: This is a way to apply CSS to an ASP.NET
page by using the <style> tag inside the <head> section of the
page. You can use selectors to target specific elements or
groups of elements and define the CSS rules for them
External style sheet: This is a way to apply CSS to an ASP.NET
page by using a separate file that contains the CSS code. You
can use the <link> tag inside the <head> section of the page to
link to the external style sheet file. You can also use the
@import rule inside a <style> tag to import an external style
sheet file.

24. List data bind controls in ASP.NET. Write its usage.


 The binding of data with the controls of Web Forms is known as Data
Binding. Data binding is the ability to bind some elements of a data
source with the controls of an application.
 On the basis of the number of bound values that can be displayed
through a control of a Web Form, It can be divided in two types:
 1)Simple data binding. 2)Complex data binding

25. Explain Querystring. How can you make and use of


QueryString?
 A query string is use to send data from one webform to another
through the URL. A query string consists of two parts, 1. field and 2.
5
value, and each of pair separated by ampersand (&) symbol. The
?(question mark) symbol in a query string indicates the beginning of a
query string and it's value. There is a limit on the Query string length.
Hence, Query strings cannot be used to send more than 100kb data
 Request.QueryString(variable)[lindex)|.Count]

26. What is the difference between page and Web user


control?
 A page and a Web user control are both components that can
be used to create dynamic web applications using ASP.NET.
However, they have some differences in their structure,
functionality, and usage.
 A page is a file that has the extension .aspx and contains
an @ Page directive that defines its configuration and
other properties
 A Web user control is a file that has the extension .ascx
and contains an @ Control directive that defines its
configuration and other properties

27. How structured exception handling is implemented?


 Try-catch block :- This is the most common way of handling
exceptions. You can use the try, catch, and finally keywords to
enclose the code that might throw an exception, and provide
the logic to handle it or clean up resources

28. How Asp.net maintain View State?


 View State provides page level client side state management which is
as long as the user is active on the current page, state is available and
as the user redirects to the next page and the current page state is
lost.
 By default View state is enabled for all server side controls of
ASP.NET with a property called EnableviewState set to true.

6
29. Use of custom validator.
 The CustomValidator control allows writing application specific
custom validation routines for both the client side and the server side
validation
 The client side validation is accomplished through the
ClientValidation Function property

30. What is SiteMapPath Control?


 The SiteMapPath control is also used to display the Navigation
information on the site. It display the current page's context within
the entire structure of a website.
 You can bind this control to TreeView and Menu controls

31. Differentiate dataset and datareader.


 The key components of DataSet are :-1. DataTableCollection 2.
DataRelationCollection 3. DataTable 4. DataRowCollection 5.
DataColumnCollection

32. What is UDDI in webservice?


 UDDI registries can be public or private. Public registries are
accessible to anyone on the Internet and provide a global
directory of web services

33.What is session? how to increase session time [Note:


default session time is 20 MIN]
 "The time duration for which the user interacts with the web
application is called session"
 <sessionState mode"InProc"
 stateConnectionString="tcpip=127.0.0.1:42424"
 sqlConnectionString="Data Source=\sQLEXPRESS;
Trusted_Connection=Yes;"
 cookieless="false"
 timeout="20"/>
7
34. How theme set at page level and application level.
 To set a theme at the page level, you can use
the Theme or StyleSheetTheme attribute of the @ Page
directive in the .aspx file. For example:- <%@ Page
Language="C#" Theme="FirstTheme" %>

35. How to use structured error.


 Structured error handling is a way of handling errors and
exceptions in your ASP.NET code using the try-catch-finally
blocks.
 To use structured error handling, you need to enclose the code
that might throw an exception in a try block, followed by one or
more catch blocks that handle different types of exceptions

36. What is caching in short


 Caching is a technique of storing frequently used information of user
in memory, so that, when the same information is needed by user
next time, it could be directly retrieved from the memory instead of
being generated by the application.

37. Write an extention of:


 WEB FORM :- .ASPX

 USER CONTROL :- .ASCX

 WEB SERVICE :- ASMX

 GLOBAL CLASS FILE :- .ASAX

 VB CODE FILE :- .VB

 SKIN FILE :- .SKIN

 CSS FILE :- .CSS

You might also like