Wednesday 3 October 2012

Some Questions On .Net #3


Q1. What setting must be added in the configuration file to deny a particular user from accessing the secured resources?
Ans. To deny a particular user from accessing the secured resources, the web.config file must contain the following code:
       <authorization>
                 <deny user="username"/>
       </authorization>

Q2. What are the event handlers that can be included in the global & file?
Ans. The global.asax file contains some of the following important event handlers:
                                application_error
        application_start
                                application_end
        session_start
                                session_end

Q3. What is the difference between page-level caching & fragment caching?
Ans. In page-level caching, an entire web page is cached, whereas, in the fragment caching, a part of the web page, such as a user control added to the web page, is cached.

Q4. Make a list of all templates of the repeater control?
Ans. The repeater control contains the following templates:
item template
alternatingitem template
seperatortemplate
header template
footer template

Q5. How can you assign page attributes in an ASP.NET application?
Ans. The @page directive is responsible for this.

Q6. Which method is used to post a web page to another web page?
Ans. The response.redirect method is used to post a page to another page, as shown in the following code snippet:
response.redirect("destinationpagename.aspx");

Q7. What is a cookie?
Ans. Cookie is a lightweight executable program, which the server posts to client machines. Cookies store the identity of a user of a user first visits of the web site & validation them later on the next visit for their authenticity.

Q8. What are the custom user controls in ASP.NET?
Ans. The custom user controls are the controls that defined by developers. These controls are the mixture of custom behavior. These controls work similar to other web server controls.

Q9. What does the .webpart file do?
Ans. The webpart file explains the setting of a web parts control that can be included to a specified zone on a web page.
  
Q10. How can you identify that the page is postback?
Ans. The page object uses the Ispostback property to check whether the page is posted back or not. If the page is postback, this property is set to true.

Q11. What is .NET reflector?
Ans. .NET reflector is a software utility for Microsoft .net combining class browsing, static analysis & decompilation.

Q12.What is the difference between globalization & localization?
Ans. GLOBALISATION is the process of making your application cultureagonostic.
         LOCALISATION is the process of adding translation & doing whatever else it takes to make your    application actually work for a specific & local.

Q13.What is the difference between an exe & a dll?
Ans. An exe is an executable program. An dll is a library that contains code & data that can be used by more than one program at the same time.

Q14.What is the Gac?
Ans. Gac stands for global assembly cache. It is a central repository for strongly named .net assemblies and helps prevent dll hell.

Q15. What is mono?
Ans. Mono is an open source, cross platform implementation of c# & the CLR that is binary compatible with Microsoft.



Download this article as PDF 

 

No comments:

Post a Comment