Ramani Sandeep's Blog

DotNetting – Fast , Easy Way of Developing Applications

Archive for the ‘ASP.NET 3.5’ Category

Web Page Loading in Steps – ASP.NET Solution By Petr Pechovic

Posted by Ramani Sandeep on February 23, 2010

The common scenario to reach the desired page on the internet is to write the URL to a browser and press Enter. Basically say the browser asks a server for the requested page. The server builds the page (HTML) and sends the result back to the browser. The browser displays the result to the user and makes HTTP requests to other content like images, etc. Let’s jump back to the stage when the server is building the content of the page. Some parts of the page are usually static data immediately available to use. Another data of the page could be dynamic, either from huge database heavy for calculation or from another server like RSS channel. The point is that some of the data is quickly available and some of the data need time to be loaded. The HTML build by server isn’t sending to the browser until it is completely created. That is obvious.

Read more

Hope this will help

Jay Ganesh

About these ads

Posted in ASP.NET 3.5, ASP.NET Ajax, JQuery | Tagged: | 4 Comments »

Using Virtual Earth control with a Web-Service

Posted by Ramani Sandeep on February 8, 2010

This post is a tutorial on how to create a web-service which can be called from java-script and then continues on to show you how to use it with the Virtual Earth map control.

Read more

Hope this helps

Shout it

Posted in ASP.NET 3.5, Web Services | Tagged: , | Leave a Comment »

Simple task Scheduling using Global.asax

Posted by Ramani Sandeep on February 1, 2010

A frequent requirement for ASP.NET developers is to schedule tasks at regular intervals. This can include site maintenance tasks, like cleaning up old files, emailing newsletters on a schedule etc. This article examines one easy option for managing tasks like these without having to configure external tools, and discusses a couple of alternatives.

Read more

Simulate a Windows Service using ASP.NET to run scheduled jobs By Omar Al Zabir

How to run scheduled jobs from ASP.NET without requiring a Windows Service to be installed on the server? Very often we need to run some maintenance tasks or scheduled tasks like sending reminder emails to users from our websites. This can only be achieved using a Windows service. ASP.NET being stateless provides no support to run some code continuously or to run code at a scheduled time. As a result, we have to make our own Windows Services in order to run scheduled jobs or cron jobs. But in a shared hosted environment, we do not always have the luxury to deploy our own Windows service to our hosting provider�s web server. We either have to buy a dedicated server which is very costly, or sacrifice such features in our web solution. However, running a scheduled task is a very handy feature especially for sending reminder emails to users, maintenance reports to administrators, or run cleanup operations etc. So, I will show you a tricky way to run scheduled jobs using pure ASP.NET without requiring any Windows service. This solution runs on any hosting service providing just ASP.NET hosting. As a result, you can have the scheduled job feature in your ASP.NET web projects without buying dedicated servers.

Read more

Hope this helps

Jay Ganesh

Shout it

Posted in ASP.NET, ASP.NET 3.5, ASP.NET 4.0 | Tagged: , | Leave a Comment »

Best Practices for Speeding Up Your Web Site

Posted by Ramani Sandeep on January 30, 2010

The Exceptional Performance team has identified a number of best practices for making web pages fast. The list includes 34 best practices divided into 7 categories.

1) Content

  • Minimize HTTP Requests
  • Reduce DNS Lookups
  • Avoid Redirects
  • Make Ajax Cacheable
  • Post-load Components
  • Preload Components
  • Reduce the Number of DOM Elements
  • Split Components Across Domains
  • Minimize the Number of iframes

2) Server

  • Use a Content Delivery Network
  • Add an Expires or a Cache-Control Header
  • Gzip Components
  • Configure ETags
  • Flush the Buffer Early
  • Use GET for AJAX Requests

3) CSS

  • Put Stylesheets at the Top
  • Avoid CSS Expressions
  • Choose <link> over @import
  • Avoid Filters

4) Javascript

  • Put Scripts at the Bottom
  • Make JavaScript and CSS External
  • Minify JavaScript and CSS
  • Remove Duplicate Scripts
  • Minimize DOM Access
  • Develop Smart Event Handlers

5) Cookie

  • Reduce Cookie Size
  • Use Cookie-free Domains for Components

6) Images

  • Optimize Images
  • Optimize CSS Sprites
  • Don’t Scale Images in HTML
  • Make favicon.ico Small and Cacheable

7) Mobile

  • Keep Components under 25K
  • Pack Components into a Multipart Document

           Read more

Posted in ASP.NET, ASP.NET 3.5, ASP.NET 4.0, ASP.NET Ajax, Css, JavaScript, Performance | Tagged: , | Leave a Comment »

Cascading DropDownLists With ASP.NET and jQuery

Posted by Ramani Sandeep on January 25, 2010

Cascading drop down lists is a really nice feature for web developers. I thought it was time to write an article on how to do this using ASP.NET and jQuery. Well here’s one way of doing it. Before we get started, this example uses the latest version of jQuery which is 1.3.2. That can be downloaded from here.

Read full article here :

http://www.dotnetcurry.com/ShowArticle.aspx?ID=417&AspxAutoDetectCookieSupport=1

Hope this will help

Shout it

Posted in ASP.NET 3.5, JQuery | Tagged: , | 3 Comments »

How to deploy ASP.NET Web Application on server

Posted by Ramani Sandeep on January 20, 2010

Hello, in this article i have tried to explain, how a web application is deployed on to web server.

Deployment refers to the process of copying an asp.net web application from the development system to the server on which the application will be run. There are several way we can deploy our web application

We can deploy ASP.NET Application in  3 different ways

  • xCopy Deployment
  • Precompiled Deployment
  • Web Setup Project  

The choice of best deployment alternative depends upon particular need of each application. Xcopy deployment is the most easiest, and it is often used during development to create copies of an application n different servers for testing purpose. For small application xcopy deployment may be the best choice.

Precompiled deployment has several advantages over XCopy deployment. Eg. Precompiled deployment is always gives better performance for the first users of the site at the same time it is more secure as we don’t need to copy our source code files on to server. If our application deployed on one or few servers then precompiled deployment is usually best choice.

When we are going to deploy our application on number of servers then creating a setup program is a very handy tool. Although creating this setup program is much tedious and involves considerable working, the deployment from this setup program becomes very easier.

read more : http://www.codeproject.com/KB/aspnet/Deploy_web_application.aspx

Hope this will help

Jay Ganesh

Posted in ASP.NET, ASP.NET 3.5, ASP.NET 4.0 | Tagged: , , , , , | 4 Comments »

ASP.NET Dynamic Data Support

Posted by Ramani Sandeep on January 8, 2010

ASP.NET Dynamic Data brings major usability and RAD development changes to the existing ASP.NET data controls. RAD development is significantly increased by the use of a rich scaffolding framework. After you add a LINQ to SQL or Entity Framework data model to a project, you can simply register it with Dynamic Data. The result is a fully functional Web site. Full CRUD (create, read, update, and delete) operations are supported. The site includes filtering by foreign keys and Boolean fields; foreign keys are automatically converted to their friendly names. Smart validation is automatically available, which provides validation based on database constraints for nullable fields, data type, and field length.

The DetailsView and GridView controls have been extended to display fields by using templates instead of by using hard-coded rules that are programmed in the controls. These templates are part of the project, and you can customize them to change their appearance or to specify which controls they use for rendering. This makes it very easy to make a change in one place in your site that specifies how to present dates for editing, as one example. FormView and ListView controls can implement similar behavior by using a DynamicControl object in their templates and by specifying which field in the row to display. Dynamic Data will then automatically build the UI for these controls based on the templates that you specify.

Validation is significantly improved in the controls as well. The controls read metadata for a LINQ to SQL or Entity Framework data model and provide automatic validation based on the model. For example, if a column in the database is limited to 50 characters, and if a column is marked as not nullable, a RequiredFieldValidator control is automatically enabled for the column. (The controls also automatically support data-model-level validation.) You can apply other metadata to take further control over display and validation.

Important Links

Hope this will Helps

Jay Ganesh

Shout it kick it on DotNetKicks.com

Posted in ASP.NET, ASP.NET 3.5, ASP.NET 4.0 | Tagged: , , | Leave a Comment »

What is new in ASP.NET 3.5 & 4.0 ?

Posted by Ramani Sandeep on January 5, 2010

New Features in ASP.NET 3.5

The .NET Framework version 3.5 includes enhancements for ASP.NET in the following areas:

  • A new EntityDataSource control that exposes the Entity Data Model through the ASP.NET data source control architecture.
  • A new ListView data control that displays data and that provides a highly customizable UI.
  • A new LinqDataSource control that exposes Language-Integrated Query (LINQ) through the ASP.NET data source control architecture.
  • A new merge tool (Aspnet_merge.exe) that merges precompiled assemblies to support flexible deployment and release management. This feature is not available in Visual Web Developer Express Edition.

ListView Data Control

The ListView control combines many aspects of existing data controls. The ListView control is useful for displaying data in any repeating structure, similar to the DataList and Repeater controls. Unlike those controls, the ListView control supports edit, insert, and delete operations as well as sorting and paging. The paging functionality is provided for ListView by the new DataPager control.

The ListView control is a highly customizable control that enables you to use templates and styles to define the control’s UI. Like the Repeater, DataList, and FormView controls, templates in the ListView control are not predefined to render specific UI in the browser.

DataPager Control

The DataPager control is used to page through data that is displayed by a control that implements the IPageableItemContainer interface, such as the ListView control. The DataPager control supports built-in paging UI. You can specify the paging UI by using the NumericPagerField object, which lets users select a page by page number. You can also use the NextPreviousPagerField object, which lets users navigate through pages one page at a time, or to jump to the first or last page. Alternatively, you can create custom paging UI by using the TemplatePagerField object.

LinqDataSource Control

The LinqDataSource control exposes Language Integrated Query (LINQ) through the ASP.NET data source control architecture. You use the LinqDataSource control when you are creating a Web page that retrieves or modifies data and you want to use the programming model that is provided by LINQ. You can simplify the code in a Web page by enabling the LinqDataSource control to automatically create the commands for interacting with the data. By using the LinqDataSource control, you can reduce the amount of code that you must write to perform data operations when compared to performing the same operations in the SqlDataSource control or the ObjectDataSource control. When you use the LinqDataSource control, you also benefit by learning only one programming model to interact with different types of data sources.

You can use declarative markup to create a LinqDataSource control that connects to data from either a database or a data collection such as a collection. In the markup, you can specify the criteria for displaying, filtering, ordering, and grouping data. When the data source is an SQL database table, you can also configure a LinqDataSource control to update, insert, and delete data. You do not have to write the SQL commands to perform these tasks. The LinqDataSource class provides an event model that enables you to customize display and update behavior.

ASP.NET Merge Tool

The ASP.NET merge tool (Aspnet_merge.exe) lets you combine and manage assemblies that are created by the ASP.NET pre-compilation tool (Aspnet_compiler.exe). (The merge tool was released earlier as an add-on for Visual Studio 2005,) The merge tool creates single assemblies for the site. You can create an assembly for the whole Web site, for each Web site folder, or for just the files that make up the Web site UI (pages and controls).

Read more

New features introduced in ASP.NET 4.0 & Visual Studio 2010

  • Code Snippets
  • New Profiles
  • Generate From Usage
  • Multi-Targeting
  • MultiMonitor
  • Code Navigation in Class Files
    • Code Navigation
    • View Call Hierarchy
    • Code Identifier Highlighting
  • Intellisense Improvements
  • EnablePersistedSelection
  • Web.Config Transformation
  • URL Routing
  • Add Reference Dialog
  • Compressing Session Values
  • Improvements in C# 4.0
    • Dynamic lookup
    • Named parameters
    • Optional parameters
  • Meta Tags
  • Generating Client IDs
  • Permanent Redirect
  • New Browser Definitions
  • Publishing a Project
    • Package/Publish
    • Deploy SQL
    • Silverlight Applications

Read more

Shout itkick it on DotNetKicks.com

Posted in ASP.NET 3.5, ASP.NET 4.0, C# 3.0 | Tagged: , , | 1 Comment »

IIS URL Rewriting and ASP.NET routing

Posted by Ramani Sandeep on December 29, 2009

With the release of URL-rewrite module for IIS 7.0 and the inclusion of ASP.NET routing into the .NET Framework 3.5 SP1, there have been a lot of questions from ASP.NET developers about how these two features relate to each other and when to use each. The intention of this document is to describe the differences between these two technologies and to provide guidance for Web developers on when to use IIS URL rewriting and when to use ASP.NET routing.

From a high-level point of view, it may seem that these technologies provide very similar functionality–both allow your Web applications to have user-friendly and search-engine-friendly URLs. However, there are fundamental differences between these two technologies that are important to understand in order to make the right choice when deciding what to use for your Web application. In order to help you understand those, we will first explain how IIS URL rewriting and ASP.NET routing work.

Read more

Posted in ASP.NET 3.5 | Tagged: , , , | Leave a Comment »

Lazy Loading

Posted by Ramani Sandeep on December 11, 2009

Introduction

Lazy loading is a design pattern commonly used in computer programming to defer initialization of an object until the point at which it is needed. It can contribute to efficiency in the program’s operation if properly and appropriately used. The opposite of lazy loading is Eager Loading.

Article – 1: jQuery Tabs and Lazy Loading by Malcolm Sheridan

In this article I will connect to the Northwind database using LINQ to SQL, and display customer and product information in separate tabs. I’ll also show you one way of lazy loading these tabs so the data is retrieved only once, not each time a tab is selected.

Read more

Article – 2: Lazy Loading jQuery Tabs with ASP.NET by Mikesdotnetting

This article looks at efficient use of jQuery tabs when displaying data. Specifically, it covers how to lazy-load data, so that it is only accessed and displayed if the tab is clicked.

Lazy Loading is a well-known design pattern that is intended to prevent redundant processing within your application. In the case of tabbed data, there seems little point retrieving and binding data that appears in a tabbed area that no one looks at. So, this examples covers how to defer data access and display until the user wants it – which is defined by them clicking the relevant tab.

Read more

Article – 3: Eager Loading and Lazy Loading in ADO.NET Data Services by Gil Fink

The default behavior of a data service’s .NET client is not to load the entities’ associated objects. When we request an entity we will get it from the service but its associated objects will not load up at all.

Lets say that I have two entities in my program

  • a course
  • a department

The associations between the entities are that a department can have a lot of courses and a course belongs to one department.

When I load a department it’s list of courses will be empty. trying to iterate the list of courses will give nothing because the courses will not load until we tell them to be loaded explicitly.

This is done by the LoadProperty method of the data service context.

Read more

 

I have a great learning experience thru this.

Now its your turn to have it.

kick it on DotNetKicks.com
Shout it

Posted in ASP.NET, ASP.NET 3.5, ASP.NET Ajax, C# 3.0, JQuery, Linq | Tagged: , , , , , , , | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.

Join 124 other followers