Reload all css within a div

0

Expensive, I'll try to explain my problem, I hope to be clear.

I'm using C # MVC5 in my app.

Today I have a page and a grid. In this grid there is a button to edit the registry.

By clicking this button, I open a modal and display a form with the data to be edited.

I use ajax so that modal content is created dynamically, as the code below.

@Ajax.ActionLink(linkText: "Clique Aqui", 
                actionName: "Editar", 
                ajaxOptions: new AjaxOptions { UpdateTargetId = "modal", 
                                                InsertionMode = InsertionMode.InsertAfter })

<div id="modal"></div>

What happens is that, when clicking, it generates the contents of the form and "places" inside the "modal" div. So far, all right. The problem is that since the content is added via ajax, that is, after the page has been loaded, I lose the css "piece" of the page, only part of it works.

I have one inside the form, and it for example does not "inherit" the css.

If I put the HTML inside the page, other than by ajax it works, but I need it to be done via ajax.

Then I ask: How can I do a reload of CSS or force that new "piece" of HTML inserted in the font, use it from css and jquery completely?

The inserted HTML is this:

<form action="/CedenteDocumentos/Edit/1" method="post"><input name="__RequestVerificationToken" type="hidden" value="qshEjMnv9StRE3qk5uBu1VJ6rUuxvyl_b06t0kD3nE2ykez2IXWEBqXiqD3_XLQBvo92q0ExL9iY3HbG0s3dVN7Zd8UMWgsDAzGDvAm3D6o1">    <div class="modal-content">

    <input type="hidden" id="Id" name="Id" value="1">
    <div class="row">
        <div class="input-field col l8">
            <input class="validate text-box single-line" id="nome" name="Nome" placeholder=" " type="text" value="Documento 144444">
            <label for="Nome">Documento</label>
        </div>


    </div>
    <div class="row">
        <div class="input-field col l6">
            <select data-val="true" data-val-required="The Grupo field is required." htmlattributes="{ value = 0 }" id="Grupo" name="Grupo"><option value="">Selecione</option>

Company Membership Representatives                 Group             

        <div class="input-field col l2" style="margin-top: -5px; margin-left: -10px;">
            <input type="checkbox" id="ativo" name="ativo" class="filled-in" checked="checked" value="1">
            <label for="ativo">Ativo</label>
        </div>


    </div>

    <div class="row">




        <div class="row">
            <div class="col l10" style="margin-top: 30px;">
                <button class="btn-floating btn-sm waves-effect waves-light green darken-1 right" style="transform: scale(1)" type="submit" name="action" title="Salvar">
                    <i class="mdi-action-done"></i>
                </button>
            </div>
        </div>
    </div>

</div>

    
asked by anonymous 02.10.2015 / 18:50

0 answers