Which class has culture information used for resource files?

Monday, December 7, 2009


Thread.CurrentThread.CurrentUICulture


www.codecollege.NET

Which class do we need to assign formatting related culture information?


Thread.CurrentThread.CurrentCulture


www.codecollege.NET

How will you create a specific culture?


CultureInfo.CreateSpecificCulture()


www.codecollege.NET

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 refine filter condition in Catch blocks and avoid rethrowing an exception?


use When keyword


www.codecollege.NET

Which is the best practice for explicit event subscriptions: using AddHandler and RemoveHandler or WithEvents?


using AddHandler and RemoveHandler


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

Which is the best practice for a string constant with backslash or which spans multiple line?


Verbatim(@) strings imporves code readability.


www.codecollege.NET

Which one is faster ChrW or Chr ?


ChrW


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 encode URL strings?


HttpUtility.UrlEncode


www.codecollege.NET

What is XSS?


Cross-site scripting .


www.codecollege.NET

Where will you handle application level Exceptions?


In the application_error event in the global.asax.


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

LinkWithin

Blog Widget by LinkWithin

Recommended Books