473,385 Members | 1,919 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Display success notification after form post

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
4 5388
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jeremy Phillips | last post by:
I am trying to build a web form that uses the "POST" method (too much data for GET) to send data to a second form, then displays the response of that form post. The second web form requires...
3
by: Ken | last post by:
I have a database called autographs.mdb that is in the "XYZ" folder in the "database" folder. I have a form in the database that I want to display a photo of the celeb on. The photos are in a...
3
by: Robert W. | last post by:
I have a separate thread that handles data transfer operations (with a mobile device). I've set things up so that a small notification form is displayed in the lower right corner of the window. ...
2
by: | last post by:
Hi everyone, I'm using VS.NET, Framework 1.1, Windows 2000 Server, IIS 5, all the latest patches are installed. Im having this wierd random problem, that I cannot reproduce but it happens...
4
by: Al Cadalzo | last post by:
I'm trying to simulate a form post (i.e. Method="POST"). The FORM POST I'm trying to simulate is similar to this: <FORM NAME=SearchForm METHOD=POST ACTION=Search> <SELECT name="criteriaA" >...
1
by: John Braham | last post by:
I have a slight wall headbutter which I'm hoping someone will have an idea for (I'd be very grateful!). Basically I'm trying to make a form post to an asp page programatically from within VB.NET...
10
by: eggie5 | last post by:
Is it possible to get a file without using a form post? I want to get the data (bytes) of a file, text or binary, and just save it to a variable. Similar to the post body of a form that has a...
0
by: shlim | last post by:
Currently I'm using VB.Net to perform a http/https multipart form post to a servlet. I'm able to perform the post using HttpWebrequest via GetRequestStream(). However, the servlet returned me with...
0
by: vsrprasad16 | last post by:
Hi All, I am implementing a notification form similar to outlook email notification. my application call this notification form from a dll. this dll includes a form class and this dll has some...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.