Library tutorials & articles

Web Forms - Working with ASP.NET server controls

Introduction

This is a sample chapter from Teach Yourself Microsoft Visual Basic .NET 2003

Today, we're going to dig into another set of Web server controls in our coverage of all the Web server controls in Visual Basic .NET. Here, we're going to be working with image controls, image buttons, list boxes, hyperlinks, and link buttons—all fundamental parts of Web programming in Visual Basic .NET. Here's an overview of today's topics:

  • Creating image controls
  • Creating image buttons
  • Using image buttons as image maps
  • Creating single-selection list boxes
  • Creating multiple-selection list boxes
  • Adding items to list boxes at runtime
  • Creating drop-down lists
  • Creating hyperlinks
  • Creating link buttons
  • Executing code when a link button is clicked

Some of these controls, such as image controls and list controls, have counterparts in Windows programming—some, such as image buttons and link buttons, don't. As you'd expect, even those controls that handle tasks similar to their Windows counterparts are nonetheless different in Web programming code. Because all these Visual Basic .NET controls have to run in browsers, they're all based on HTML controls even though Visual Basic .NET handles them back on the server. This means that they're not as complex or feature rich as standard Visual Basic Windows controls.

We'll get started immediately with image controls.

Comments

  1. 19 Aug 2009 at 04:56

    Hi there, How do you make it looks like this Item1,Item2,Item3 I would like to add a "," comma but not after the last one also without "You selected" and newline I put "," after TextBox1.Text &= ListBox1.Items(intLoopIndex).Text and it give comma after the last item

    Thanks, Oded Dror

  2. 11 Jul 2006 at 16:59

    Would you happen to have the sample code in C#? If so could you post it please.  Thank you

  3. 09 Jun 2004 at 11:52

    Is there a way to position the image on the right side of the page?  I tried the following piece of code...
    Image1.Style("Right") = "0px"
    but, it didn't position the image on the right of the page.  I'd greatly appreciate any suggestions.  Thanks!

  4. 01 Jan 1999 at 00:00

    This thread is for discussions of Web Forms - Working with ASP.NET server controls.

Leave a comment

Sign in or Join us (it's free).

Pearson Education

Related podcasts

Events coming up

  • Mar 15

    DevWeek 2010

    London, United Kingdom

    DevWeek is Europe’s leading independent conference for software developers, database professionals and IT architects, and features expert speakers on a wide range of topics, including .NET 4.0, Silverlight 3, WCF 4, Visual Studio 2010, REST, Windows Workflow 4, Thread Synchronization, ASP.NET 4.0, SQL Server 2008 R2, LINQ, Unit Testing, CLR & C# 4.0, .NET Patterns, WPF 4, F#, Windows Azure, ADO.NET, Entity Framework, Debugging, T-SQL Tips & Tricks, and more.

We'd love to hear what you think! Submit ideas or give us feedback