asp.net interview questions and answers
How do we do paging in gridview?
Make Allowpaging=true also specify the PageIndex as some value
Namespace and Assembly?
Namespace is a logical design-time naming convenience, whereas an assembly establishes the name scope for types at run time.
Diff b/w dataset.clone and dataset.copy
dataset.clone copies just the structure of dataset (including all the datatables, schemas, relations and constraints.); however it doesn’t copy the data. On the other hand dataset.copy, copies both the dataset structure and the data.
Diff b/w Const and readonly?
A const can not be static, while readonly can be static.
A const need to be declared and initialized at declaration only, while a readonly can be initialized at declaration or by the code in the constructor.
A const’s value is evaluated at design time, while a readonly’s value is evaluated at runtime.
Diversities between static or dynamic assemblies ?
Assemblies can be static or dynamic.
Static assemblies can include .NET Framework types (interfaces and classes), as well as resources for the assembly (bitmaps, JPEG files, resource files, and so on).
Static assemblies are stored on disk in portable executable (PE) files.
You can also use the .NET Framework to create dynamic assemblies, which are run directly from memory and are not saved to disk before execution.You can save dynamic assemblies to disk after they have executed.
How can you show the number of visitors of your app
By havving an application variable and Incrementing it in every session start.
TO Achieve it use the Global.asax file's Application_Start and Session_Start Events.