Dotnet real time Interview Questions for 1 Year Experience

Dotnet Framework Interview Questions for 1 Year Experience:

1. What is CLR and it's functions?
2. How memory is managed in Dotnet applications?
Hint: Automatically by Garbage collector
3. What is an assembly?
4. What is a strong name?
5. What is MSIL?

C# Interview Questions for 1 Year Experience:

1. What are the 4 pillars of Object Oriented Programming?
2. What is a Class? What is an Object?
3. What is a partial class?
4. What is a sealed class?
5. What is constructor?
6. What is stringbuilder?

ADO.Net Interview Questions for 1 Year Experience:

1. What is connection string?
2. What is Datareader?
3. Difference between Dataset and datareader?
4. What is Ado.Net?
5. Namespace for using sqlserver database?

ASP.Net Interview Questions for 1 Year Experience:

1. What is web.config file and it's use?
2. What is global.asax?
3. What is session?
4. Which all controls you have used in your project?
5. What is gridview?
6. What is Authentication in ASP.Net and types of authentication?

SQL Server Interview Questions for 1 Year Experience:

1. What is Primary key, unique key and difference between them?
2. What is index? Types of index?
3. What is a stored procedure? Why it is better than inline query?
Hint: Stored Procedure is precompiles and has a execution plan. Hence faster execution.
4. You might be asked to write simple query
5. What is inner join

.Net realtime Interview Questions ?

1.What are the disadvantages of Javascript?
      1.Security. Because the code executes on the users' computer, in some cases it can be exploited for malicious purposes. This is one reason some people choose to disable JavaScript.
      2.Reliance on End User. JavaScript is sometimes interpreted differently by different browsers. Whereas server-side scripts will always produce the same output, client-side scripts can be a little unpredictable. Don't be overly concerned by this though - as long as you test your script in all the major browsers you should be safe.

        2.Difference between Html and DHtml?

        DHTML:
        DHTML is the art of combining HTML, JavaScript, DOM, and CSS
        DHTML is Not a Language
        DHTML stands for Dynamic HTML.
        DHTML is NOT a language or a web standard.
        DHTML is a TERM used to describe the technologies used to make web pages dynamic and interactive.
        To most people DHTML means the combination of HTML, JavaScript, DOM, and CSS.

        HTML:
        HTML stands for Hyper Text Markup Language,HTML is not a programming language, it is a markup language, A markup language is a set of markup tags
        HTML uses markup tags to describe web pages
        HTML documents describe web pages, contain HTML tags and plain text
        HTML documents are also called web pages

        3.Difference between N-tier and 3-tier?

        3-tier:
        A 3-tier application basically resembles a system with 3 levels or tier, the first is the client tier, second is server tier and the third tier is your data tier.
        N-tier:
        N-tier application is just an extension of this in which we again split these individual tiers into different tiers and thus the name N-tier.

        4.Difference between .net 4.0 and 4.5?

        The next major release of the .NET Framework, .NET 4.5, allows you to easily use Windows 8 technologies, like Windows Runtime, directly from .NET 4.5. Accessing your data is easier than ever with support for the newest features in SQL Server and support for WebSockets. Programs are more responsive, with the AWAIT keyword, faster ASP.NET startup and an improved server Garbage Collector. .NET 4.5 incorporates key customer feedback, with the newest MEF features, support for long running workflows with State Machines, and improved HTML 5 support in ASP.NET. In this overview talk, you’ll learn about all of these technologies, and get pointers to deeper dives where you can learn more.
        5.What is the use of Ajax?

        There are a couple of reasons to use AJAX in lieu of the traditional form submission.
        1.Ajax  is very light weight: instead of sending all of the form information to the server and getting all of the rendered HTML back, simply send the data the server needs to process and get back only what the client needs to process. Light weight means fast.
        2. The second reason to use AJAX is because (as the logo in the link above makes clear) AJAX is cool.
        3. AJAX is a client side technology that uses JavaScript, the client-server interaction is very important.

        6.Difference between MVP and MVC?
        The two patterns are having much similarities compare to their differences. The both patterns are evolved on separation of concerns and both contain Views and Models.But when comes to the difference part, the major difference is the way handling the incoming request.
        In MVP, the incoming request comes to View and View is delegating it to presenter. And presenter is responsible for talk to model and update the view. Here model is completely shielding from View.
         Where as in MVC, all incoming requests are intercepting by the controller and controller is responsible for generating the correct View and Model. Here View is aware of the model

        The MVP pattern will built on ASP.Net WebForms. The WebForms development paradigm uses Viewstate. In large Web application it will cause some performance issues.
        ASP.Net MVC is new alternative frame work and it view is state less.

        7.What is Namespace?
        A Namespace in Microsoft .Net is like containers of objects. They may contain unions, classes, structures, interfaces, enumerators and delegates. Main goal of using namespace in .Net is for creating a hierarchical organization of program. In this case a developer does not need to worry about the naming conflicts of classes, functions, variables etc., inside a project.

        8.What is the use of SilverLight?

        Microsoft Silverlight is an application framework for writing and running rich Internet applications, with features and purposes similar to those of Adobe Flash. The run-time environment for Silverlight is available as a plug-in for web browsers running under Microsoft Windows and Mac OS X. While early versions of Silverlight focused on streaming media, current versions support multimedia, graphics and animation, and give developers support for CLI languages and development tools. Silverlight is also one of the two application development platforms for Windows Phone.
        9.Explain about your Project? How much time you taken to complete the project?
        10.What is your Role in your project?

        Gridview RowEditing event in Asp.net

               The RowEditing event is raised when a row's Edit button is clicked, but before the GridView control enters edit mode. This enables you to provide an event-handling method that performs a custom routine,
        such as canceling the edit operation, whenever this event occurs.

        A GridViewEditEventArgs object is passed to the event-handling method, which enables you to determine the index of the current row and to indicate that the edit operation should be canceled. To cancel the edit operation, set the Cancel property of the GridViewEditEventArgs object to true.

        The following example demonstrates how to use the RowEditing event to put a row in edit mode when the data source is set programmatically.

         Write the following code in aspx design page:

        <html xmlns="http://www.w3.org/1999/xhtml">
        <head runat="server">
            <title>GridView example</title>
        </head>
        <body>
            <form id="form1" runat="server">
            <div>
         
              <asp:GridView ID="GridView1" runat="server" 
                AutoGenerateEditButton="True" 
                AllowPaging="true"
                OnRowEditing="GridView1_RowEditing"         
                OnRowCancelingEdit="GridView1_RowCancelingEdit" 
                OnRowUpdating="GridView1_RowUpdating"
                OnPageIndexChanging="GridView1_PageIndexChanging">
              </asp:GridView>
         
            </div>
            </form>
        </body>
        </html>
         
        write the following code in aspx.cs code behind side:
         
          protected void Page_Load(object sender, EventArgs e)
          {
         
            if (!Page.IsPostBack)
            {
              // Create a new table.
              DataTable Table1 = new DataTable("dataTable");
         
              // Create the columns.
              Table1 .Columns.Add("Id", typeof(int));
              Table1 .Columns.Add("Description", typeof(string));
              Table1 .Columns.Add("IsComplete", typeof(bool) );
         
              //Add data to the new table.
              for (int i = 0; i < 20; i++)
              {
                DataRow tableRow = Table1 .NewRow();
                tableRow["Id"] = i;
                tableRow["Description"] = "number" + i.ToString();
                tableRow["IsComplete"] = false;            
                Table1 .Rows.Add(tableRow);
              }
         
              //Persist the table in the Session object.
              Session["dataTable"] = Table1 ;
         
              //Bind data to the GridView control.
              BindData();
            }
         
          }
         
          protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
          {
            GridView1.PageIndex = e.NewPageIndex;
            //Bind data to the GridView control.
            BindData();
          }
         
          protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
          {
            //Set the edit index.
            GridView1.EditIndex = e.NewEditIndex;
            //Bind data to the GridView control.
            BindData();
          }
         
          protected void GridView1_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
          {
            //Reset the edit index.
            GridView1.EditIndex = -1;
            //Bind data to the GridView control.
            BindData();
          }
         
          protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
          {    
            //Retrieve the table from the session object.
            DataTable dt = (DataTable)Session["dataTable"];
         
            //Update the values.
            GridViewRow row = GridView1.Rows[e.RowIndex];
            dt.Rows[row.DataItemIndex]["Id"] = ((TextBox)(row.Cells[1].Controls[0])).Text;
            dt.Rows[row.DataItemIndex]["Description"] = ((TextBox)(row.Cells[2].Controls[0])).Text;
            dt.Rows[row.DataItemIndex]["IsComplete"] = ((CheckBox)(row.Cells[3].Controls[0])).Checked;
         
            //Reset the edit index.
            GridView1.EditIndex = -1;
         
            //Bind data to the GridView control.
            BindData();
          }
         
          private void BindData()
          {
            GridView1.DataSource = Session["dataTable"];
            GridView1.DataBind();
          }