ASP.NET 3.5 vs ASP.NET 4.0
Are you frustrated in searching through Search Engines ?
Difference between ASP.NET 3.5 and ASP.NET 4.0
- S.NoASP.NET 3.5ASP.NET 4.0
1 Whether Client data can be directly accessed ?In ASP.NET 3.5, the data from the client side cannot be directly accessed. The client side data can only be accessed using script manager’s Page methods,interface named ICallbackEventHandleror by using the componentXMLHttpHandler.Whether Client data can be directly accessed ?In ASP.NET 4, the data from the client side can be directly accessed using client data view and client data context objects.Following methods are available in ASP.NET 4.0 to access Client data directly,1) Client data controls
2) Client templates
3) Client data context2 Whether we can set MetaTags (Keywords,Description) in the Page Directive?In ASP.NET 3.5, two meta tags can be used, one with name as keywords and other with name as description to record the keywords and description for SEO purpose.Whether we can set MetaTags (Keywords,Description) in the Page Directive?The meta keywords and metadescription is really useful for SEOoptimization of the web page. InASP.NET 4, the keywords anddescription can be included as part of page directive itself.3 Whether ViewState can be applied at the Control level ?
ASP.NET 3.5 EnableViewState property cannot be used to apply ViewState at the Control level.It is mainly used at the page level.Its default value is True and its acceptable values ae True and False.Whether ViewState can be applied at the Control level ?
In ASP.NET 4, ViewState mechanism is improved to set ViewState at the Contol level besides at the page level set by EnableViewState property in ASP.NET 3.5 .Its default value is Inherit and acceptable values areEnabled,Disabled and Inherit.4 How ASP.NET 3.5 identifies ClientID ?In ASP.NET 3.5, ClientId property has to be used to find the dynamically generated client id.How ASP.NET 4.0 identifies ClientID ?In ASP.NET 4, a property calledClientIDMode is newly introduced to identify and record the ClientId easily.ClientIDMode has following values.AutoID – Same as ASP.NET 3.5
Static – There won’t be any separate clientid generated at run time
Predictable-These are used particularly in datacontrols. Format is like clientIDrowsuffix with the clientid vlaue
Inherit- This value specifies that a control’s ID generation is the same as its parent.
The default value of ClientIDMode for a page isPredictable. The default value of ClientIDMode for a control is Inherit. Because the default for controls isInherit, the default generation mode is Predictable.5 Whether permanent redirection is possible or not ?There is no RedirectPermanent() method available in ASP.NET 3.5.Redirect method is less useful than the RedirectPermanent method. It will cause search engine results to be less current, and this can also impact performance because visitors will not be accessing the best URL. Redirect may be most useful for login pages or more complex situations.Whether permanent redirection is possible or not ?ASP.Net 4.0 introduced a new URL redirection method RedirectPermanent() which avoids round trips.
We can implement this as shown below:RedirectPermanent("/newpath/newpage.aspx");
RedirectPermanent returns a 301 HTTP response—it redirects permanently to another location. Search engines such as Google and Bing will change their indexes to point to the new page directly. To call RedirectPermanent you will need to get the Response object from the HttpContext.Then, you can call RedirectPermanent: if you pass false as the second parameter, you can perform further actions and avoid an exception.6 Output Caching Enhancement:OutPut Cache in ASP.Net 3.5 has a limitation - generated content always has to be stored in memory, and on servers that are experiencing heavy traffic, the memory consumed by output caching can compete with memory demands from other portions of a Web application.Output Caching Enhancement:ASP.NET 4 adds an extensibility point to output caching that enables you to configure one or more custom output-cache providers. Output-cache providers can use any storage mechanism to persist HTML content. This makes it possible to create custom output-cache providers for diverse persistence mechanisms, which can include local or remote disks, cloud storage, and distributed cache engines.In order to know how to implement Custom Output Caching.7 QueryExtender Control for filtering the data returned by EntityDataSource and LinqDataSource controls:There is no QueryExtender control available in ASP.NET 3.5 to filter the data returned by DataSource Controls( EntityDataSource and LinqDataSource).It has to explicitly use 'Where clause' in the data source.QueryExtender Control for filtering the data returned by EntityDataSource and LinqDataSource controls:QueryExtender Control is an add-on to the DataSource Controls: EntityDataSource and LinqDataSource. QueryExtender is used to filter the data returned by these controls. As the QueryExtender control relies on LINQ, the filter is applied on the database server before the data is sent to the page, which results in very efficient operations.i.e., QueryExtender Control is intended to be used to create filters for data that is retrieved from a data source, without using an explicit Where clause in the data source. The control can be used to filter data in the markup of a Web page by using declarative syntax.
Proxy vs Channel Factory in WCF
Difference between Proxy and Channel Factory in WCF
Are you frustrated in searching through Search Engines ?
- S.NoProxyChannel Factory
1 What is the prerequisite for Proxy ?Only require URL where the service resides .What is the prerequisite for Channel Factory ?We must have direct access to the assembly that contains that service contractT
for.2 In terms of complexity ?Very Simpler.In terms of complexity ?Not easier.3 In terms of understandability ?Easy to Understand.In terms of understandability ?Channels are complex, network-related.4 How to use Proxy ?There is Visual Studio gives us add the reference.How to use Channel Factory ?When we share a common service contract dll between the client and the server, we will be using the ChannelFactory class.5 When we will go for Proxy ?If we know that our entities will change much and the client code is more, then we need to go for Proxy.Proxy has following limitations,- Properties need to have gets and sets
- Constructors cannot be exposed
- Methods other than the service contract cannot be exposed
When we will go for Channel Factory ?If we know that our entities will not change much and the client code is less, then a DLL would work better than a Proxy.6 How to create Proxy ?By using SVCutil.exe we will create PRoxyHow to create Channel Factory ?When we are using DLL that refers Service contract interface then use the channel factory class
0 Comments
Post a Comment