Posts

Showing posts from May 31, 2009

ASP.NET Caching

Caching Caching is the process of storing frequently used data, usually data that is costly to generate, for reuse. Typically this data is stored in memory since retrieving data from memory is much more efficient than retrieving the data from other locations, such as a database. ASP.NET has several facilities for supporting caching: a Cache API for storing arbitrary data and an Output Cache used to store frequently requested Pages. Let's discuss a quick example. A catalog used on an e-commerce site might only change once a week. An ASP.NET Web application could be built that provides a front-end interface for that catalog, allowing customers to purchase products. When a customer is simply browsing the catalog, the system is making (in most cases) network calls to a back-end database server. The database server is also doing calculations on the data, such as a join query, and returning results. This type of configuration is quite common, be it a catalog or some other type of commonl

Partial update of parent page via AJAX (ASP.NET 2.0) on close of a child window - conditionally

Introduction At times, we are in situations where we need to open a child window, do some work on it, and then close it. Now, based on what was done on the child window, we may need to refresh the parent page or not. Now, not just refresh, a partial refresh ! I have tried to demonstrate how we can pass on a value to a child, do something out there, and on saving it, we partially update the parent page. If nothing was done on the child window or the operation was canceled, then there would be no update of the parent page. This whole operation gives a good feel to the user, and the performance of the page would look a lot improved. Background We had a requirement in our project where we needed to update the parent page partially based on a particular value returned from the child window. Earlier, we were able to update the parent page, but all the time! Finally, after getting around the way described below, we were able to achieve partial update of the parent page only when required. Usi

Integrating PayPal Payments into E-Commerce Applications with ASP.NET

E-Commerce applications require mechanisms for payment. Although more commonly than not e-Commerce sites will use full credit card processing gateways, giving PayPal as an additional option of payment provides additional payment options for your customers, especially those that don’t want to pay by credit card over the Internet. If you run a Web shop that uses direct credit card processing and want to integrate PayPal seamlessly, you’ll find that using PayPal as a processing service is not as straight forward as using a payment gateway. In this article I describe how you can minimize the external PayPal interaction and work the PayPal payment into the order processing workflow to provide a seamless interface using ASP.NET and C#. However, the principles used here should be applicable to any Web programming environment. Payment processing on the Web is a big market and there a myriad of services and providers that allow you to process credit cards and bank cards over Internet connection

Credit Card Validator control for ASP.NET

Introduction A while ago I started working on converting an eCommerce payment gateway's ( DataCash ) COM server to a native .NET assembly using their XML API. Once I had got a basic version working I decided to produce a simple web form to test it out, and so opened it up for all comers (and received some very generous donations from CP members -- thanks guys :). As part of this web form I wanted to include support to check that users had entered a card number, expiration date etc., and then wanted to extend it further to include support for checking that the card number was valid before issuing a request to the payment gateway's server. This is the result, a drop-in replacement for any of the other validation controls. Incidentally, you can see a demo of the validator in use (as well as the card payment gateway assembly) at the following address: https://ssl500.securepod.com/oobaloo/DataCash/ , besides this you may also be interested in the everything you ever wanted to know a

Integrating Electronic Payment Processing into ASP.NET Web Applications

Electronic Payment processing continues to be a common theme for many Web based applications and while the process is getting easier with the market maturing, there's still a maze of choices and options in setting up your payment solutions and get them integrated into existing applications. In this article, I'll give a high level overview of the electronic payment processing by looking at the various players involved in the payment processing operation and some suggestions and options you have on getting hooked up with the right provider. I'll talk about how the process works, what it takes to get started and what it's going to cost. Finally I'll take you through an application that integrates payment processing and show a class you can use to integrate a few of the common Gateway services into existing applications. The process of taking electronic payments from customers and getting the money deposited into your own accounts is a winding one, with several levels o

Live Data Binding using ASP.NET AJAX 4.0

Introduction Many of you may already be familiar with the upcoming version of ASP.NET AJAX, version 4.0. The release was out on March 12, 2009. The key features for this version are: ADO.NET Data Services support WCF and ASMX Web service integration ASP.NET AJAX Client Templates Declarative instantiation of client-side controls and behaviors Observable pattern for plain JavaScript objects Live Bindings Markup Extensions DataView control and DataContext component Command Bubbling Change tracking and identity management Support for managing complex links and associations between entities from multiple entity sets or tables Extension methods allowing change tracking and read-write client-server scenarios using other JSON services, including RESTful or JSONP based services This preview version can be downloaded from here . This writing is mostly for highlighting the "Live Binding" feature introduced in this release of ASP.NET AJAX. This will also cover some operations on Da

.NET 4 Revealed

The next-generation .NET Framework 4 and Visual Studio 2010 beta 1 bits reached developers' workstations last month, after a seven-month hiatus. The first -- and in some cases, only -- community technology previews (CTPs) appeared last October at Microsoft's Professional Developers Conference (PDC). The updated framework promises maturing class libraries and new parallelism capabilities to facilitate the development of components that can take advantage of the intensive I/O capabilities of multi-core systems. The updated framework promises maturing class libraries and new parallelism capabilities to facilitate the development of components that can take advantage of the intensive I/O capabilities of multi-core systems. "With 4, I see less new things and more of an extension in terms of beefing up what's there-the Windows Communication Foundation, Windows Presentation Foundation, Workflow services," says Mark Driver, vice president of research at Gartner Inc. "

Speed Up Your Site With AJAX

Want to increase the interactivity, speed and usability of your web pages? AJAX could be the answer. Short for Asynchronous JavaScript and XML, AJAX is a web development technique for creating interactive web applications. In general, it makes web pages feel more responsive by exchanging small amounts of data with a server behind the scenes so an entire web page does not have to be reloaded each time the user makes a change. The benefits are obvious to Fairytale Brownies in Chandler, Arizona, which recently implemented AJAX to speed up the checkout process on its site. Founded in 1992 by childhood friends Eileen Joy Spitalny and David Kravetz, both 40, Fairytale Brownies is the nation’s leading purveyor of mail-order gourmet brownies, with 2007 sales projections of $8.9 million. When the company recently redesigned its website to make its brownies look more appealing, it used AJAX to speed up the gift list checkout section. “This gift list shows our customers who received gifts

Web Paging Navigation Control

Introduction this web paging control for navigation in data list. how to use this control 1-Set Control setting in page load 2-to get page index from this control use PagingControl1_PageIndexClick(object sender, EventArgs e) event Sample for how to use this control See full detail: http://www.c-sharpcorner.com/UploadFile/Nesreeen/WebPagingControl05182009155353PM/WebPagingControl.aspx

Using the Backgroundworker with VB.Net 2005

I write a lot of Client side WinForm programs to analyze wireless network test results, from 100MB log files and MySQL databases. I wanted to be able to run some background tasks that can take 10+ minutes to complete.Using Google, I found a few programs that used the Backgroundworker (in .Net 2.0). Although all the examples I found were overly complicated and hard to follow; so I decided to write a very simple program in VB.Net 2005 that showed how to use all the features of the Backgroundworker. See full detail: http://www.vbdotnetheaven.com/UploadFile/ffortino/Page105242009222549PM/Page1.aspx

Client-side Data Binding in ASP.NET AJAX 4.0

The 4.0 release of ASP.NET AJAX will include a significant number of new features targeted at client-side programming. Earlier releases of ASP.NET AJAX included client-side programming features like web service proxies, global helper functions (like $get and $create), client library additions (like Sys.StringBuilder), and a complete set of extensions to add classes, namespaces, interfaces, and inheritance to the JavaScript language. Most of these features, however, were targeted at supporting the developer in building client-side features by hand, and did not help much with generating client-side HTML or manipulating the DOM. Version 4.0 introduces two major features for simplifying client-side development: client-side data binding and declarative component creation. As we’ll see, the addition of these two features greatly expands the options you have when writing client pages. Additionally, declarative instantiation and templating define a client-side model that is very familiar and t

What is sealed class and sealed method?

In this article I will try to explain sealed class and sealed method in a very simple way. Sealed Class Sealed class is used to define the inheritance level of a class. The sealed modifier is used to prevent derivation from a class. An error occurs if a sealed class is specified as the base class of another class. Some points to remember: 1. A class, which restricts inheritance for security reason is declared, sealed class. 2. Sealed class is the last class in the hierarchy. 3. Sealed class can be a derived class but can't be a base class. 4. A sealed class cannot also be an abstract class. Because abstract class has to provide functionality and here we are restricting it to inherit. Practical demonstration of sealed class See full detail: http://www.c-sharpcorner.com/UploadFile/puranindia/sealedclass_sealedmethod05252009042850AM/sealedclass_sealedmethod.aspx

MCTS Self-Paced Training Kit (Exam 70-562): Microsoft® .NET Framework 3.5 ASP.NET Application Development

Maximize your performance on 70-562, a required exam for the new Microsoft Certified Technology Specialist (MCTS): Microsoft .NET Framework 3.5 ASP.NET Application Development certification. This all-new, 2-in-1 SELF-PACED TRAINING KIT includes the official Microsoft study guide, plus practice tests on CD to help you assess your skills. It comes packed with the tools and features exam candidates want most including in-depth, self-paced training based on final exam content; rigorous, objective-by-objective review; exam tips from expert, exam-certified authors; and customizable testing options. It also provides real-world scenarios, case study examples, and troubleshooting labs for the skills and expertise you can apply to the job. Work at your own pace through lessons and lab exercises. Focusing on ASP.NET application development, the study guide delves into how to create a Web site, add and configure server controls, customize a Web application, work with ASP.NET AJAX and client-side s

ASP.NET Security

Security is one of the most important concerns in application software development. Building a robust security model is one of the most important factors that drive the success of application software. As far as security in ASP.NET is concerned, three terms come into my mind, i.e., Authentication, Authorization and Impersonation. Put simply, authentication authenticates the user’s credentials and authorization relates to the resources that an authenticated user has access to. This article is the first in a series of articles on ASP.NET security and discusses these concepts and their applicability. Let us start our discussion with a brief outline on the sequence of events are as far as authentication and authorization are concerned when a new request comes in. When a new request arrives at IIS, it first checks the validity of the incoming request. If the authentication mode is anonymous (default) then the request is authenticated automatically. But if the authentication mode is overridd

ASP.NET, AJAX, ASP.NET MVC, Visual Studio

Here is the latest in link-listing series . Also check out my ASP.NET Tips, Tricks and Tutorials page and Silverlight Tutorials page for links to popular articles I’ve done myself in the past. You can also now follow me on twitter ( @realscottgu ) where I also post links and small posts. ASP.NET Using ASP.NET 3.5’s ListView and DataPager Controls to Delete Data : Scott Mitchell continues his excellent tutorial series on the ASP.NET ListView control. In this article he discusses how to handle deleting data with it. ASP.NET ListView: Displaying Hierarchical Data : Adam Pooler writes about how to use the ASP.NET ListView control to display hierarchical data within a web page. ELMAH: Error Logging Module and Handlers for ASP.NET : ELMAH is a really cool open source error logging module for ASP.NET that can help you figure out what is going wrong with a site in production (and it enables you to diagnose things remotely in a browser). This post from Scott Hanselman nicely summarizes some