D
daveh551
I'm a little confused about something.
I have a "Contact Us" page that I'm developing that runs within a
content page under a master page.
I was plagiarizing fairly liberally from some other pages that I had
seen that worked, so I ended up with a <form> element containing a
number of text boxes, and a submit button.
In the codebehind for the button click event, where I went to
construct the mail message from the text in the textboxes, I found
that all of the text boxes were coming back as empty strings, even
though they were being displayed with text in them. I tried several
things to get it work right, and the thing that finally worked (or at
least the first thing that I tried that worked) was removing the
<form> element.
After doing some reading, I found that forms cannot be contained
within forms, and since the MasterPage places the ContentPlaceHolders
inside a <form> element, I needed to remove it. Is that a correct
understanding, and if so, how do you ever have a form on a content
page? Or do you even need it?
I have a "Contact Us" page that I'm developing that runs within a
content page under a master page.
I was plagiarizing fairly liberally from some other pages that I had
seen that worked, so I ended up with a <form> element containing a
number of text boxes, and a submit button.
In the codebehind for the button click event, where I went to
construct the mail message from the text in the textboxes, I found
that all of the text boxes were coming back as empty strings, even
though they were being displayed with text in them. I tried several
things to get it work right, and the thing that finally worked (or at
least the first thing that I tried that worked) was removing the
<form> element.
After doing some reading, I found that forms cannot be contained
within forms, and since the MasterPage places the ContentPlaceHolders
inside a <form> element, I needed to remove it. Is that a correct
understanding, and if so, how do you ever have a form on a content
page? Or do you even need it?