F9 Group Marketing and Technology Blog

Marketing, Technology, and current news at http://www.f9group.com/

Entries Tagged ‘parameters’

Using ASP.NET 3.5’s ListView and DataPager Controls: Inserting Data

The ListView control is similar to the GridView control in many ways: both display a set of records, both support built-in sorting, paging, editing, and deleting functionality with minimal effort. The ListView differs from the GridView in two key ways: Rather than using fields, the ListView is rendered via templates, which offers the page developer much finer control over the emitted markup, and The ListView supports built-in inserting support The first installment in this series explored the ListView’s template-based rendering. This installment looks at how to use the ListView’s inserting functionality. In a nutshell, inserting data from the ListView requires two steps: defining the inserting interface via the InsertItemTemplate and specifying where the inserting interface should go via the InsertItemPosition property. Much like with editing data from within the ListView , the InsertItemTemplate can contain two-way databinding statements when using a data source control to get the inputs entered by the user from the ListView’s inserting interface into the parameters of the data source control. And like with the editing and deleting workflows, you can programmatically examine and modify the user’s submitted data before inserting the data, cancelling the operation altogether if needed. This article walks through the steps for creating a ListView that allows users to insert records.

Share and Enjoy:
  • Digg
  • Google
  • del.icio.us
  • Technorati
  • Facebook
  • MySpace
  • TwitThis
  • Blogsvine
  • description
  • E-mail this story to a friend!
  • Ping.fm
  • Print this article!
  • Slashdot
  • Yahoo! Buzz

A Google Chart API Custom Server Control

Last week’s article, Creating Charts with the Google Chart API , looked at how to use Google’s free Chart API to generate line, pie, bar, and other types of charts from an ASP.NET page. The Google Chart API is callable via a URL that contains the chart type, size, data, and other parameters in the querystring and returns the chart as an image. Displaying a chart using this API is as simple as adding an Image Web control to a page and setting its ImageUrl property to the Google Chart API URL with an appropriately formatted querystring.

Share and Enjoy:
  • Digg
  • Google
  • del.icio.us
  • Technorati
  • Facebook
  • MySpace
  • TwitThis
  • Blogsvine
  • description
  • E-mail this story to a friend!
  • Ping.fm
  • Print this article!
  • Slashdot
  • Yahoo! Buzz

Programmatically Retrieving a Stored Procedure’s Parameters

Stored procedures in SQL Server are similar to methods in C# and Visual Basic code. They encapsulate one or more statements into a single, parameterized construct. Both stored procedures and methods are a form of code reuse and their use help developers adhere to the DRY principle ( D on’t R epeat Y ourself). But the similarities don’t end there. The .NET Framework has a feature called Reflection that enables developers to programmatically retrieve a list of methods for a given class, along with their input parameters and return types. It’s also possible to programmatically determine what stored procedures exist in a database, along with each stored procedure’s input and output parameters.

Share and Enjoy:
  • Digg
  • Google
  • del.icio.us
  • Technorati
  • Facebook
  • MySpace
  • TwitThis
  • Blogsvine
  • description
  • E-mail this story to a friend!
  • Ping.fm
  • Print this article!
  • Slashdot
  • Yahoo! Buzz