Forums

This topic is locked

User friendly error messages

Posted 15 May 2002 12:32:17
1
has voted
15 May 2002 12:32:17 Saeed Abdi posted:
Hope you guys can help me, but first I need to warn you, I'm very new to this so go easy on me please <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

I designed my 1st asp site with dreamweaver , so now I got everything working (i.e. authentication, adding, updating and so on) I need to make things look good and my biggest problem is how to capture error messages and then pass them to a page with friendly error messages, for example if someone was adding to the db and they enter wrong details I want them to come back to the same page but I want an error message at the bottom telling them that they need to correct this field and that field, I'm doing this now with form validation so the form doesn't go through without all the correct details but I want to take the next step and make use of this ASP thing that I'm learning.

Thanks in advance

Replies

Replied 16 May 2002 18:41:31
16 May 2002 18:41:31 Matthijs Horsman replied:
Been thinking about this one to, a lot better then the annoying ALERT thing!

I think you have to set up a page that checks if the fields are filled in correctly and if not send them back to the page.

I think you can store some variables in the querystring your sending them back with.

For example if someone doesn;t fill out his name in the name field page 2 checks if something is filled in &lt;% if request.form("name" &lt;&gt;"" then response.redirect ="form.asp?name=wrong" %&gt; (didn;t test the code <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle> if everything is filled out correctly i think you have to apple a command to add everything to the database using some hidden fields.

So i think it's a little work but will look sweet!!

Didn't try it myself and maybe it doesn't work, but ot just an idea...

Good luck

Let me know if it works out



Matthijs
----------------
UD4/WY2K/IIS/ASP-VB
www.chaps.nl

Reply to this topic