Ticker

6/recent/ticker-posts

ASP.NET Interview Questions and Answers For Experienced



    ASP.NET Web API is a framework provided by the Microsoft with which we can easily build HTTP services that can reach a broad of clients, including browsers, mobile, IoT devices, etc. ASP.NET Web API provides an ideal platform for building RESTful applications on the .NET Framework.I hope these questions and answers will help you to crack your Web API Interview. These interview Questions have been taken from our new released eBook ASP.NET Web API Interview Questions.
    This eBook has been written to make you confident in Web API with a solid foundation. It's would be equally helpful in building REST API using ASP.NET Web API and integrating it with your real projects.

    Q1. What is ASP.NET?

    ASP.NET become advanced in direct acknowledgment to the problems that builders had with widespread ASP. Since ASP is in such huge use, Microsoft assured that ASP scripts execute with out amendment on a machine with the .NET Framework (the ASP engine, ASP.DLL, isn't always changed when installing the .NET Framework). Thus, IIS can house each ASP and ASP.NET scripts on the equal system.

    Q2. What is XHTML? Are ASP.NET Pages compliant with XHTML?

    In undeniable words, XHTML is a stricter and cleanser model of HTML. XHTML stands for EXtensible Hypertext Markup Language and is a W3C Recommendation.Yes, ASP.NET 2.zero Pages are XHTML compliant. However the power has been given to the user to feature the applicable report type declaration.

    Q3. Does ViewState have an effect on performance? What is the right length of a ViewState? How can you compress a viewstate?

    Viewstate stores the kingdom of controls in HTML hidden fields. At times, this information can develop in capacity. This does affect the comprehensive responsiveness of the page, thereby affecting performance. The top-quality length of a viewstate need to be no longer more than 25–30% of the web page size.ViewState may be compressed to almost 50% of its length. .NET also offers the GZipStream orDeflateStream to compress viewstate.

    Q4. How can you locate if a viewstate has been tampered?

    By putting the EnableViewStateMac to true within the @Page directive. This attribute checks the encoded and encrypted viewstate for tampering.

    Q5. Can the App_Code folder include source code documents in distinctive programming languages?

    No. All supply code documents stored within the root App_Code folder must be in the identical programming language. However, you can create two subfolders inside the App_Code after which add each C# and VB.NET inside the respective subfolders. You also have to upload configuration settings inside the net.Config for this to work.

    Q6. Can I install the application without deploying the source code at the server?

    Yes. You can complicate your code through the usage of a new precompilation process called ‘precompilation for deployment’. You can use the aspnet_compiler.Exe to precompile a site. This manner builds each web page in your net utility into a single utility DLL and a few placeholder documents. These documents can then be deployed to the server.
    You can also finish the equal venture the usage of Visual Studio 2005 with the aid of the usage of the Build->Publish menu.
    Q7. Can I use extraordinary programming languages inside the same utility?

    Yes. Each web page may be written with a extraordinary programming language in the identical application. You can create a few pages in C# and a few in VB.NET.

    Q8. How to stable your connection string facts?

    By the use of the Protected Configuration feature.

    Q9. What is Cross Page Posting? How is it executed?

    By default, ASP.NET submits a form to the same page. In cross-page posting, the shape is submitted to a extraordinary page. This is accomplished by means of setting the ‘PostBackUrl’ assets of the button(that causes postback) to the desired web page. In the code-in the back of of the page to which the form has been posted, use the ‘FindControl’technique of the ‘PreviousPage’ assets to reference the information of the control within the first page.

    Q10. Can you exchange a Master Page dynamically at runtime? How?

    Yes. To exchange a master page, set the MasterPageFile property to point to the .Master page for the duration of the PreInit web page event.

    Post a Comment

    1 Comments