473,322 Members | 1,307 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,322 software developers and data experts.

submit button versus regular button

I want to understand the difference between submit button and regular
button: <input type="submit"> and <input type="button">. My understanding is
that submit button will send the entire HTML form to the web server, but
regular button won't.

I have a problem that needs to pass HTML elements data back and forth in
several ASP pages. I am using regular button to do that. But what's the
approaches??

Please advise. Thanks!
Jul 19 '05 #1
3 2890
You are correct -- the submit button posts the form data to the other page,
while the button control merely displays a clickable button. The purpose of
a button control is for developers to be able to invoke methods on the page
without actually leaving it.

If you want the page interact with others, the submit button is easy and
probably better way to go.

--
Manohar Kamath
Editor, .netWire
www.dotnetwire.com
"Matt" <ma*******@hotmail.com> wrote in message
news:uv**************@TK2MSFTNGP12.phx.gbl...
I want to understand the difference between submit button and regular
button: <input type="submit"> and <input type="button">. My understanding is that submit button will send the entire HTML form to the web server, but
regular button won't.

I have a problem that needs to pass HTML elements data back and forth in
several ASP pages. I am using regular button to do that. But what's the
approaches??

Please advise. Thanks!

Jul 19 '05 #2
<<
I have a problem that needs to pass HTML elements data back and forth in
several ASP pages. I am using regular button to do that. But what's the
approaches??


Generally speaking you can pass variables from page to page by:

1) Posting form fields from one page to the next (or to the same page)
and on the page to retrieve the value strLName = Request.Form("LName")

2) Using a querystring such as Response.Redirect
"login.asp?lname=smith&fname=tom" and on the page to retrieve the values
strLName = Request.QueryString("lname") and strFName =
Request.QueryString("fname")

3) Using session variables such as Session("LName") = "Smith" and on the
page to retrieve the value strLName = Session("LName")

Best regards,
J. Paul Schmidt, Freelance ASP Web Developer
http://www.Bullschmidt.com
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #3
"Manohar Kamath [MVP]" <mk*****@TAKETHISOUTkamath.com> wrote in message news:<OL**************@TK2MSFTNGP11.phx.gbl>...
You are correct -- the submit button posts the form data to the other page,
while the button control merely displays a clickable button. The purpose of
a button control is for developers to be able to invoke methods on the page
without actually leaving it.

If you want the page interact with others, the submit button is easy and
probably better way to go.

--
Manohar Kamath
Editor, .netWire
www.dotnetwire.com
"Matt" <ma*******@hotmail.com> wrote in message
news:uv**************@TK2MSFTNGP12.phx.gbl...
I want to understand the difference between submit button and regular
button: <input type="submit"> and <input type="button">. My understanding

is
that submit button will send the entire HTML form to the web server, but
regular button won't.

I have a problem that needs to pass HTML elements data back and forth in
several ASP pages. I am using regular button to do that. But what's the
approaches??

Please advise. Thanks!


Slightly off-topic since this is not a dotNet forum, but what happens
if you use a submit button instead of a button (button) with aspx?

In most of the code I've seen, the aspx pages use a button with an
onClick event to do the postback. However, by using the 'button', I
dont get the default enter-key = submit-the-form which is rather
annoying. I'd like to change the 'button' to a submit button. It seems
to work fine but am I missing something important?

Thanks
Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: lsarg | last post by:
i've been trying forever to figure out a way to use a regular text link in place of a submit button at the bottom of this. can't get it. i'm just starting to learn php, so i'm stuck. any help at...
2
by: Richard B. | last post by:
Hi, Currently designing/building my first class/template driven site. Inside a PHP form a list of article titles are displayed along with the first two lines of the article. When the user...
3
by: Matt | last post by:
In the following code, I have 2 questions regarding submit button with image. 1) Does this code <input type="image" name="populate" src="populate.gif"> behave the same as an HTML submit button...
2
by: Matt | last post by:
I tried to figure out how many approaches to submit form data. Here's my attempts. Please advise. Thanks!! 1) html submit button, most commonly used. <form name="formName" action="url"...
10
by: bnmm | last post by:
Hello, I'd like to style a submit button as regular text link. demo: www.byteshift.de/msg/div/input-as-link-by-css (XHTML strict) I applied "display:inline; margin:0; padding:0;" to both the...
4
by: houstoncity2004 | last post by:
Hi, I need help to JavaScript. I am new to this, and am trying to the page online ASAP. I have two submit buttons on one form, and each button will have to do different things. I named both...
16
by: John | last post by:
In an unnamed form, unnamed because it only submits an email address, I'm trying to have the submit button clear the "e-mail" text value in the textbox. On the submit button I have the...
4
by: d3vkit | last post by:
I have a form on my page, and some javascript which uses ajax to submit the form, and then opens the new page in a div using ajax so there is no refresh. This works fine. But the problem is this: all...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.