All java c# .net servlet jdbc c sqlserver android javascript php wcf clearcase angularjs 2

Main () and static constructor in same class which one will execute first?

STATIC CONSTRUCTOR will be executed first
Depends how you mean. In a simple example, the main will execute first. Consider: //A Class to print "Hello, World" public class Test{ public String value; public Test(){ value = "Hello, world"; } public static void main(String[] argv){ Test myObject = new Test(); System.out.println(myObject.value); } } When the JVM starts, there are no objects created. Therefore, the JVM needs a starting point in the code. This is the main method, which is static--it belongs to a class, not a particular instance of the class. The constructor is called when you create an object. When the above code says "new Test()" it invokes the constructor of the Test class. However, only the main of one class is invoked. If you used another class ("OtherClass") that had a main in it, that main would not be called (unless you called it yourself in your code). The constructor would be called anytime you said "new OtherClass()" Hope this clear up the usage between constructors and main methods.

What is the default life of cookie?

The default life of a cookie is 30 Minutes.

You can read the name and value of a cookie, but there is not much else to learn about a cookie. You can get the Domain and Path properties, but those properties are of limited use. For example, you can read the Domain property, but of course if your page is not in the same domain as the cookie, you will not have received the cookie in the first place.

What you cannot read is the cookie's expiration date and time. It turns out that when the browser sends cookie information to the server, the browser does not include the expiration information. You can read the Expires property, but it always returns a date-time value of zero.

Earlier under Writing Cookies I mentioned that the browser is responsible for managing cookies; the Expires property is an example of this. The primary purpose of the Expires property is to help the browser perform housekeeping on its store of cookies. From the server's perspective, the cookie either exists or it does not; the expiration is not a useful piece of information on the server side. Therefore, the browser does not provide this information when it sends the cookie. If you are concerned about the expiration date of a cookie, you must reset it, as I will explain shortly under Modifying and Deleting Cookies.

To be clear, you can read the Expires property of a cookie that you have set in the Response object, before the cookie has been sent to the browser. However, you cannot get the expiration back in the Request object.

Can I implement link button click event within gridview?

Yes. we can I implement link button click event within gridview

Handle click event of linkbutton through code -

<asp:GridView AutoGenerateColumns="false" runat="server" ID="grdCustomPagging"OnRowCommand="grdCustomPagging_RowCommand">


       <asp:BoundField DataField="RowNumber" HeaderText="RowNumber" />

       <asp:BoundField DataField="DealId" HeaderText="DealID" />

       <asp:BoundField DataField="Dealtitle" HeaderText="DealTitle" />

       <asp:TemplateField HeaderText="View">


       <asp:LinkButton runat="server" ID="lnkView" CommandArgument='<%#Eval("DealId") %>'

         CommandName="VIEW">View Deal</asp:LinkButton>





protected void grdCustomPagging_RowCommand(object sender, GridViewCommandEventArgs e)


    if (e.CommandName == "VIEW")


        LinkButton lnkView = (LinkButton)e.CommandSource;

        string dealId = lnkView.CommandArgument;



What is advantage of stored procedure?

By implementing stored procedures we can avoid the multiple time compilation of Sqlcommands.
Typically a stored procedure is a set of SQL commands, which can be compiled and stored on the server. The advantages of this is, it provides a quick response, as the query has to be parsed only once. The information exchanged between the client and server is minimal. But, on the downside, the stored procedures increase the load on the DB system.

Stored procedures provide performance benefits through local storage, precompiling the code, and caching.

Stored procedures offers security features that includes encryption and privilege limits that restrict users from modifying structure of stored procedure.

What are the programming techniques will be supporting by will support 2 Programming Techniques. They are- 1. InPage Technique and 2. CodeBehing Technique.
there are many technology which is used by Jquery, HTMl, JavaScript,C#,, and many

Why we can’t create object for abstract class and interface?

Not required. Because is abstract class is a partial implemented class and interface has no Implementation. Even though these abstract class abstract members and interface members should implement within the derived classes. Due to that reason we don’t required to create object for abstract class and interface. We will create an object for derived class and using that object we can access abstract members and interface members.

An abstract type is defined largely as one that can't be created. You can create subtypes of it, but not of that type itself. The CLI will not let you do this.

An abstract class has a protected constructor (by default) allowing derived types to initialize it.

For example, the base-type Stream is abstract. Without a derived type where would the data go? What would happen when you call an abstract method? There would be no actual implementation of the method to invoke.

How to divide the page into different parts?

By using div tag and panel control we can divide page into different parts
I'm not going to pick apart all of the CSS you should be using so the following code sample shows you how to split two div tags apart evenly. Please don't use #id selectors in your css because it kills kittens. Your HTML:




The CSS: .body { overflow: hidden; } .column { float: left; } .half { width: 50%; } .last { float: none; width: auto; } I recommend reading about CSS grid systems.

What is Rendering?

Rendering is a process of converting complete server side code into client understable code. It will happen before page is submitting to the client.

Rendering refers to the process of creating a visual representation on a display surface. In the case of Web requests, the actual rendering is performed by a client's Web browser or other viewing device. The task of the ASP.NET page framework is to send HTML (or text in another markup language such as XML or WML) in response to a Web request. The task of a page (and its child controls) is to write the markup content to an output stream.

What does Rendering mean?

Rendering is the process involved in the generation of a two-dimensional or three-dimensional image from a model by means of application programs. Rendering is mostly used in architectural designs, video games, and animated movies, simulators, TV special effects and design visualization. The techniques and features used vary according to the project. Rendering helps increase efficiency and reduce cost in design.

Techopedia explains Rendering

There are two categories of rendering: pre-rendering and real-time rendering. The striking difference between the two lies in the speed at which the computation and finalization of images takes place.
  • Real-Time Rendering: The prominent rendering technique using in interactive graphics and gaming where images must be created at a rapid pace. Because user interaction is high in such environments, real-time image creation is required. Dedicated graphics hardware and pre-compiling of the available information has improved the performance of real-time rendering.
  • Pre-Rendering: This rendering technique is used in environments where speed is not a concern and the image calculations are performed using multi-core central processing units rather than dedicated graphics hardware. This rendering technique is mostly used in animation and visual effects, where photorealism needs to be at the highest standard possible.
  • For these rendering types,the three major computational techniques used are :
    • Scanline
    • Raytracing
    • Radiosity

How to assign null value into value type variable?

We have to go for NULLABLE VALUE TYPES.

Syntax: <ValueType> ? <VariableName>=NULL;

you have to make it nullable type by using the "? " 

< data_type> ? <variable_name> = null;

Why static constructor is a parameter less constructor?

Static constructor executes at the time of class loading. There is no need to pass values explicitly, so it doesn't have parameters.

 A static constructor is called automatically to initialize the class before the first instance is created. Therefore you can't send it any parameters. ... Because you can't call it directly (as per MSDN): A static constructor cannot be called directly