Pages

Wednesday, December 10, 2008

ASP.Net Interview Questions - Part 3

How do you display an editable drop-down list?

Ans : Displaying a drop-down list requires a template column in the grid. Typically, the ItemTemplate contains a control such as a data-bound Label control to show the current value of a field in the record. You then add a drop-down list to the EditItemTemplate. In Visual Studio, you can add a template column in the Property builder for the grid, and then use standard template editing to remove the default TextBox control from the EditItemTemplate
and drag a DropDownList control into it instead. Alternatively, you can add the template column in HTML view. After you have created the template column with the drop-down list in it, there are two tasks. The first is to populate the list. The second is to preselect the appropriate item in the list — for example, if a book’s genre is set to “fiction,” when the drop-down list displays, you often want “fiction” to be preselected.


How do you check whether the row data has been changed?

Ans :The definitive way to determine whether a row has been dirtied is to handle the changed event for the controls in a row. For example, if your grid row contains a TextBox control, you can respond to the control’s TextChanged event. Similarly, for check boxes, you can respond to a CheckedChanged event. In the handler for these events, you maintain a list of the rows to be
updated. Generally, the best strategy is to track the primary keys of the affected rows. For example, you can maintain an ArrayList object that contains the primary keys of the rows to update..


What do you know about .NET assemblies?

Ans: Assemblies are the smallest units of versioning and deployment in the .NET application. Assemblies are also the building blocks for programs such as Web services, Windows services, serviced components, and .NET remoting applications.


What’s the difference between private and shared assembly?

Ans : Private assembly is used inside an application only and does not have to be identified by a strong name. Shared assembly can be used by multiple applications and has to have a strong name..


What’s a strong name?
Ans :A strong name includes the name of the assembly, version number, culture identity, and a public key token..


How can you tell the application to look for assemblies at the locations other than its own install?

Ans :Use the directive in the XML .config file for a given application.
should do the trick. Or you can add additional search paths in the Properties box of the deployed application..


How can you debug failed assembly binds?

Ans :Use the Assembly Binding Log Viewer (fuslogvw.exe) to find out the paths searched..


Where are shared assemblies stored?

Ans :Global Assembly Cache..


How can you create a strong name for a .NET assembly?

Ans :With the help of Strong Name tool (sn.exe)..


Where’s global assembly cache located on the system?

Ans :Usually C:\winnt\assembly or C:\windows\assembly..


Can you have two files with the same file name in GAC?

Ans :GAC is a very special folder, and while normally you would not be able to place two files with the same name into a Windows folder, GAC differentiates by version number as well, so it’s possible for MyApp.dll and MyApp.dll to co-exist in GAC if the first one is version 1.0.0.0 and the second one is 1.1.0.0..

1 comment:

Vijaya Kadiyala said...

Hi Rem,
Thank you for visting my blog...
Keep watching....