How to:

Listed below are the code samples of various programs you might want to add to your web site. The majority of these samples are written for ASP.NET web pages using VB.NET. If you want to see the code in C#, I suggest copy/pasting the code into this FREE on-line programming language converter.


Display Random Image

Place this code in a user control, then use it throughout your entire website. VIEW CODE

Get URL information

Get the current URL: VIEW CODE

Pass Data Between Pages using QueryStrings

Send data to Next Page pass a querystring  VIEW CODE

Retreive a querystring from the previous page  VIEW CODE  

Get Date and Time

Display the date and time on your web page. VIEW CODE

Send Email

Create a Contact Us form that emails the infomation. VIEW CODE

Create a "ShareThisPage" form for users to recommend your web page to a friend. VIEW CODE
--This is a 2 page process. Create the form. Then add a link on any webpage that links to this form.
The form will grab the URL of the page that linked to the form by grabbing the sent querystring.

Create a "EmailthisURL" form  for users to recommend your web page.VIEW CODE
--This form is at the bottom of a page.




From other tutorial websites:

PayPal with ASP.NET

Add an include file into your html page.

You may have a string of text that you want included on several pages of your web site but don't want to type it on each page. When you are not using ASP.NET masterpages then you can use special code that will display the tet of an external text file into a web page.  Example of a web page with an include file.


How to maintain scroll position:

Add the following code to your @Page Directive line:
MaintainScrollPositionOnPostback="true"