ASP.NET, essentially, does one thing: it responds to requests from web
browsers and sends back responses to them in the form of an HTML
stream.
All of the various Web controls and HTML controls are merely guides to
ASP.NET to describe how it should construct that HTML stream.
The web browser has not the slightest notion of how you have written
the markup and code-behind - all it knows how to do is to receive an
HTML stream and render it to the user.
The issue here comes from another thread. The OP is trying to use an
input type="button" control and make it act like an asp:Button. The
issue is he also wants to run javaScript along with the server routine.
I have solved it here:
http://tinyurl.com/ylq3gn8
I attempted to solve the HTML button, but it appears the solution there
is to pull the response collection, as ASP.NET (at least not 3.5 (which
likely means 2.0 or greater)) does not link up HTML buttons
automagically when runat = server is used. I think it has to to with the
hidden tag that confirms the element is correct before submitting back
to the routine.
if the OP comes back with a "using asp:Button is unacceptable", then I
can dig deeper into HTML controls. Otherwise, it is probably solved
already with the link.
Peace and Grace,
--
Gregory A. Beamer (MVP)
Twitter: @gbworld
Blog:
http://gregorybeamer.spaces.live.com
*******************************************
| Think outside the box! |
*******************************************