Crack The Campus - Technical Interviews for Tech Companies

Welcome Guest

Search:

.NET WebDev interview question



   1. State True or False: If you set AutoGenerateColumns=True and still provide custom column definitions, the DataGrid will render both
          * True
          * False
   2. The data from an XSL Transform with XmlReader can be returned in one of the following ways
          * objReader = objXslT.Transform(objNav, nothing)
          * objXslT.Transform(objNav, nothing)
          * objReader = objXslT.Transform(objNav, nothing, objWriter)
          * objXslT.Transform(objNav, nothing, objWriter)
   3. Pick the command line that would result in the C# compiler generating an XML documentation file
          * csc /doc:NewHome.xml NewHome.cs
          * c /doc /docfile: NewHome.xml NewHome.cs
          * csc /doc /out: NewHome.xml NewHome.cs
          * csc /xml NewHome.cs
   4. What is the comment syntax for C#’s XML-based documentation?
          * /** and **/
          * //#
          * ///
          * //*

   5. When creating a C# Class Library project, what is the name of the supplementary file that Visual Studio.NET creates that contains General Information about the assembly?
          * AssemblyInfo.xml
          * AssemblyInfo.cs
          * AssemblyInformation.cs
          * AssemblyAttributes.cs
   6. Which of the following is the C# escape character for Null?
          * \n
          * \0
          * \f
          * \v
   7. What is the exception that is thrown when there is an attempt to dynamically access a method that does not exist?
          * MissingMethodException
          * TypeLoadException
          * MethodLoadException
          * MethodAccessException
   8. What method(s) must be used with the Application object to ensure that only one process accesses a variable at a time?
          * Synchronize()
          * Lock() and UnLock()
          * Lock()
          * Asynchroize()
   9. After capturing the SelectedIndexChanged event for a ListBox control, you find that the event handler doesn’t execute. What could the problem be?
          * The AutoEventWireup attribute is set to False
          * The AutomaticPostBack attribute is set to False
          * The codebehind module is not properly compiled
          * The ListBox must be defined WithEvents
  10. What method must be overridden in a custom control?
          * The Paint() method
          * The Control_Build() method
          * The Render() method
          * The default constructor
  11. What is used to validate complex string patterns like an e-mail address?
          * Extended expressions
          * Regular expressions
          * Irregular expressions
          * Basic expressions
  12. The following is a valid statement in ASP.NET<%@ Page Language="C" %>
          * True
          * False
  13. A valid comment block in ASP.NET is
          * <!- - - Comment - - - >
          * <!- - Comment - - >
          * <% - - Comment - - %>
          * <% ! - - Comment - - >
  14. The event handlers that can be included in the Global.asax file are
          * Application Start and
            Session Start event handlers only
          * Application End and
            Session End event handlers only
          * Per-request and Non-deterministic event handlers only
          * Application Start and End ,
            Session Start and End, Per-request and Non-deterministic event handlers
  15. A Few of the Namespaces that get imported by default in an ASPX file are
          * System, System.Data, System.Drawing,
            System.Globalization
          * System,
            System.IO, System.Management, System.Globalization
          * System, System.Collections,
            System.Text, System.Web
          * System,
            System.NET,
            System.Reflection, System.Web
  16. The Assemblies that can be referenced in an ASPX file without using @Assembly Directive is
          * System.dll, System.Data.dll,
            System.Web.dll, System.Xml.dll,
          * System.dll,
            System.Collections.dll, System.IO.dll
          * System.dll, System.Reflection.dll,
            System.Globalization.dll,
          * System.Drawing.dll, System.Assembly.dll,
            System.Text.dll
  17. An .ASHX file contains the following
          * Code-behind that are used in the code
          * Server Controls that can be called from a code-behind file
          * HTTP handlers-software modules that handle raw HTTP requests received by ASP.NET
          * Contains normal ASP.NET code and can be used as an include file
  18. What is the output for the following code snippet:

          public class testClass
          {
              public static void Main(string[] args)
              {
                  System.Console.WriteLine(args[1]);
              }//end Main
          }//end class testClass

          * Compiler Error
          * Runtime Error
          * Hello C# world
          * None of the above
  19. One of the possible way of writing an ASP.NET handler that works like an ISAPI filter- that is, that sees requests and responses and modifies them also, is by,
          * writing a module that extends FormsAuthenticatonModule and using it
          * writing a component class that extends HttpModuleCollection and using it
          * writing an HTTP module-a Class that implements IhttpModule and registering it in Web.Config
          * All of the above
  20. The ASP.NET directive that lets you cache different versions of a page based on varying input parameters, HTTP headers and browser type is
          * @OutputCache
          * @CacheOutput
          * @PageCache
          * @CacheAll
  21. If we develop an application that must accommodate multiple security levels through secure login and ASP.NET web application is spanned across three web-servers (using round-robin load balancing) what would be the best approach to maintain login-in state for the users?
          * <SessionState mode="InProc"stateConnectionString=" tcpip=127.0.0.1:42424" sqlConnectionString=" data source=127.0.0.1;user id=sa;password="cookieless="false" timeout="30" />
          * <SessionState mode="OutProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;user id=sa;password=" cookieless="false" timeout="30" />
          * <SessionState mode="stateserver" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;user id=sa;password=" cookieless="false" timeout="30" />
  22. What is the output for the below mentioned compilation command>csc /addmodule:A.Exe B.Cs
          * A.exe
          * B.exe
          * A.dll
          * B.dll
  23. How can be the web application get configured with the following authorization rules
          * Anonymous users must not be allowed to access the application.
          * All persons except David and John must be allowed to access the application.
                o <authorization><deny users = "applicationname\David, applicationname\John" ><allow roles ="*"><deny roles = "?"></authorization>
                o <authorization><allow users ="*"><deny users = "applicationname\David; applicationname\John" ><deny users = "*"></authorization>
                o <authorization><deny users = "applicationname\David, applicationname\John" ><deny users = "?"><allow users ="*"></authorization>
                o <authorization><allow users ="*"><deny users = "applicationname\David, applicationname\John" ></authorization>

  24. What will be the output of the following code snippet?

          using System;
          class MainClass
          {
              static void Main( )
              {
                  new MainClass().Display( 3.56 );
              }

              private void Display( float anArg )
              {
                  Console.Write( “{0} {1}”, anArg.GetType(), anArg );
              }

              double Display( double anArg )
              {
                  Console.Write( “{0} {1}”, anArg.GetType(), anArg );
                  return anArg;
              }

              public decimal Display( decimal anArg )
              {
                  Console.Write( “{0} {1}”, anArg.GetType(), anArg ); return anArg;
              }
          }

          * System.Single 3.56

          * System.Float 3.56

          * System.Double 3.56

          * System.Decimal 3.56
  25. What will be output for the given code?

          Dim I as integer = 5
          Do
              I = I + 2
              Response.Write (I & " ")
          Loop Until I > 10

          * 5 8

          * 5 7 9

          * 7 9 11

          * Errors out



Rating: Not yet rated

Comments

No comments posted.

Add Comment

You do not have permission to comment. If you log in, you may be able to comment.