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
    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
    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.

    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.

    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.

    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:
    In case of database transactions it is very often that dedalocks may arrise, so we can use BEGIN/CoMMIT/ROLLBACK transactions to prevent deadlock.

    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.

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

    <httpRuntime maxRequestLength="999999" />

    Set following values in WEB.Config

    <binding name="myNetTcpBinding"

    Also find this:

  • #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 cause Razor and aspx both view engines are used to run over, 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

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

  • Sign In to post your comments