Tuesday, December 29, 2009

what is the use of Application.Exit() method?


Notifies all message loops to quit, closes windows opened by them and closes program.


www.codecollege.NET

what is the use of the Environment.Exit() method?


Terminates the program and gives the return value to os as exit code.


www.codecollege.NET

Daily Tips- Tip #45 - How to exit c# applications?


You can exit using the following 2 static methods,
1. Environment.Exit(returnval)
2. Application.Exit()


www.codecollege.NET

Saturday, December 19, 2009

What are the other UI related enhancements in asp.net 4.0?


1. Better support to Web standards and Accessibility.
2. Better attribute values(boolean) for controls with Disabled attribute.
3. In-line css support for validation controls.
4. CSS for the Hidden Fields Div Element.
5. CSS and UI related to many other controls


www.codecollege.NET

What is the PersistedSelection in a gridview newly introduced in asp.net 4.0?


It is a new attribute which makes the selected row in a gridview persistable between navigation between pages in a gridview.


www.codecollege.NET

What is the use of new ClientIDMode property in asp.net 4.0?


It makes client-side script accessing asp.net server controls rendered as html controls.


www.codecollege.NET

What is Incredible Shrinking Session State in asp.net 4.0?


It a feature which compresses session states in StateServer and SQL Server modes of session storage.


www.codecollege.NET

What is the use of RedirectPermanent?


It solves the permanently moved related issues.


www.codecollege.NET

In what way is output-caching extensible?


It allows to cofigure custom output-cache providers.


www.codecollege.NET

What is the expansion of XDT?


XML Document Transform (XDT),is the feature that lets you transform a Web.config file.


www.codecollege.NET

What is Web.Config Transformation in visual studio 2010?


It transforms web.config from development environment to production environment.


www.codecollege.NET

What is called as a Web package in asp.net 4.0?


The compressed file created for your application using MSDeploy tool.


www.codecollege.NET

How will you set the Backward Compatibility feature in asp.net 4.0?


You need make the following change to the web.config ,
<system.web>
<pages controlRenderingCompatibilityVersion="3.0"/>
</system.web>


www.codecollege.NET

What is the new feature introduced in redering in asp.net 4.0?


The new feature is to have Backward Compatibility in Control Rendering.


www.codecollege.NET

What is the advantage of Routing?


It makes your site more user-friendly and your site content more discoverable by search engines.


www.codecollege.NET

Explain What is browser capabilities providers?


It lets you build a provider that in turn lets you write custom code to determine browser capabilities.


www.codecollege.NET

How will you make an application auto-startable in asp.net 4.0?


To use the auto-start feature, an IIS administrator sets an application pool in IIS 7.5 to be automatically started by using the following configuration in the

applicationHost.config file:






www.codecollege.NET

Thursday, December 17, 2009

What is auto-start feature in asp.net 4.0?


It is an feature which can be automatically started by using the configuration in the applicationHost.config file.


www.codecollege.NET

Explain Windows HTTP Services Certificate Configuration Tool (WinHttpCertCfg.exe)?


The Microsoft Windows HTTP Services (WinHTTP) Certificate Configuration Tool, WinHttpCertCfg.exe, enables administrators to install and configure client certificates in any
certificate store that can be accessed by the Internet Server Web Application Manager (IWAM) account.


www.codecollege.NET

What is an HttpCombiner?


An HTTP handler that combines multiple CSS, Javascript or URL into one response for faster page load. It can combine, compress and cache response which results in faster page
load and better scalability of web application.


www.codecollege.NET

Monday, December 14, 2009

What is the best practice for calling explicit garbage collections?


You should call the finalizer after gc like,

//c#
GC.Collect();
GC.WaitForPendingFinalizers();


www.codecollege.NET

Which is the best practice in applying multiple attributes to a same member?


Instead of applying it as comma seperated, apply individually in separate lines,
//c#
[Conditional("TRACE")]
[DebuggerStepThrough]
void MyMethod()
{
}


www.codecollege.NET

Sunday, December 13, 2009

Is it true that objects don't always get destroyed immediately when the last reference goes away?


Yes. The garbage collector offers no guarantees about the time when an object will be destroyed and its memory reclaimed.


www.codecollege.NET

Thursday, December 10, 2009

Daily Tips- Tip #33 - How to view trace details for a specific request?


To view trace details for a specific request
1.Goto to Trace.axd in the root of your application.

For ex: if the URL for your application is http://localhost/myApplication, Goto http://localhost/myApplication/trace.axd to view the trace information for that application.

2.Select the View Details link for the specific request that you want to investigate.



www.codecollege.NET

How to enable application level Tracing?


<configuration>
<system.web>
<trace enabled="true" pageOutput="false" requestLimit="40" localOnly="false"/>
</system.web>
</configuration>


www.codecollege.NET

Monday, December 7, 2009

Daily Tips- Tip #32 - #region blocks


Enclose Methods and Interfaces in #region blocks so that it can be collapsed or expanded.


www.codecollege.NET

How will you unsubscribe an event?


You can unsubscribe an event using the RemoveHandler


www.codecollege.NET

Daily Tips- Tip #31 - How will you invoke Immediate window in Visual studio?


1. Open the command window in Visual Studio
2. Type “immed” To Execute statements


www.codecollege.NET

How will you protect your ASP.NET application from XSS?


You can prevent your website from xss using:
1. Validate Input received from your site.
2. Encode Output generated from your site.


www.codecollege.NET

How will you lock configuration settings?


use the path attribute on the element to identify the Web application.


www.codecollege.NET

What interface do you need to implement for your HttpHandler to support sessions?


It needs to implement IRequiresSessionState or IReadOnlySessionState in order to use session state.


www.codecollege.NET

How will you find which control did the postback?


you can find the control which did postback using "__EVENTTARGET" with few exceptions.


www.codecollege.NET

How will you impersonate the original caller?


<authentication mode="Windows" />
<identity impersonate="true" />


www.codecollege.NET

When do you use windows authentication in ASP.NET 2.0?


Your ASP.NET application should use windows authentication when your users have windows accounts that can be authenticated by a server. The accounts can be local windows accounts or domain accounts.


www.codecollege.NET

How will you enforce strong passwords using membership feature in ASP.NET 2.0?


You can enforce strong passwords using membership by configuring the attributes minRequiredPasswordLength, minRequiredNonAlphanumericCharacters, and passwordStrengthRegularExpression on your membership provider configuration.


www.codecollege.NET

Saturday, December 5, 2009

Where will you place your user-interface strings ?


It is a best practice to place all your user-interface strings in a resource file rather burning them in code.


www.codecollege.NET

Friday, December 4, 2009

How to read a Session variable in javascript?


var jsUsername;
jsUsername = <%=Session["CurrentUser"]%>


www.codecollege.NET

What is SAML?


Security Assertion Markup Language.


www.codecollege.NET

How will declare a one way communication method in a ASP.NET Webservice?


[SoapDocumentMethod(OneWay=true)]
[WebMethod()]
public void AOneWayComm()
{
//
}


www.codecollege.NET

Visual Studio 2010 Beta 2


you can download Visual Studio 2010 Beta 2 from the following location,




www.codecollege.NET