Month: September 2017

What is ViewState, Sessions, Cookies and Caching?

There are various states of management Client-side State Management View State Hidden Field Cookies Control State Server-side State Management Session Application Object Caching We can see a number of ways of doing state management as listed above. But I am going to explain View state, Session State, cookies and difference between viewstate and session in this article. What is ViewState, Sessions, Cookies and Caching? ViewState Viewstate is a hidden fields in an ASP.NET page, contains state of those controls on a page whose “EnableViewstate” property is “true”. You can also explicitly add values in it, on an ASP.NET page like:Viewstate.Add( “MVCTest”, “50” ); Viewstate should be used when you want to save a value between different roundtrips of a single page as viewstate of a page is not accessible by another page. Because Viewstate renders with the page, it consumes bandwith, so be careful to use it in applications to be run on low bandwith Sessions Session variables are usually the most commonly used. When a user visits a site, it’s sessions starts and when the user become idle or leave the site, the session ends. Session variables should be used to save and retrive user specefic information required on multiple pages. Session variables consumes server memory, so if your may have a huge amount visiters, use session very carefully and instead of put large values in it try...

Read More

Top C# Interview Questions

List of top 10 most asked c# interview questions. Make sure you prepare these while going for an interview. Top 10 C# Interview Questions 1. What is C#? C# is an object oriented, type safe and managed language that is compiled by .Net framework to generate Microsoft Intermediate Language. 2. Benefits of using C# These are the top benefits of using C# language: Easy to learn General purpose and object oriented programming language Component oriented Structured language Can be compiled on variety of computer platforms Produces efficient programs Part of .net framework 3. What is the difference between public, static and void? Public declared variables can be accessed anywhere in the application. Static declared variables are globally accessible without creating an instance of the class. Static member are by default not globally accessible it depends upon the type of access modified used. Void is a type modifier that states that the method or variable does not return any value. 4. Can multiple catch blocks be executed? No, Multiple catch blocks can’t be executed. Once the proper catch code executed, the control is transferred to the finally block and then the code that follows the finally block gets executed. 5. Write down the different types of constructors in C#? Basically, there are five types of constructors used in C#. Static constructor Private constructor Copy constructor Default constructor Parameterized constructor 6. Pillars of OOP in...

Read More

Top 10 ASP.NET MVC Interview Questions

Preparing for asp.net interview? If yes, here’s the most asked top 10 ASP.NET MVC interview questions. Top 10 ASP.NET MVC Interview Questions 1. What is Model View Controller or MVC? Model View Controller or MVC is a software architectural pattern for implementing user interfaces. It divides a given software application into three separate interconnected parts, so as to separate internal representation of information from the way that information is presented to or accepted from the user. MVC is a framework for building web applications using a Model View Controller design: The Model represents the application core (for instance a list of database records). The View displays the data (the database records). The Controller handles the input (to the database records). The MVC model also provides full control over HTML, CSS, and JavaScript.   The MVC model defines web applications with 3 logic layers: The business layer (Model logic) The display layer (View logic) The input control (Controller logic) The Model is the part of the application that handles the logic for the application data. Often model objects retrieve data (and store data) from a database. The View is the part of the application that handles the display of the data. Most often the views are created from the model data. The Controller is the part of the application that handles user interaction. Typically controllers read data from a view, control user input,...

Read More

Most Asked Job Interview Questions

Are you going out for a job interview? Confused about what they might ask? This happens to all when people go for an interview. So, I am here sharing few most asked job interview questions. Most Asked Job Interview Questions Personality 1-Tell me about you. In this case, be synthetic and clear, answer in 30 seconds max. Refocus the question on your career path. Start with your studies, your first post, the second, and so on. until your situation today. 2-What is the most important thing in your life?  Be sincere. If for you the most important is the family, say so and explain why. You can also say that the most important to you is happiness or the fact of feeling well and balanced wherever you are. Again, be sincere! 3-What do you think are your two main faults?  Prepare this classic question in advance, but it destabilizes those who have not prepared it. Be concise. 4-Your two main qualities?  Cite qualities that your partner will imagine useful in the work: good mood, endurance, resistance to stress, empathy, etc. 5-What are your leisure time?  Here again formulate your answer with benefits that may be useful in your work: taste of challenge, competition, teamwork, concentration … also explain that they are contributing to your balance. Professionnal career 6-What have you done since your last job?  It is important there, especially if you are going through a...

Read More