Interview Questions
Asp.Net |
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 textbox. |
What's the difference between the System.Web.UI.WebControls.DataGrid and and System.Windows.Forms.DataGrid? |
Ans: The Web UI control does not inherently support master-detail data structures. As with other Web server controls, it does not support two-way data binding. If you want to update data, you must write code to do this yourself. You can only edit one row at a time. It does not inherently support sorting, although it raises events you can handle in order to sort the grid contents |
Explain what a diffgram is and a good use for one? |
Ans: A DiffGram is an XML format that is used to identify current and original versions of data elements. The DataSet uses the DiffGram format to load and persist its contents, and to serialize its contents for transport across a network connection. When a DataSet is written as a DiffGram, it populates the DiffGram with all the necessary information to accurately recreate the contents. |
Where would you use an iHTTPModule, and what are the limitations of any approach you might take in implementing one? |
Ans: One of ASP.NET's most useful features is the extensibility of the HTTP pipeline, the path that data takes between client and server. You can use them to extend your ASP.NET applications by adding pre- and post-processing to each HTTP request coming into your application. For example, if you wanted custom authentication facilities for your application. |
Suppose you want a certain ASP.NET function executed on MouseOver over a certain button. Where do you add an event handler? |
Ans: It's the Attributesproperty, the Add function inside that property. So btnSubmit.Attributes.Add("onMouseOver","someClientCode();") A simple"Javascript:ClientCode();" in the button control of the .aspx page will attach the handler (javascript function)to the onmouseover event. |
Where do you store the information about the user's locale ? |
Ans: System.Web.UI.Page.Culture. |
Where does the Web page belong in the .NET Framework class hierarchy? |
Ans: System.Web.UI.Page |
What methods are fired during the page load? |
Ans: Init() - when the pageis instantiated, Load() - when the page is loaded into server memory,PreRender() - the brief moment before the page is displayed to the user asHTML, Unload() - when page finishes loading. |
What's the difference between Response.Write() and Response.Output.Write()? |
Ans: The latter one allows you to write formatted output. |
Describe the role of inetinfo.exe, aspnet_isapi.dll andaspnet_wp.exe in the page loading process. |
Ans: inetinfo.exe is theMicrosoft IIS server running, handling ASP.NET requests among other things.When an ASP.NET request is received (usually a file with .aspx extension),the ISAPI filter aspnet_isapi.dll takes care of it by passing the request tothe actual worker process aspnet_wp.exe. |