You must Sign In to post a response.
  • Category: ASP.NET

    Need Answer for interview questions

    Hi Friends,

    Could you please answer for the below questions.

    1) Is Razor is client side script or Server side
    2) What are the advantage in Razor over Asp.net
    3) What are the advantage in HTML5
    4) What is deadlock and why we are using it
    5) How to rollback the particular row
    6) From what time we can rollback the data (if we deleted morning 9 AM another one is noon 2 PM. Rollback is running at 5 PM.
    7) How to transfer the data in webservice and WCF
  • #767190
    Hi,
    1. Razor is not a programming language, its a programming syntax which provide a way to create client code (HTML/CSS etc.) and it serves as a server side syntax for producing the content to send to browser.

    2.
    A. Razor minimizes the number of characters and keystrokes required in a file, and enables a fast coding workflow.
    B. Easy to understand and learn.
    C. Razor doesn't require a specific tool/editor.
    D. Great Intellisense
    E. Supports TDD (Test Driven Development), so unit testing is much more simple.

    3.
    A. You can include the <video>, <audio>, and <canvas> elements in HTML5, so very easy to integrate multimedia.
    B. div tags are replaced with semantic HTML 5 elements, so clean code.
    C. Easy support for drag and drop tools in a web application.
    D. sessionStorage and localStorage are storages used by HTML5 instead of cookies. It is not a permanent database, but enables you to store the data, temporarily.
    E. Offline browsing support i.e. even if in offline mode, the page will load correctly [after refresh] because of above storages.

    4.
    In a multiprocessing system when one or more processes wait for some other to finish and at last neither finishes, deadlock occurs.
    Find details about deadlock over here: https://en.wikipedia.org/wiki/Deadlock
    In case of database transactions it is very often that dedalocks may arrise, so we can use BEGIN/CoMMIT/ROLLBACK transactions to prevent deadlock.

    5.
    You can use SAVEPOINT statement after each row insert.
    So that when any of the row throws exception then RollBack transaction will RollBack just perticular row.

    7.
    In WEB.Config, set maxRequestLength value to some max length so that you will not get time out.

    <system.web>
    <httpRuntime maxRequestLength="999999" />
    </system.web>

    Set following values in WEB.Config

    <binding name="myNetTcpBinding"
    maxBufferPoolSize="2147483647"
    maxBufferSize="524288"
    maxReceivedMessageSize="2147483647">
    </binding>

    Also find this: http://stackoverflow.com/questions/8225736/transfer-large-amount-of-data-in-wcf-service

  • #767195
    1. Razor is not a scripting, it is the engine that needs to use for compilation, in short Razor is an ASP.NET programming syntax used to create dynamic web pages with the C# or Visual Basic .NET programming languages
    2. Basically you need to ask Razor advantage over ASPX not a asp.net cause Razor and aspx both view engines are used to run over Asp.net, The file extensions used with Razor Engine are different from Web Form Engine. It has .cshtml (Razor with C#) or .vbhtml (Razor with VB) extension for views, partial views, editor templates and for layout pages, By default, Razor Engine prevents XSS attacks
    3. HTML5: highly interactive , Cleaner markup / Improved Code, Improved Semantics, Consistency

    Thanks
    Koolprasd2003
    Editor, DotNetSpider MVM
    Microsoft MVP 2014 [ASP.NET/IIS]


  • Sign In to post your comments