What is row command event? When we will go for row command event?
The RowCommand Event can be used to get the selected GridView Row value or text.The RowCommand event is raised when a button is clicked in the gridview control. This enables you to provide an event-handling method that performs a custom routine whenever this event occurs.
The RowCommand Event occurs when a button is clicked in a GridView control.
<asp:GridView OnRowCommand="GridViewCommandEventHandler" />
The RowCommand event is raised when a button is clicked in the GridView control. This enables you to provide an event-handling method that performs a custom routine whenever this event occurs.
What is returnurl?
when the page remains unused for a certain time, the session expires and the user is redirected to the login page. returnurl has the url of the original page. Normally, myloginform.aspx should be your first page the user see.
What is Hiddenfield and what is the scope?
The HiddenField control is used to store a value that needs to be persisted across posts to the server. It is rendered as an <input type= "hidden"/> element. Normally view state, session state, and cookies are used to maintain the state of a Web Forms page. However, if these methods are disabled or are not available, you can use the HiddenField control to store state values. Note that because the value of a HiddenField is rendered to the client browser, it is not suitable for storing security-sensitive values. To specify the value for HiddenField a control, use the Value property.
A hidden field does not render visibly in the browser, but you can set its properties just as you can with a standard control. When a page is submitted to the server, the content of a hidden field is sent in the HTTP Form collection along with the values of other controls. A hidden field acts as a repository for any page-specific information that you would like to store directly in the page. Hidden field stores a single variable in its value property and must be explicitly added it to the page.ASP.NET provides the HtmlInputHidden control that offers hidden field functionality.
What is the Difference between Cookie and Session?
A cookie is a bit of data stored by the browser and sent to the server with every request.
A session is a collection of data stored on the server and associated with a given user (usually via a cookie containing an id code)
The main difference between a session and acookie is that session data is stored on the server, whereas cookies store data in the visitor's browser.Sessions are more secure than cookies as it is stored in server.Cookie can be turn off from browser.
Can we convert server side control as client side control?
Yes you can control it using SSH.
See the below link for your reference.
Why inproc session is not suitable for webgarden and webfarm model?
InProc mode, which stores session state in memory on the Web server. This is the default.
What is Boxing and Unboxing?
Implicit conversion of a value type (int, char etc.) to a reference type (object), is known as Boxing. In boxing process, a value type is being allocated on the heap rather than the stack.
Explicit conversion of same reference type (which is being created by boxing process); back to a value type is known as unboxing. In unboxing process, boxed value type is unboxed from the heap and assigned to a value type which is being allocated on the stack.
Sometimes boxing is necessary, but you should avoided it if possible, since it will slow down the performance and increase memory requirements.
What is Error, Bug and Defect?
Errors -> which comes at the time of development.
Bug -> which comes at the time of testing. (Pre-Release)
Defect --> Which comes in Production. (Post-Release)
A mistake in coding is called error ,error found by tester is called defect, defect accepted by development team then it is called bug ,
Bug: The software product has some malfunctioning code, and the malfunction is not identified or discovered by the developer. The malfunction is called Bug. The bug is always passive. Defect accepted by development team then it is called bug. Defect: When the software is used by customers the malfunctioning code might generate unexpected results. In other words, the passive bug becomes active and results in Defect. Variance between Expected and Actual Result . Error found by tester is called defect. Defect is when this mistake is present in the component or application. Error: Error is deviation from actual and expected value. Mistake done by the developer . which may syntactical error or Logical error . A mistake in coding is called error. Simply Error: A discrepancy between a computed, observed, or measured value or condition and the true, specified, or theoretically correct value or condition. This can be a misunderstanding of the internal state of the software, an oversight in terms of memory management, confusion about the proper way to calculate a value, etc. Failure: The inability of a system or component to perform its required functions within specified performance requirements. See: bug, crash, exception, and fault. Bug: A fault in a program which causes the program to perform in an unintended or unanticipated manner. See: anomaly, defect, error, exception, and fault. Bug is terminology of Tester. Fault: An incorrect step, process, or data definition in a computer program which causes the program to perform in an unintended or unanticipated manner. See: bug, defect, error, exception. Defect:Commonly refers to several troubles with the software products, with its external behavior or with its internal features. What is the difference between bug and defect? - A bug is getting a problem at the time of testing, where as a defect is problem that got by the customer in production time. - A bug is a fault in a program which causes it to behave abruptly. Bugs are usually found either during unit testing done by developer of module testing by testers. - A defect is found when the application does not conform to the requirement specification. A defect can also be found when the client or user is testing.
How to add and remove data to Application State Variables?
/Code to add data to Application State
//Code to remove all Application State Variables data
What is the importance of foreign key?
- To establish relation between Parent table and Child table we require a common column , that column should be parent table primary key column.
- To make that relation strong we require Foreign key constraint that means Foreign key constraint we should assign child table common column.
A foreign key is a value in a column that relates to a column of another table in the database. This is a fundamental concept in a relational database; the FK is the way rows of tables are joined to each other. There are several advantages to formally defining a foreign key:
1. The relationship between the related tables is clearly documented
2. The relationship between the related tables can be enforced by the database. That is, if the value specified by the FK does not exist in the foreign table, then the insert or update can be prevented. This is known as referential integrity. Likewise, deletion of a row of the foreign table can be prevented if a FK value exists in the related table.
- As a constraint on the table to stop you inserting something that doesn't point to anything;
- As a clue for the optimizer; and
- For historical reasons where is was more needed.