Skip to main content

Posts

Accessibility keywords in C#

  Accessibility keywords in C# The following is the list of accessibility keywords in C#. Public –  Visible in the current and referencing assembly. Private –  Visible inside the current class. Protected –  Visible inside the current as well as in the derived class. Internal –  Visible inside the containing assembly. Internal protected –  Visible inside the containing assembly, also in the descendent of the current class. Next are the modifiers which refine the declaration of a class. Here is the list of all supported modifiers in C#. Sealed –  The class stops inheriting by any derived class. Static –  The class contains only static members. Unsafe –  The class that stores unsafe types likes pointers. Abstract –  No instance of the class if the Class is abstract.

TCS Interview Questions .Net experienced

   TCS Interview Questions .Net experienced 1)How did you implemented classes in your project? 2) Asp.net page life cycle? Explain briefly? 3) Asp.net page events? 4) How iis recognize that which web application we are requesting? 5) How iis recognize that web application is developed in which language? 6) How iis will use authentication? 7) Is it pages will compile in server? 8) In server pages will compile or execute? 9) What is diff between compile and execute? 10) What is appdomain? 11) What is aspnet_issapi.dll? 12) What is aspnet_wp.exe? 13) What is application? 14) What is view state? 15) Why we use view state? 16) What are the validation controls? Explain the use of validation controls? 17) Validation controls are client side or server side? 18) How to make raise JavaScript at the page is displaying? (which page event will use eg: page_load) ? 19) What is session? 20) Is it necessary to create session object? (ans :no)   21) What...

Asp .net MVC 5 Features-Attribute based routing

Attribute based routing in MVC 5 we can   define the route in the same place where action method is defined Here we specified the route for the controller GetElectronicItems [Route( "Products/Electronics/{id}" )]      public ActionResult GetElectronicItems( string id)      {          ViewBag.Id = id;           return View();      } To enable attribute based routing in RouteConfig.cs we need to add   the following   in the RouteConfig file. public static void RegisterRoutes(RouteCollection routes)        {            routes.MapMvcAttributeRoutes();        } Optional Parameter We can also specify if there is any optional parameter in the URL pattern defined by t...

Asp. net MVC 6 Features

Asp. net MVC 6 Features ·            Cloud optimized versions of MVC, Web API, Web Pages, SignalR, and EF ·          MVC, Web API and Web Pages merged into one framework (MVC6) ·          No dependency on System.Web (HttpContext object graph drops from ~30k/req to ~2k/req) ·          New project extension project.json to list all dependencies and a Startup class that replaces global.asax ·          Cloud ready by design. Session state and caching adjust behavior depending on hosting environment. ·          Host agnostic ·          True Side-by-side deployment. Just upload dependencies to the bin directory without affecting other apps on same server. ·   ...

Asp .net MVC Questions and Answers-3

Asp .net MVC Questions and Answers Asp .net MVC Questions and Answers 21) Explain how you can send the result back in JSON format in MVC? In order to send the result back in JSON format in MVC, you can use “JSONRESULT” class. 22) Explain what is the difference between View and Partial View? View Partial View It contains the layout page It does not contain the layout page Before any view is rendered, viewstart page is rendered Partial view does not verify for a viewstart.cshtml. We cannot put common code for a partial view within the viewStart.cshtml.page View might have markup tags like body, html, head, title, meta etc. Partial view is designed specially to render within the view and just because of that it does not consist any mark up View is not lightweight as compare to Partial View We can pass a regular view to the RenderPartial method       ...

Asp .net MVC Questions and Answers-2

Asp Dot net MVC Questions and Answers Asp .net MVC Questions and Answers 11) Explain the role of “ActionFilters” in MVC? In MVC “ ActionFilters” help you to execute logic while MVC action is executed or its executing. 12) Explain what are the steps for the execution of an MVC project? The steps for the execution of an MVC project includes Receive first request for the application Performs routing Creates MVC request handler Create Controller Execute Controller Invoke action Execute Result 13) Explain what is routing? What are the three segments for routing is important? Routing helps you to decide a URL structure and map the URL with the Controller. The three segments that are important for routing is ControllerName ActionMethodName Parameter 14) Explain how routing is done in MVC pattern? There is a group of routes called the RouteCollection, which consists of registered routes in the application.  The RegisterRoutes method...

Asp .net MVC Questions and Answers-1

Asp .net MVC Questions and Answers Asp .net MVC Questions and Answers 1) Explain what is Model-View-Controller? MVC is a software architecture pattern for developing web application. It is handled by three objects Model-View-Controller. 2) Mention what does Model-View-Controller represent in an MVC application? In an MVC model, Model– It represents the application data domain. In other words applications business logic is contained within the model and is responsible for maintaining data View– It represents the user interface, with which the end users communicates. In short all the user interface logic is contained within the VIEW Controller– It is the controller that answers to user actions. Based on the user actions, the respective controller responds within the model and choose a view to render that display the user interface.  The user input logic is contained with-in the controller 3) Explain in which assembly is the MVC framework is defined? ...