By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,154 Members | 1,050 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,154 IT Pros & Developers. It's quick & easy.

Display success notification after form post

P: n/a
First off, forgive me for being such a noob. I typically program
vb.net, but I need to do some asp.net programming.

I have something simple I have no idea how to do!

I have an aspx page which is essentially a form containing a few text
boxes and a submit button.

The user types in the various fields, and hits the submit button.
This button fires off an email via smtp containing information from
those text boxes.

My question is.. can I verify the email was sent? I guess if there's
no error it was sent.

My next part of this is how to display to the user a message denoting
success.

As it stands, the form submits, and it just returns to the same form
with all of the information still there. I plan on clearing all of
the fields, but what I'd rather do is present a message, akin to a
messagebox popup, alerting the user that request was submitted.

This should be so easy yet I'm stumped. Should I be calling a
seperate asp page with nothing but "request submitted" as the text?
That seems like a waste. Hell even that I do not know how to do!

What are my options? Someone suggested using a panel, and hide/show,
etc. I tried putting my labels/textboxes into a panel and it did
nothing but mess the format up. The spacing was all messed up. Not
much drag and drop functionality with the panel. It seems more html
based when it comes to positioning.

I don't know what else to do.

Again sorry for the sheer ignorance on the subject. I just need some
guidance. (I'm not lookin to read a 1000 page book on asp.net just to
get this functionality). Thanks.

Matthew
Nov 18 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
You can execute a line of code like this when you want a message box to be
displayed.
(This writes out the necessary client side javascript to your HTML page to
make the alert pop up as soon as the page is sent to their browser.)

RegisterStartupScript("startupScript", "<script
language=JavaScript>alert('This is my message.');</script>");

Here's more info:
http://msdn.microsoft.com/library/de...criptTopic.asp

Here are a couple controls you might find to be useful:
http://www.metabuilders.com/Tools/ConfirmedButtons.aspx
http://www.jttz.com/msgbox/index.htm

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net

"MCDONAMW" <mm****@tampabay.rr.com> wrote in message
news:dc**************************@posting.google.c om...
First off, forgive me for being such a noob. I typically program
vb.net, but I need to do some asp.net programming.

I have something simple I have no idea how to do!

I have an aspx page which is essentially a form containing a few text
boxes and a submit button.

The user types in the various fields, and hits the submit button.
This button fires off an email via smtp containing information from
those text boxes.

My question is.. can I verify the email was sent? I guess if there's
no error it was sent.

My next part of this is how to display to the user a message denoting
success.

As it stands, the form submits, and it just returns to the same form
with all of the information still there. I plan on clearing all of
the fields, but what I'd rather do is present a message, akin to a
messagebox popup, alerting the user that request was submitted.

This should be so easy yet I'm stumped. Should I be calling a
seperate asp page with nothing but "request submitted" as the text?
That seems like a waste. Hell even that I do not know how to do!

What are my options? Someone suggested using a panel, and hide/show,
etc. I tried putting my labels/textboxes into a panel and it did
nothing but mess the format up. The spacing was all messed up. Not
much drag and drop functionality with the panel. It seems more html
based when it comes to positioning.

I don't know what else to do.

Again sorry for the sheer ignorance on the subject. I just need some
guidance. (I'm not lookin to read a 1000 page book on asp.net just to
get this functionality). Thanks.

Matthew

Nov 18 '05 #2

P: n/a
Talk about a quick response!!!

Where do I paste that? Obviously to me that looks like the signature of
a function called RegisterStartupScript, but that function doesn't
exist.

Maybe I'm missing something or maybe I'm more of noob than I thought
with programming in general.

Remove underscores and nospam to email me directly.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #3

P: n/a
RegisterStartupScript is a method of the Page object.

You can put the code in your Page_Load event, or in pretty much any other
server side code.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"MCDONAMW" <mm*****************@tampabay.rr.com> wrote in message
news:ul****************@TK2MSFTNGP10.phx.gbl...
Talk about a quick response!!!

Where do I paste that? Obviously to me that looks like the signature of
a function called RegisterStartupScript, but that function doesn't
exist.

Maybe I'm missing something or maybe I'm more of noob than I thought
with programming in general.

Remove underscores and nospam to email me directly.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #4

P: n/a
Thanks for your quick help Steve. I'll give er a try and hopefully I
don't have to ask for anymore help!

Thanks again,
Matthew

**Remove underscores and nospam to email me directly.**

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.