This tutorial will show how we can use AJAX to dynamically generate a list of random names without calling postback. VB version.

This tutorial was created with Microsoft’s ASP.NET AJAX Extensions, which can be downloaded at this link

This tutorial makes use of the UpdatePanel control in Visual Studio’s AJAX toolbox. It will show you how we can generate random names from a string array at the click of a button, without postback.

We used over 10 web hosting companies before we found Server Intellect. Their dedicated servers and add-ons were setup swiftly, in less than 24 hours. We were able to confirm our order over the phone. They respond to our inquiries within an hour. Server Intellect’s customer support and assistance are the best we’ve ever experienced.

The first thing we need to do is start an ASP.NET AJAX-Enabled Web Site within Visual Studio .NET

Then we can add our UpdatePanel, button and label to the ASPX page:

We add the following assembly reference, because we are goingto use a string array to store names:

Server Intellect assists companies of all sizes with their hosting needs by offering fully configured server solutions coupled with proactive server management services. Server Intellect specializes in providing complete internet-ready server solutions backed by their expert 24/365 proactive support team.

Then we create the string array:

Then we create the method that will choose a list of names at random:

The code-behind will look something like this:

Download Source Files