Using the Randomize Statement ASP.NET Style(Method #1)

Contributed by
Rating:  stars stars stars stars stars / 0
July 20, 2001
Rate this Article:
MEH MEH++


SEARCH ASP FREE
TOOLS YOU CAN USE

advertisement

Thanks to Mark McEahern and Charles Carroll allowing this tip to be re-published. This was obtained on the http://asplists.com/asplists/aspngcommunity.asp List.

This code-tip demonstrates show how-to use the new Random Class that is provided in the .NET framework. This is a very efficient way of displaying different content every-time. This example shows how to display a different set of numbers each time the page is loaded.

Here is the code.

<html>
<head>
</head>
<body>
<h2 align="center">Randomize Example .NET Style Demo (Method #3)!</h2>
<form method="post">
<%
Dim r As New Random()
Dim i As Integer
For i = 1 To 10
Response.Write("<P>" & r.Next(1, 10))
Next
%>
<br>
<input type="Submit" value="Push to Refresh Page" name="b1">
</form>
</body>
</html>
blog comments powered by Disqus
ASP CODE ARTICLES

- ASP Forms
- ASP: The Beginning
- Getting Remote Files With ASP Continued
- Inbox and Outbox Manipulation in ASP
- Relational DropDownList Using VB.NET
- Ad Tracking URL Hits
- Use ViewState to display one record per page...
- Send Email using ASP.NET formatted in HTML
- ASP File Explorer
- ASP/XML Interview questions by Srivatsan Sri...
- Pressing RETURN won't submit the form
- This shows how you get the TEXT of a combo r...
- Group Data by Adrian Forbes
- Multiple checkbox select sample
- Multiple checkbox select with all values sam...

ASP Web Hosting ASP.Net Web Hosting Windows Web Hosting
 
 
 

ASP Free Forums 
 RSS  Tutorials RSS
 RSS  Forums RSS
 RSS  All Feeds
Site Map 
Request Media Kit
Write For Us Get Paid 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Privacy Policy 
Support 


© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 6 - Follow our Sitemap
Most Popular Topics
All ASP.Net Tutorials