Add form in a section by means of a button in C # sections ... section ...

0

Good day everyone, I have a form that is divided into.

I would like to know, how to press a button that is in another (), I add the form to my other (), I hope and I explained correctly.

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

<section class="content-header">
    <h3 style="text-align:center">REPORTES MENSUALES FEMSA</h3>
</section>

<section class="container">
    <div class ="row">
        <div class="col-sm-4">
            <asp:DropDownList ID="dpl_fechas" runat="server"></asp:DropDownList>
        </div>
        <div class ="col-sm-4">
            <asp:DropDownList ID="Unidad_Operativa" runat="server" style ="width: auto"></asp:DropDownList>
        </div>
        <div class ="col-sm-4">
            <asp:DropDownList ID="Zonas" runat="server"></asp:DropDownList>
        </div>            
    </div>

    <div class="row"> //ESTE ES EL BOTÓN QUE GENERARIA EL LLAMADO AL FORMULARIO
        <asp:Button ID="genera_reporte" runat="server" Text="Generar"/>

    </div>       
</section>

<section class ="container">

    //aqui me gustaria que apareciera el otro formulario.
</section>

The master template, which is developed in Bootstrap, is divided into sections, each section has containers and in turn has paragraphs. In a form I have a graph, which, I would like to add it by pressing a button that is on a section, that is, on the same page, send it to call by pressing the button.

    
asked by Ric_hc 24.02.2017 в 19:43
source

1 answer

0

Hello, you have to create a script in javascript

<script>
function otro_section() {
    $("#nombrediv").append('<section class="container">');
    $("#nombrediv").append('<input name="nose" type="text" class="form-control" placeholder="nose"/>');
    $("#nombrediv").append('</section>');
}
</script>

and the button you should assign the function.

<input class="btn btn-login" type="button" value="Otro servicio" onclick="otro_servicio()"/>

eye makes the amount of the new line in a DIV or SECTION that has the id idd name or the one you put.

<div id="nombrediv">

//example

</div>

Greetings

    
answered by 24.02.2017 в 20:13