Click here to Skip to main content
Click here to Skip to main content

ASP.NET Guestbook Application

By , 26 Jan 2002
 

Overview

This is a 1:1 port (regarding functionality) of my guestbook application written in VBScript for ASP, to a C# application written for ASP.NET.

Therefore, all the descriptions of the mentioned original guestbook article apply to this article as well. I will quote the most important facts here.

The guestbook has the following main-functionality:

  • Display entries with author-name, e-mail, date and text
  • Administration mode: delete entries
  • Navigation: jump to first page, last page, previous page, next page, discrete pages

The sample is ready-to-use. As-few-as-possible HTML-formatting (e.g., fonts) is done in order to keep it clear. You could modify the following things:

  • Change the language of the texts
  • Adjust the design to your needs
  • Extend the functionality

Details

All code was written in a single ASP.NET file. No CodeBehind was used in order to keep the number of files small. The web.config file should be optional but helps in debugging the application.

To install, create a virtual directory (and an IIS application, which normally is done automatically). Then, copy the files in this directory. That's all.

Of course, you need to have the .NET Framework (with ASP.NET and ADO.NET) installed.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Uwe Keim
Chief Technology Officer Zeta Producer Desktop CMS
Germany Germany
Uwe does programming since 1989 with experiences in Assembler, C++, MFC and lots of web- and database stuff and now uses ASP.NET and C# extensively, too. He has also teached programming to students at the local university.
 
In his free time, he does climbing, running and mountain biking. Recently he became a father of a cute boy.
 
Some cool, free software from us:
 
Free Test Management Software - Intuitive, competitive, Test Plans. Download now!  
Homepage erstellen - Intuitive, very easy to use. Download now!  
Send large Files online for free by Email
Some random fun stuff in German

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
QuestionNewbie question herememberArlanT6-Jun-07 16:55 
i am getting this error on my page
"Error occured. : Error inserting entry. : Operation must use an updateable query."
 
does anyone know what is this error and how to fix it?Confused | :confused:
 
Arlan
GeneralAdministration modememberrymdspiff12-Aug-06 17:21 
Hmmm... i feel stupid... once I got it installed... how du I get into "administartion mode"?
GeneralRe: Administration modesitebuilderUwe Keim12-Aug-06 20:49 
There is an URL parameter to do so.
 
Please take a look in the source code, it should be easily discoverable.
 
--
Try our Windows-based CMS: www.zeta-producer.com
See me working: www.magerquark.com

GeneralRe: Administration modememberrymdspiff13-Aug-06 1:45 
Can I change the script som that theres a password easily?
Generalanother serious commentmemberthemosk2-Jun-06 9:09 
The code itself is confusing even to look at, but it gets the work done Smile | :)
 
thnx!
GeneralEmbed your code in a master pagememberd00_ape27-Dec-05 10:33 
I've just fall in love with ASP.NET 2.0 and masterpages.
I've manage to run the sample but when I put the your code into a content of a masterpage the page looks good but I can't do any inserts ito the DB...
Any idea of whats wrong?
 
_____________________________
 
...and justice for all
 
APe
GeneralRe: Embed your code in a master pagesitebuilderUwe Keim27-Dec-05 18:31 
Well, I doubt that this is related to Master Pages. What about running under the Visual Studio 2005 debugger?
 
Breakpoints and stepping until the DB-insert statements would ultimatively tell you whether the correct information is about to be inserted or whether the DB-insert statements are reached at all.
 
--
Affordable Windows-based CMS for only 99 €: try www.zeta-producer.com for free!
 
GeneralAuthentication modemembercoolooc17-Sep-04 6:10 
Hi
I try to run the guestbook in my computer but i get an error in the line of authentication mode="None":
It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
I user access database.
someone can tell me why is that error?
Thank you very much for you assistance.

GeneralMeat PizzamemberCameron Pulcifer21-May-04 8:52 
I like all kinds of meat on my pizza. This is a test of the guestbook. You can delete if you like.
 
Over and out!
GeneralRe: Meat Pizzamembertheluk12-Feb-09 0:21 
Big Grin | :-D Big Grin | :-D Big Grin | :-D this is not the guestbook!!!
GeneralI guess I'll post the first real commenteditorMarc Clifton8-Mar-04 16:19 
NICE!
 
I copied the DB and ASPX file over to my server, set the link, and *poof*, instant guestbook.
 
And it uses a DB, and it looks better than the other stuff I've seen out there.
 
You got my 5!
 
(oh, and here's the site (shameless plug): www.myxaml.com[^]
 
Marc
 
Microsoft MVP, Visual C#
GeneralRe: I guess I'll post the first real commentsitebuilderUwe Keim8-Mar-04 23:13 
Marc, you are my hero Big Grin | :-D
 
Thanks for your comment and double thanks that it actually has content Smile | :)
 
--
- Free Windows-based CMS: www.zeta-software.de/enu/producer/freeware/download.html
- See me: www.magerquark.de
- MSN Messenger: uwe_keim@hotmail.com
 

GeneralRe: I guess I'll post the first real commentmemberxxxyyyzzz16-Mar-04 21:02 
Yeah! A live demo is nice!
GeneralFunnymemberAnthony_Yio30-Nov-03 14:46 
Look at all those threads below.
 
Laugh | :laugh: Laugh | :laugh: Laugh | :laugh: Laugh | :laugh: Laugh | :laugh: Laugh | :laugh: Laugh | :laugh: Laugh | :laugh: Laugh | :laugh: Laugh | :laugh: Laugh | :laugh:
 
I can't help it.
 
Sonork 100.41263:Anthony_Yio
GeneralRe: FunnysitebuilderUwe Keim30-Nov-03 20:22 
So you've just proven to be as stupid as the other "posters". Sad Cry | :((
 
--
- Free Windows-based CMS: www.zeta-software.de/enu/producer/freeware/download.html
- See me: www.magerquark.de
 

Generaluyuyysussuyuuyuyuyuttt15-Sep-03 5:02 
Hhahahhahaa
GeneraltestsussAnonymous25-Aug-03 1:23 
test
GeneralaaasussAnonymous9-Jul-03 22:35 
aaaa
GeneraltestsussAnonymous8-Jul-03 21:53 
testSmile | :)
GeneralRe: testsussAnonymous8-Jul-03 21:54 
testBlush | :O
GeneralRe: testsussAnonymous9-Jul-03 21:40 
testtttt
GeneralRe: testsussAnonymous9-Jul-03 21:39 
aaaaa
QuestionFlugzeugträger???sussAnonymous27-Jun-03 12:12 
Sleepy | :zzz: Roll eyes | :rolleyes: Laugh | :laugh: Unsure | :~ Confused | :confused: Dead | X| Cool | :cool: Eek! | :eek: Rose | [Rose]
GeneralcoolmemberRitchy17-Dec-02 10:36 
this is a testWTF | :WTF:
 
tgytreureytu
GeneralHello!!sussjack-uno-28-Oct-02 17:26 
Wink | ;) Que chulo esta este guestbook. Esta bien chulo!!! Eek! | :eek:
GeneralTestmemberAnonymous24-May-02 15:01 
Looks good!
GeneralTesting Your GuestbookmemberLaTrelle27-Feb-02 8:23 
This would make a great message board
GeneralRe: Testing Your GuestbookmemberAnonymous27-Feb-02 14:58 
Yes My dear.
I made it.
Eek! | :eek: Suspicious | :suss: Smile | :)
 
Taghi.
GeneralRe: Testing Your Guestbookmemberneed4agoodfreind8-Jan-03 1:17 
f*** u
GeneralRe: Testing Your GuestbooksussCkodl8-Jan-03 1:17 
f*** u
GeneralRe: Testing Your GuestbooksussAnonymous22-Jun-05 18:13 
Anonymous wrote:
ForumASP.NET Guestbook Application
Subject:Re: Testing Your Guestbook
Sender:Anonymous
Date:20:58 27 Feb '02
 
Yes My dear.
I made it.

 

GeneralRe: Testing Your GuestbooksussAnonymous29-Jan-03 1:15 
Hahaha
GeneralRe: Testing Your GuestbookmemberMCApreeti24-Aug-05 8:57 
i want to see the design of this application and want to run it
 

 
bhupinder

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web02 | 2.6.130617.1 | Last Updated 27 Jan 2002
Article Copyright 2002 by Uwe Keim
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid