mardi 31 janvier 2017

calling method outside of form tag in asp.net web forms

i am using some buttons outside of form tag that when clicked need to call method from code behind file. the problem is it doesn't look possible with asp.net web forms as it require everything in form tag so to use code behind file.

my problem is design based . i can't place everything inside form tag . here is my code

        <script src="Scripts/dropzone.js"></script>
        <link href="Content/dropzone.css" rel="stylesheet" />
        <div>
            <div class="fallback">
                <input name="file" type="file" multiple />
            </div>
        </div>

 </asp:Content>

<div style="width:30%;margin:0 auto; padding-top:50px">
    <a class="btn btn-danger btn-lg" id="help" href="#">
        <i class="fa  fa-question"></i> Got Questions
     </a>

    <a class="btn btn-danger btn-lg" href="#" id="validate_Click" style="margin-left:40px;">
        <i class="fa  fa-check-square"></i> Validate
     </a>
</div>

<script>
    $("#help").click(function () {
        swal("Here's a message!");
    });

</script>




Aucun commentaire:

Enregistrer un commentaire