Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9257105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:07:11+00:00 2026-06-18T12:07:11+00:00

I have this form in my asp net mvc application, check right above the

  • 0

I have this form in my asp net mvc application, check right above the form the fields that are posted. The are couple of them missing. Can´t understand why

<form id="FormRegistroUsuario" action="/Account/AdminSecurityUserAccountAdd">
   <fieldset>
        <legend><h2 style="color:black;">Cadastro novo Usuário</h2></legend>
        <table id="tblUsuario">
            <tr>
                <td class="smallField">Username:</td>
                <td>@Html.TextBoxFor(m => m.UserName,new { @class = "validate[required]" }) </td>
                <td class="smallField" style="padding-left:10px;">Email:</td>
                <td>@Html.TextBoxFor(m => m.Email, new { @class = "validate[required,custom[email]]" }) </td>
                <td style="padding-left:10px;">Ativo:</td>
                <td>@Html.CheckBoxFor(m => m.Active)</td>
            </tr>
            <tr>
                <td class="smallField">Senha:</td>
                <td>@Html.PasswordFor(m => m.Password, new { @class = "validate[required, minSize[7]]" }) </td>
                <td style="padding-left:10px;">Repetir Senha:</td>
                <td>@Html.PasswordFor(m => m.ConfirmPassword, new { @class = "validate[required,equals[Password]]" }) </td>
                <td style="font-size:10px; padding-left:10px;">Habilitar Login com Cert. Digital:</td>
                <td>@Html.CheckBoxFor(m => m.isCertifiedAdd)
                    <div id="certDigitalBlockAdd">
                        <table>
                            <tr>
                                <td class="smallField">Tipo do Certificado:</td>
                                <td>@Html.DropDownListFor(m => m.certTypeAdd, new SelectList(Model.certTypeComboBox, "id", "type"), "Escolha...", new { @class="smallField" })</td>
                                <td style="display:none;">@Html.Hidden("certTypeAddHidden")</td>
                            </tr>
                            <tr>
                                <td>Identificação:</td>
                                <td>@Html.TextBoxFor(m => m.identifierAdd, new { @class = "validate[required] smallField" })</td>
                                <td style="display:none;">@Html.Hidden("identifierAddHidden")</td>
                            </tr> 
                        </table>
                    </div>  
                </td>
            </tr>
            <tr>
                <td class="smallField">Pergunta Secreta:</td>
                <td>@Html.TextBoxFor(m => m.SecretQuestion, new { @class = "validate[required]" }) </td>
                <td style="padding-left:10px;">Resposta:</td>
                <td>@Html.TextBoxFor(m => m.SecretQuestionPassword, new { @class = "validate[required, minSize[6]]" }) </td>
                <td></td>
                <td></td>
            </tr>                                     
        </table>
        <br />
        <div class="scrollTable" style="margin-left:20px;">
            <span class="boxTitle"><table><tr><td>Grupos Disponíveis</td></tr></table></span>
            <!-- Tipos -->
            <div class="scroller">
                <table>
                    <!-- Indices Disponíveis (Exibidos) --> 
                    @{
                    counter = 1;
                    }
                    @foreach (var role in Model.roles)
                    {
                    <tr id="@counter" class="whiteRow setIndex"> 
                        <td class="adminTipoFormRowIndex">@role</td>
                    </tr>
                        counter++;
                    }
                </table>
            </div>
        </div>
        <div class="scrollTable" style="margin-left:60px;">
            <span class="boxTitle"><table><tr><td>Grupos Atribuidos</td></tr></table></span>
            <!-- Tipos -->
            <div class="scroller scrollerindex">
                <table>
                 @{
                 counter = 1;
                 }
                 @foreach (var role in Model.roles)
                 {
                    string count = counter + "_a";
                    string inputCount = counter + "_i"; 
                    <tr id="@count" class="whiteRow unsetIndex" style="display:none;"> 
                        <td class="adminTipoFormRowIndex">@role</td>
                        <input type="hidden" id="@inputCo**strong text**unt" name="rolesGroup" value="@role" disabled="disabled"/>
                    </tr>
                     counter++;
                 }
                </table>
            </div>
        </div>
       <input type="submit" value="Salvar" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only button-link submitAddTipo"/>         
    </fieldset>        
</form>

JS:

$('#FormRegistroUsuario').submit(function (e) {
        e.preventDefault();
        var form = $(this);
        console.log(form.serialize());
    });

Fields been posted:

UserName=Guilherme
Email=grlongo.ireland%40gmail.com
Active=true
Active=false
Password=%23t1g2p3&
ConfirmPassword=%23t1g2p3&
isCertifiedAdd=true
isCertifiedAdd=false
SecretQuestion=Qual+a+senha%3F&
SecretQuestionPassword=secreta
rolesGroup=Administrador

Does not matter if I use @Ajax.beginForm or this approach the result is the same.

  • Sent using Ajax.beginForm
  • and ajax submit handle
  • Created hidden extras hidden fields to check if they would be posted
    (And no).

Any help you be very appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T12:07:12+00:00Added an answer on June 18, 2026 at 12:07 pm

    Found the problem. Hidden fields were inside the div that gets display:none so the values were not posted. Just moved to the top of my form and it is working now.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form in my ASP.NET MVC 3 application that will use jquery
I have an ajax form in asp.net mvc which is as simple as this:
I have an ASP.NET MVC form laid out something like this: @using (Html.BeginForm(null, null,
I have an ASP.NET form (C#) but which I click this button that should
In my ASP MVC 3 application, I have this form @using (Html.BeginForm()) { <input
I have an ASP.NET MVC 2 form that is working perfectly, doing client side
i have an asp.net mvc app that has a form that uploads a file.
I am working on as asp.net MVC 2 application. I have a form like
In an ASP.NET MVC application I have a CartController with this AddToCart action: public
I'm using asp.net mvc 3 with unobtrusive jquery validation. I have a form that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.