I have an ASPX webform that takes some data and just sends an email. It has worked for years but I just added a new field and I can't get the Text value to transfer to the c# code that writes the email.
The difference is that the new field is populated through jQuery/JSON look-up and it is read-only. The jQuery portion is working fine.
TextBox in question:
<asp:TextBox ID="autoRegion" Width="30" ReadOnly="true" onfocus="this.blur();" TabIndex="-1" CssClass="disabledInput" Value="" runat="server" />
Working TextBoxes:
<asp:TextBox ID="FName" MaxLength="40" TabIndex="1" runat="server" />
<asp:TextBox ID="LName" MaxLength="40" TabIndex="3" runat="server" />
C# variable for email body content:
objMM.Body += "<table><tr><td>" +
LName.Text + "</td><td>" + FName.Text.ToUpper() + "</td><td>" +
streetAddress1.Text + "</td><td>" + city.Text.ToUpper() + "</td><td>" +
state.SelectedItem.Text + "</td><td>" + zip.Text + "</td><td>" + autoRegion.Text +
"</td></tr></table>";
All other fields are working but autoRegion.Text
is not.
I have also tried filling a variable with Request.Form["autoRegion"]
and using that variable in place of autoRegion.Text
but that did not work either.
Any help would be appreciated.