FORM TAG ERROR MESSAGE

M

Morys

Can somebody help? Thank you in advance.

This is the code:
<form action="gdform.asp" method="post">

#1
If I place the runat="server" in the form tag the action is replaced
by the name of the aspx form.

#2
If I don't place the runat="server" in the form tag, I get the
following error message:

[HttpException (0x80004005): Control 'txtFirstName' of type 'TextBox'
must be placed inside a form tag with runat=server.]

Any suggestions? Thank you again.
 
B

bruce barker

the asp.net form element does not support the action attribute because its a
postback model, and asp.net form control must be in a asp.net form.

while asp.net forms don't support an action, asp:buttons support a
postbackurl. which uses javascript to change the action before a submit.

-- bruce (sqlwork.com)
 

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

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top