Multiple forms on a page???

R

Robert

Here's my delimma: I am required to have a login area on each screen
of my web site if the user is not logged in. It has userid and
password fields and an image button that acts as a submit button. I
created this login function as a user-control so it could be placed on
various pages. The problem arises when the user goes to a page that
already has a form on it, like the "Feedback" page. The page craps
out complaining that I can have only one <form> tag per page. So, I
removed the <form> tag from my user control thinking the other <form>
tag on the page will take its place. But when the user ends up on a
page that doesn't have a form, then the page craps out saying
something like "blah blah blah...must be placed inside a form tag with
runat=server."

Is there a way around this? Has anybody done something similar, and
if so, what was your approach?

Thanks in advance...
Robert
 
R

Robert Koritnik

Exactly that "blah blah blah" part is important. Anyway. If you add web
forms using VS than each page has its own form tag WITH runat=server inside.
User controls on the contrary don't have the form tag. MUST NOT have a form
tag. There is only one form tag permitted per page. And it MUST be
runat=server. And it must be within the ASPX file...
 

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
474,141
Messages
2,570,817
Members
47,362
Latest member
ChandaWagn

Latest Threads

Top