I am using an existing .aspx form that will submit a few fields and a comment box. It actually works! Now, I open that form in Dreamweaver and copy...let's say...the NAME field and all its guts in the td section for it, and reinstance it to NAME2 in a few places.

When I upload and check it out, sure enough the field is there.
But when the form is submitted, there is no mention of the new field NAME2 or of course the data that was placed in it.

Why?

How can the text box show up in the generated HTML but when filled with data, the date doesn't get sent in the email?

I hope the answer lies in the aspx file that we're talking about and not that...oh, you have to go into XXXXXX.aspx and tell that file to expect NAME2 or something crazy like that.

If anyone is interested here's the url
http://www.airedale911.org/a.aspx
and I can email them the aspx code also.

Thanks

Not sure. So do you have any idea why the field won't send data?
Thx

no, i only used aspx page with dreamweaver once in my life and it sucked. download visual web express 2008 for free from microsoft, then we can discuss..

Not sure I understand what you said. Here is the exact code for the aspx form. The html generated will send an email even though there is no real form statement in the code. Plus the copied fields will not send their data but the non copied ones will send their data.
Is the form function hidden somewhere in aspx?
In anothre file perhaps?

<%@ page language="VB" masterpagefile="~/pages/airedale911.master" autoeventwireup="false" inherits="feedback, App_Web_i5ksdbwd" title="airedale911.org: Feedback" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder" runat="Server">
    <h1>
        Airedale911's New Adoption Form In Progress</h1>
    <p>
        <strong>Instructions</strong>
                    
           <p>All fields that require an answer will prompt you if you leave them blank or enter an invalid value.&nbsp; If there is no answer,
		   please enter "n/a" into the field.</p>
           
           <p>Note that if you leave the form page without completing the on-line application,
           your answers will not be saved.</p>

           <p>If your form does not get submitted, check the error message shown and return to that field.</p><br />
    </p>
		
	
    <table>		
		 <tr>
            <td class="Listings" valign="top" width="62">
                Comments2
            </td>
            <td class="Listings" width="303">
                <asp:TextBox cssclass="inputTXT" TextMode="MultiLine" Rows="5" ID="txtComments2" runat="server"></asp:TextBox>
            </td>
            <td class="Listings" valign="top" width="50">
                <asp:RequiredFieldValidator ID="rfvMailBody2" runat="server" ControlToValidate="txtComments"
                    ErrorMessage="Required" Display="Dynamic"></asp:RequiredFieldValidator></td>
        </tr>
			
		  <tr>
            <td class="Listings" valign="top" width="62">
                Comments
            </td>
            <td class="Listings" width="303">
                <asp:TextBox cssclass="inputTXT" TextMode="MultiLine" Rows="5" ID="txtComments" runat="server"></asp:TextBox>
            </td>
            <td class="Listings" valign="top" width="50">
                <asp:RequiredFieldValidator ID="rfvMailBody" runat="server" ControlToValidate="txtComments"
                    ErrorMessage="Required" Display="Dynamic"></asp:RequiredFieldValidator></td>
        </tr>
		
	
        <tr>
            <td class="Listings">
                Category
            </td>
            <td class="Listings">
                <asp:DropDownList runat="server" cssclass="inputDDL" ID="ddlCategory">
                    <asp:ListItem Selected="true">Web site</asp:ListItem>
                    <asp:ListItem>Adoptions</asp:ListItem>
                    <asp:ListItem>Events</asp:ListItem>
                    <asp:ListItem>Donations</asp:ListItem>
                </asp:DropDownList>
            </td>
            <td class="Listings">&nbsp;</td>
        </tr>
        <tr>
            <td colspan="3" class="Listings">
                <b>Your Contact Information</b></td>
        </tr>
        <tr>
            <td class="Listings">
                Name
            </td>
            <td>
                <asp:TextBox cssclass="inputTXT" ID="txtName" runat="server"></asp:TextBox></td>
                <td class="Listings">
                    <asp:RequiredFieldValidator ID="rfvName" runat="server" ControlToValidate="txtName"
                        Display="Dynamic" ErrorMessage="Required"></asp:RequiredFieldValidator></td>
        </tr>
		
		<tr>
            <td class="Listings">
                How many in your household?
            </td>
            <td>
                <asp:TextBox cssclass="inputTXT2" ID="txtName2" runat="server"></asp:TextBox></td>
                <td class="Listings">
                    <asp:RequiredFieldValidator ID="rfvName2" runat="server" ControlToValidate="txtName2"
                        Display="Dynamic" ErrorMessage="Required"></asp:RequiredFieldValidator></td>
        </tr>
		
	
        <tr>
            <td class="Listings">
                Phone</td>
            <td>
                <asp:TextBox cssclass="inputTXT" ID="txtPhone" runat="server"></asp:TextBox>
                <ajax:TextBoxWatermarkExtender ID="wmxPhone" runat="server"  WatermarkCssClass="faintTXT"
                    TargetControlID="txtPhone" WatermarkText="nnn-nnn-nnnn">
                </ajax:TextBoxWatermarkExtender>
            </td>
                <td class="Listings">
                    <asp:RequiredFieldValidator ID="rfvPhone" runat="server" ControlToValidate="txtPhone"
                        Display="Dynamic" ErrorMessage="Required"></asp:RequiredFieldValidator><asp:RegularExpressionValidator ID="rxvPhone" runat="server" ControlToValidate="txtPhone"
                        Display="Dynamic" ErrorMessage="Invalid" ValidationExpression="((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4}"></asp:RegularExpressionValidator></td>
        </tr>
        <tr>
            <td class="Listings">
                Fax
            </td>
            <td>
                <asp:TextBox cssclass="inputTXT" ID="txtFax" runat="server"></asp:TextBox>
                <ajax:TextBoxWatermarkExtender ID="wmxFax" runat="server"  WatermarkCssClass="faintTXT"
                    TargetControlID="txtFax" WatermarkText="nnn-nnn-nnnn">
                </ajax:TextBoxWatermarkExtender>    
                
            </td>
                <td class="Listings">
                    <asp:RegularExpressionValidator ID="rxvFax" runat="server" ControlToValidate="txtFax"
                        Display="Dynamic" ErrorMessage="Invalid" ValidationExpression="((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4}"></asp:RegularExpressionValidator></td>
        </tr>
        <tr>
            <td class="Listings">
                E-mail</td>
            <td>
                <asp:TextBox cssclass="inputTXT" ID="txtEmail" runat="server"></asp:TextBox>
                <ajax:TextBoxWatermarkExtender ID="wmxEmail" runat="server"  WatermarkCssClass="faintTXT"
                    TargetControlID="txtEmail" WatermarkText="user@domain.com">
                </ajax:TextBoxWatermarkExtender>
           </td>
                <td class="Listings">
                    <asp:RequiredFieldValidator ID="rfvEmail" runat="server" ControlToValidate="txtEmail"
                        Display="Dynamic" ErrorMessage="Required"></asp:RequiredFieldValidator><asp:RegularExpressionValidator ID="rxvEmail" runat="server" ControlToValidate="txtEmail"
                        Display="Dynamic" ErrorMessage="Invalid" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator></td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <asp:Button ID="btnSubmit" runat="server" Text="Send" Width="100px" />&nbsp;
                <input id="Reset1" size="" style="width: 100px" type="reset" value="Clear" /></td>
        </tr>
    </table>
    <!--</form>-->
</asp:Content>

The FORM is really there but you got to notice that this page is within a Masterpage. The FORM is declared within the Masterpage.
The current page you posted will be shown within the masterpage on the ContentPlaceHolder. So actually the form will be posted, does the customer get any response from the page?
Besides the response, the page will be posted back to itself (i think) after the button is being clicked. The data in the form will be lost if no viewstate is being set. Viewstate can be switched on and of. Either you can check within the form_load() event if the page is postedback. The actions can be to fill a new viewstate with the current field-values and reload the values from the viewstate after the page.IsPostback. That depends on how the fields are responding on the userinput. Reading your code the fields don't respond after the text has been changed so you can fill a viewstate in the button_click() event.

Regards,
Richard
The Netherlands

Hi,
I just checked the masterpage and found some <form> </form> tags but no real input this or input that stuff. What is the value of separating the <form> tags from the input stuff on aspx file?
Anyway I can't be concerned with that. Just trying to figure what I have to do to add a stupid field or two to this overgrown overdone coding which noone but the author can figure out.
Can anyone tell me how to add...let's say a new comment box..THAT'S ALL...just a new comment box to this a.asp file listed above?
Must I really edit the masterpage and six other pages just so I can add field. What has programming become? This is insane if you ask me.

I have wasted two days just trying to figure this out by myself. The idiot who wrote the site refuses to give the customer her backups which would solve every issue I'm trying to fix.

Please, help would be so appreciated.

First, nothing weird about the programmingstyle. Referring to inherits="feedback, App_Web_i5ksdbwd" i assume its being a compiled application.

If 'the idiot' which you are referring to, doesn't sent you or the client the uncompiled codepages I think you'll have a problem because the underlying code has been done in a code-behind page which (in design mode) functions besides the aspx page but after compiling it's unreadable..... (for hyjacking code) ;)

Thanks. Now that you understand the issue, is it possible for me to take a working asp form and add fields or am I screwed because I will still need to get at the compiled code-behind pages.
You would think that one could take a form that works and add fields without access code-behind pages.
It must be possible, yes?
It's just a form.
Why can't HTML be added to the .aspx that correlates to the extra fields?

here's the original td with the copied td
can anyone see an error why this would not work to create a form element from an existing one?

<tr>
            <td class="Listings" valign="top" width="62">
                Comments2
            </td>
            <td class="Listings" width="303">
                <asp:TextBox cssclass="inputTXT" TextMode="MultiLine" Rows="5" ID="txtComments2" runat="server"></asp:TextBox>
            </td>
            <td class="Listings" valign="top" width="50">
                <asp:RequiredFieldValidator ID="rfvMailBody2" runat="server" ControlToValidate="txtComments"
                    ErrorMessage="Required" Display="Dynamic"></asp:RequiredFieldValidator></td>
        </tr>
		
				
		  <tr>
            <td class="Listings" valign="top" width="62">
                Comments
            </td>
            <td class="Listings" width="303">
                <asp:TextBox cssclass="inputTXT" TextMode="MultiLine" Rows="5" ID="txtComments" runat="server"></asp:TextBox>
            </td>
            <td class="Listings" valign="top" width="50">
                <asp:RequiredFieldValidator ID="rfvMailBody" runat="server" ControlToValidate="txtComments"
                    ErrorMessage="Required" Display="Dynamic"></asp:RequiredFieldValidator></td>
        </tr>

I think there is some critical form element crap in the compiled dll file called App_Web_i5ksdbwd and inherited into the form. Since it's a dll file, is there no software that will open it so I can edit it?

<%@ page language="VB" masterpagefile="~/pages/airedale911.master" autoeventwireup="false" inherits="feedback, App_Web_i5ksdbwd" title="airedale911.org: Feedback" %>

Squarkman,
Please notice that you can't have nested forms in a page. Each form is a single instance. The main-form-tag is in the masterpage probably opening at the beginning-tag of the contentplaceholder and closing after the contentplaceholder. This means that ALL your code in the page is within the form-tag.

for example like this:

<Masterpage>
   <Form>
      <ContentPlacehoder \>
   <\Form>
<\Masterpage>

The only option would be to add another form in the masterpage but I think that is not what you want.....

Regards,

[edit]
Ofcourse there is some reverse-engineering software available but that still requires you to reverse the complete webapplication and choose to upload the uncompiled version ór the compiled application.
Compiled applications have a slightly better performance than uncompiled applications because the FrameWork has to compile the code-behind at each 1st-request.

This article has been dead for over six months. Start a new discussion instead.