Thoughts on .Net & Coding
.Net Articles, tutorials, reviews, code and more...
-
Dynamic data in existing data controls
In a traditional data driven web site, you need to individually create web forms necessary to get the data in and out of the database tables. ASP.NET Dynamic Data features allow you to automate this functionality. ASP.NET Dynamic Data allows you to create extensible data driven web applications with little or no coding from your side. ASP.NET Dynamic Data automatically reads the database schema for you and generates data display and data entry pages on the fly. You can, of course, customize the resultant application if needed. The ASP.NET Dynamic Data Web Site project templates create a base project with necessary web forms and user controls that you can customize to suit your needs. However, in some cases creating a separate project is undesirable and you may want to integrate the Dynamic Data features with an existing web site. In this step-by-step article you will learn how this can be accomplished.
-
Using Microsoft Ajax CDN to Refer ASP.NET AJAX and jQuery Files
Modern web applications rely heavily on client side scripting to provide rich user experience. To that end ASP.NET AJAX and jQuery are popular choices amongst ASP.NET developers to render rich user interface. These libraries make use of client script physically stored in JavaScript (.js) files. When a client accesses a web form that makes use of these libraries the client browser first needs to download the required library files on the client side and then execute the client script. Developers often store these JavaScript files as a part of their web site and then refer to them in various web forms. Though this approach works, it's not the best approach to make use of such client side libraries. That is where Content Delivery Network or CDN comes into picture. As an ASP.NET developer it would be nice to know what a CDN is and how Microsoft Ajax CDN can be used in ASP.NET web sites to refer ASP.NET AJAX and jQuery files. The remainder of the article discusses these concepts.
-
Developing a Database Driven Accordion Menu Using WCF and jQuery
Web sites often use menus to display available options to the end user. The data required by these menus, such as menu text and URL, is frequently stored in XML files. Though this arrangement works great for small number of menu items, in certain applications it is required that you display menu options based on the security credentials of the current user. At times you may also need to display menus in Unicode character set. In such cases storing menu data in a database table can be more beneficial than maintaining separate XML files. In this article you will develop an Accordion menu that fetches data such as menu text, menu items and URL from a database table. An Accordion menu essentially displays menu options in collapsible panels. At a time only one menu and its options are expanded while other menus are collapsed. In order to develop our Accordion menu we will make use of ASP.NET, Windows Communication Foundation (WCF) and jQuery.
-
Book Review : ASP.NET MVC 2 Cookbook
When you start learning new technology, one way is to follow start-to-end kind of approach where step by step you build your skills from basic to advanced concepts. The other approach, which is often fast and efficient, is to learn by working examples. ASP.NET MVC 2 Cookbook by Packt Publishing follows such an approach. The book presents over 70 code recipes in ASP.NET MVC to make you up and running with MVC 2 quickly. Note, however, that book doesn't delve too much on the theory of MVC. It focuses on practical implementation of MVC with the help of small small examples.
-
Creating and Using a jQuery Plug-in in ASP.NET Web Forms
Developers often resort to code reuse techniques in their projects. As far as ASP.NET framework server side programming is concerned classes, class libraries, components, custom server controls and user controls are popular code reuse techniques. Modern ASP.NET web applications no longer restrict themselves only to server side programming. They also make use of client side scripting to render rich web forms. No wonder that Microsoft Visual Studio 2010 includes jQuery library by default as a part of newly created web site. If you are using jQuery for client side scripting then one way to reuse your client side code is to create a jQuery plug-in. Creating a plug-in allows you to bundle your reusable jQuery code in a neat way and then reuse it across web forms. In this article you will learn how to create a simple jQuery plug-in from scratch. You will also learn about certain guidelines that help you build professional jQuery plug-ins.
-
Book Review : ASP.NET Site Performance Secrets
Any web site developer sooner or later encounters a situation where he or the client is not so happy with the performance of the web site under consideration. No wonder experienced developers look for opportunities to squeeze last drop of performance from their web sites. To that end, ASP.NET Site Performance Secrets provides sound understand of the time proven techniques of performance optimization.
-
Using GridView and DetailsView in ASP.NET MVC - Part 2
In Part 1 of this two part article, I explained how GridView and DetailsView controls can be used in ASP.NET MVC web pages. In this part I will show how to add sorting and paging capabilities to the GridView control without breaking the MVC design pattern.
-
Using GridView and DetailsView in ASP.NET MVC - Part 1
For any beginner in ASP.NET MVC the first disappointment is possibly the lack of any server controls. ASP.NET MVC divides the entire processing logic into three distinct parts namely model, view and controller. In the process views (that represent UI under MVC architecture) need to sacrifice three important features of web forms viz. Postbacks, ViewState and rich event model. Though server controls are not a recommended choice under ASP.NET MVC there are situations where you may need to use server controls. In this two part article I am going to explain, as an example, how GridView and DetailsView can be used in ASP.NET MVC without breaking the MVC pattern.
-
Creating ASP.NET MVC "Web Site"
If you used ASP.NET MVC before, you are probably aware that Visual Studio provides ASP.NET MVC Web Application project template to create MVC based applications. There is no option to create MVC Web Sites. In this article I am going to explain how I solved this issue in one of my application.
-
Consuming ASMX and WCF Services using jQuery
In the previous part I demonstrated how jQuery animations can add some jazz to your web forms. Now let's see one of the most important feature of jQuery that you will probably use in all data driven websites - accessing server data. In the previous articles you used jQuery methods such as $.get() to make a GET request to the server. More powerful feature, however, is to make AJAX calls to ASP.NET Web Services, Page Methods and WCF services. The $.ajax() method of jQuery allows you to access these services. In fact $.get() method you used earlier internally makes use of $.ajax() method but restricts itself only to GET requests. The $.ajax() method provides more control on how the services are called.