FORM TAG ERROR MESSAGE

  • Thread starter Thread starter Morys
  • Start date Start date
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.
 
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)
 
Back
Top