Use LINQ to Query ASP.Net Control Data
Overview
The purpose of this article is to demonstrate the use of LINQ for the purpose of searching and manipulating elements from repeating controls such as an ASP.Net CheckboxList. This exercise will consist of a simple WebForm that allows the user to select a series of checkbox list items by searching within the list for all items containing a user defined string value. If you haven't done so already, please load Visual Studio and create a new web site or web application project.
JSON Parameter String Builder
Overview
In continuing my love affair with code generation or using code to create code, we will be creating a small jQuery based utility for creating JSON parameter strings that can be used as parameter strings to page/web methods when making Ajax calls with jQuery. While creating these strings is mostly a trivial task, the formatting that is required between parameter names and values could be error prone when build manually due to the mixing of double quotes, single quotes and the concantenation of parameter names and values. The utility we will be creating will accept two comma delimited strings, one containing parameter names and the other their matching values, combine them and output these together in JSON data parameter format.
Web Service Calls With jQuery Ajax
Overview
In this article we will explore web service calls with jQuery Ajax from ASP.Net webforms. We will be doing this without the use of an ASP.Net UpdatePanel by performing all Ajax calls directly with jQuery. In my opinion, Ajax calls are far more efficient when making the Ajax call directly because we bypass the overhead of update panels, refreshing the HTML we want to refresh directly, rather than refreshing all the content of the UpdatePanel ContentTemplate HTML on every partial postback. While there is JavaScript code to be written to accomplish this, the impact is minimal and with some usage and experience, the task becomes trivial over time.
Code Generation Part II – Creating a Code Generator With C#, XML and XSLT
Overview
This article is the second in a series of Code Generation articles that will demonstrate the basic concepts of using code in combination with freely available tools to generate code and eliminate hours of tedious and repetitive work. This article builds on the previous article in both knowledge and code and is recommended reading prior to moving forward. In this article we will examine key concepts in generating code from XML metadata with XML related objects from the System.Xml.Xsl assembly of the Microsoft .Net Framework. This article will deal with the following and build upon:
- Specifying new elements in the App.config file, wrapping the keys in the LibraryConstants class, and new properties to the CoreBase class that will expose values set in the App.config file
- Add support enumerations and classes to the CodeGenerator.Core assembly
- Creating the CodeBuilder class that will derive from MetadataGenerator in order to create a single point of execution for code generation purposes
- Create basic templates for the generation of stored procedures based on our database schema
- Modifying the CodeGenerator application to make use of the finished CodeGenerator.Core assembly