Understanding The ASP.NET GridView Control

May 17, 2010 by  
Filed under Web Development

Displaying information on a web page which comes from a database is a fairly standard requirement on most websites and, in some development environments, it can take a fair amount of programming to achieve. In ASP.NET, however, it is remarkably easy, thanks to the use of built-in data-bound controls. There are two types of data-bound controls: those which are designed to display multiple records and those which will display one record only. The GridView control, the workhorse of databinding in ASP.NET, falls into the first category. It automatically generates an HTML table and fills it with information from a given data source with each record in the database rendered as a row in the table.

In Microsoft Visual Web Developer, you can create a Gridview by simply exploring the appropriate data source using the database explorer then dragging the appropriate table or view onto the page. This action creates both a DataSource object and a GridView object, both of which can be customised either in Design or Source view. If the listing you wish to display on the page is to be tabular, you may not need to change the default GridView. However, it is more usual that you will want to customize the way in which data is displayed.

The first step in customization is often to turn off the automatic display of all the fields in the database as columns in the HTML table. This is done by setting the GridView’s AutoGenerateColumns attribute to False. Secondly, we can display data in a number of different ways. By default information is displayed in a BoundField, meaning that the data is displayed as text. By default, the heading displayed at the top of each column is simply the name of each field in the database. However, you can modify this by changing the HeaderText property of each BoundField element. Another useful property is DataFormatString which allow you to use a format string to control the display of data.

The GridView also offers you the option of displaying data in a choice of other HTML formats: CheckboxField, RadioButtonField, HyperlinkField, ButtonField and ImageField. The final type of field is CommandField which enables you to display links enabling the user to edit, delete or select rows of data.

TemplateFields offer even greater flexibility, allowing you to place any HTML content you like in a given column and use databinding statements to embed information from the database as required. Template fields can even contain ASP.NET server controls.

For more information on ASP.NET training courses, visit Macresource Computer Training, an independent computer training company offering ASP.NET training courses in London and throughout the UK.

categories: asp.net,web development,microsoft,computers,software

Incoming search terms:

  • make money online with asp net

Enjoy Playing Free Flash Games Online

May 15, 2010 by  
Filed under Web Development

Every person in this world loves to play game titles. There are unique forms of games accessible and just about any person, whether young or old, is discovered to have a soft corner for many form of video games.

You can find various kinds of audiences that look for a selected form of game titles for them. You can find various niches in gaming and large numbers of launches take place every single month to target the millions of gamers.

These games can be played by anyone but still there’re meant for a particular targeted group. Let us look at various well-known video games:

Car Video game titles: If you are a man then the chance of you not informed of car racing video game titles is nil. Nicely, these have constantly been in demand irrespective of your age. In case you are a male then you ought to have played them.

The great element is the fact that if you will be alone or with associates, in both the occasions you may enjoy these games diligently.

Girl Video games: These games are without a doubt a bit distinct from other video games out there on the market. The majority of these games are related to dressing up game titles and makeover game titles. Anybody can play these games but again they’re tailor made for little girls.

Not every single on the internet game is suitable for little ones. There are actually certain kids video game titles that are perfect for the many young teenagers. But still, mother and father are encouraged to have a check on what web-sites the youngsters use and what kind of video games they play all the time. There are hundreds of games for kids that do not even require you to sign up.

Ben10 Video game titles: Ben10 game titles have been well-known ever since they give an idol to small children. The main figure of this game is really a kid and he is on his quest to rescue the planet from many evils. Small children really enjoy this figure and Ben10 toys are a hit. Unique series are very a lot in demand.

The most popular car games as well as girl games are given here.

categories: games,gaming,computers,internet,entertainment,fun,home,family,kids,arts,recreation,sports,leisure,web development