why is there three(four) old html button

T

Tony Johansson

Hello!

If I drag a asp:button into the form this will be translated into a <input
type=button> when send to the client.

So therefore I can't understand why there are so to speak three different
kind of old HTML button.
<input type=button>
<input type=submit> is the same as <asp:button>
<input type=reset>

There is also this button that doesn't exist in the tollbox
<button>
</button>
So for example which asp control is this <input type=button>
and this <input type=reset> ?

//Tony
 
A

Arne Vajhøj

If I drag a asp:button into the form this will be translated into a<input
type=button> when send to the client.

So therefore I can't understand why there are so to speak three different
kind of old HTML button.
<input type=button>
<input type=submit> is the same as<asp:button>
<input type=reset>

There is also this button that doesn't exist in the tollbox
<button>
</button>
So for example which asp control is this<input type=button>
and this<input type=reset> ?

See my previous reply regarding input type="text" versus
asp:TextBox - input type="submit" and asp:Button is the
same - it is a difference between literal HTML, html controls
and web controls.

Arne
 
J

Jeff Johnson

So therefore I can't understand why there are so to speak three different
kind of old HTML button.
<input type=button>

This is a generic button. Basically to make it do anything you have to have
code executed in onClick.
<input type=submit> is the same as <asp:button>

This button always performs the activity in the ACTION attribute of the
<input type=reset>

This button always clears all fields on the form.

Basically, #2 and #3 are really ancient types and aren't really useful in
today's Web, but they are still part of the HTML specification.
 
A

Arne Vajhøj

This is a generic button. Basically to make it do anything you have to have
code executed in onClick.


This button always performs the activity in the ACTION attribute of the


This button always clears all fields on the form.

Basically, #2 and #3 are really ancient types and aren't really useful in
today's Web, but they are still part of the HTML specification.

#1 is used for AJAX.

But #2 and #3 are still used when a real page change is desired.

I can see one occurrence on www.microsoft.com and on eon www.google.com!

But did your comment make me feel old (when I was last full uptodate
on HTML it was version 2.0).

:)

But even I would put the attribute values in quotes!

Arne
 
J

Jeff Johnson

Arne Vajhøj said:
#1 is used for AJAX.

But #2 and #3 are still used when a real page change is desired.

I can see one occurrence on www.microsoft.com and on eon www.google.com!

But did your comment make me feel old (when I was last full uptodate
on HTML it was version 2.0).

:)

But even I would put the attribute values in quotes!

I shouldn't have said that type=submit is ancient. It's still used all the
time, in fact. It's really type=reset I was thinking of. Who honestly uses
THAT these days? However, in terms of ASP.NET (which is where my mind was
at, I guess), type=submit is relegated to a dusty corner. ASP.NET uses
Javascript to post back from regular type=button controls. I would assume
that a similar thing happens in other frameworks, but I have no experience
to go on, so it's just speculation.
 
A

Arne Vajhøj

I shouldn't have said that type=submit is ancient. It's still used all the
time, in fact. It's really type=reset I was thinking of. Who honestly uses
THAT these days?

Not even me.
However, in terms of ASP.NET (which is where my mind was
at, I guess), type=submit is relegated to a dusty corner. ASP.NET uses
Javascript to post back from regular type=button controls. I would assume
that a similar thing happens in other frameworks, but I have no experience
to go on, so it's just speculation.

I can write ASP.NET pages that end up outputting type="submit".

A simple asp:Button without anything fancy does that.

Maybe everybody except me uses ASP.NET AJAX etc..

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top