|
Guestbook in C# for Vs.Net by Gordon F. Weis
This application was adopted from original VB Guestbook DotNet application
- I converted it to C# and added a few features that work better for me. This was
also my first venture at C# and it has been a learning experience.
This was also the first project that I converted when .Net Beta2 was released - another
learning experience.
Since Guestbook in C# was originally released,
it has gone through several (see below) changes. The current version is
based on Vs.Net Beta2 and is implemented as a User
Control. This version also seperates the 'Post Message' and 'View
Messages' into 2 panels that can be toggled by clicking one of two radio
buttons.
There is no Copyright
so please feel free to use or modify the code as you see fit and adopt it to
your needs. However, please attach this readme file if you redistribute and keep us informed if
you make any improvements or find any bugs.
06/29/2001
- Implemented as Vs.Net
'CodeBehind' User Control
- Removed the css file to
make it more independant - all fonts, etc are hard-coded.
- The connection string, Page
Title and Guestbook number are passed as variables.
- To port to another
application, move it to your project and change the Namespace appropriately.
- To use as a stand alone
application, merely add your content to the Default.aspx page.
- The
database used is Sql2000, but it could easily be converted to Access or
another version of Sql.
- The program assumes that you have SMTP
installed for email.
- Eliminated the
Id
- Which Guestbook is now
functional, sample at
http://yyyz.net =
0->displays all active
messages http://yyyz.net/bge = 2->messages from my BBQ web site http://72t.net =
3->messages from 72(t) Distribution site
Main files...
- Readme.htm - this file.
- Default.aspx - a page used to
implement the User Control.
- Guestbook.ascx - the HTML code
- Guestbook.ascx.cs- the C# code
- Guestbook.sql - Use SQL Query
Manager to generate the SQL Table
Before using, you have
to...
- Create the database
table
- Look in the Default.aspx file
and set the 'connString' variable to your database.
- The name of the Guestbook is also set in the
Default.aspx file
- In the
email notification (Guestbook.ascx.cs ) change my email
addesss to yours - please!
|
|