User Information Validation (Authentication)
User Information Validation (Authentication)
What namespace does the Web page belong in the .NET Framework class hierarchy?
System.Web.UI.Page
If u have a control like button in your data grid /list some times events get bubbled when ever we call
button click event so that button click will not fire
That is called bubbled event
Suppose you want a certain ASP.NET function executed on Mouse Over for a certain
button. Where do you add an event handler?
Add an OnMouseOver attribute to the button. Example:
btnSubmit.Attributes.Add("onmouseover","someClientCodeHere() ;");
Can you explain the difference between an ADO.NET Dataset and an ADO Record set?
· A Dataset can represent an entire relational database in memory, complete with tables, relations, and
views.
· A Dataset is designed to work without any continuing connection to the original data source.
· Data in a Dataset is bulk-loaded, rather than being loaded on demand.
· There’s no concept of cursor types in a Dataset.
· Datasets have no current record pointer you can use For Each loops to move through the data.
· You can store many edits in a Dataset, and write them to the original data source in a single operation.
· Though the Dataset is universal, other objects in ADO.NET come in different versions for different data
sources.
Can you explain what inheritance is and an example of when you might use it?
When you want to inherit (use the functionality of) another class. Example: With a base class named
Employee, a Manager class could be derived from the Employee base class.
What’s an assembly?
Assemblies are the building blocks of the .NET framework. Assembly is a logical unit of code which can
exists as DLL or EXE file. It consists of 4 parts.
Which method do you invoke on the Data Adapter control to load your generated
dataset with data?
The Fill () method.
Which template must you provide, in order to display data in a Repeater control?
ItemTemplate.
What property must you set, and what method must you call in your code, in order
to bind the data from a data source to the Repeater control?
You must set the DataSource property and call the DataBind method.
Which property on a Combo Box do you set with a column name, prior to setting the
DataSource, to display data in the combo box?
DataTextField property.
Which control would you use if you needed to make sure the values in two different
controls matched?
CompareValidator control.
What does the "EnableViewState" property do? Why would I want it on or off?
It allows the page to save the users input on a form across post backs. It saves the server-side values for
a given control into View State, which is stored as a hidden value on the page before sending the page to
the client’s browser. When the page is posted back to the server the server control is recreated with the
state stored in view state.
What are the different types of Session state management options available with
ASP.NET?
ASP.NET provides In-Process and Out-of-Process state management. In Process stores the session in
memory on the web server. This requires the "sticky-server" (or no load-balancing) so that the user is
always reconnected to the same web server. Out-of-Process Session state management stores data in an
external data source. The external data source may be either a SQL Server or a State Server service.
Out-of-Process state management requires that all objects stored in session are serializable.
What is reflection?
All .NET compilers produce metadata about the types defined in the modules they produce. This metadata
is packaged along with the module (modules in turn are packaged together in assemblies), and can be
accessed by a mechanism called reflection. The System.Reflection namespace contains classes that can be
used to interrogate the types for a module/assembly.
Using reflection to access .NET metadata is very similar to using ITypeLib/ITypeInfo to access type library
data in COM, and it is used for similar purposes - e.g. determining data type sizes for marshaling data
across context/process/machine boundaries.
Reflection can also be used to dynamically invoke methods (see System.Type.InvokeMember ) , or even
create types dynamically at run-time (see System.Reflection.Emit.TypeBuilder).
Partial Assembly reference: We can dynamically reference an assembly by providing only partial
information, such as specifying only the assembly name. When you specify a partial assembly reference,
the runtime looks for the assembly only in the application directory.
We can make partial references to an assembly in your code one of the following ways:
-> Use a method such as System.Reflection.Assembly.Load and specify only a partial reference. The
runtime checks for the assembly in the application directory.
-> Use the System.Reflection.Assembly.LoadWithPartialName method and specify only a partial reference.
The runtime checks for the assembly in the application directory and in the global assembly cache
What is side-by-side execution? Can two application one using private assembly and
other using Shared assembly be stated as a side-by-side executables?
Side-by-side execution is the ability to run multiple versions of an application or component on the same
computer. You can have multiple versions of the common language runtime, and multiple versions of
applications and components that use a version of the runtime, on the same computer at the same time.
Since versioning is only applied to shared assemblies, and not to private assemblies, two application one
using private assembly and one using shared assembly cannot be stated as side-by-side executables.
What's the difference between the Debug class and Trace class?
Documentation looks the same. Use Debug class for debug builds, use Trace class for both debug and
release builds.
What is serialization?
Serialization is the process of converting an object into a stream of bytes. Deserialization is the opposite
process of creating an object from a stream of bytes. Serialization / Deserialization is mostly used to
transport objects (e.g. during remoting), or to persist objects (e.g. to a file or database).
Value Type:
Value types are allocated on the stack just like primitive types in VBScript, VB6 and C/C++. Value types
are not instantiated using new go out of scope when the function they are defined within returns.
Value types in the CLR are defined as types that derive from system.valueType.
A data type that fully describes a value by specifying the sequence of bits that constitutes the value's
representation. Type information for a value type instance is not stored with the instance at run time, but
it is available in metadata. Value type instances can be treated as objects using boxing.
Un-Boxing:
The conversion of an object instance to a value type.
What is namespace used for loading assemblies at run time and name the methods?
System.Reflection
Explain encapsulation?
The implementation is hidden, the interface is exposed.
What data type should you use if you want an 8-bit value that's signed?
sbyte.
What happens when you encounter a continue statement inside the for loop?
The code for the rest of the loop is ignored, the control is transferred back to the beginning of the loop.
How can you sort the elements of the array in descending order?
By calling Sort() and then Reverse() methods.
What's the .NET datatype that allows the retrieval of data by a unique key?
HashTable.