locked
Uncaught reference error  C0043 is undefined RRS feed

  • Question

  • User-797751191 posted

    Hi

      I am getting abover error Uncaught reference error  C0043 is undefined

    <a class="btn btn-danger btn-xs" onclick='editPop(<%#Eval("No")%>,<%#Eval("Id")%>)'><i class="fa fa-ban"></i></a>

    function editPop(No, Id) {
    $("#myModal").modal();
    }

    <div class="modal fade" id="myModal" role="dialog">
                                            <div class="modal-dialog">
                                                <div class="modal-content">
                                                    <div class="modal-header">
                                                        <button type="button" class="close" data-dismiss="modal">&times;</button>
                                                        <h4 class="modal-title">Modal Header</h4>
                                                    </div>
                                                    <div class="modal-body">
                                                        <asp:TextBox CssClass="form-control" ID="txtRemarks" runat="server"></asp:TextBox>
                                                    </div>
                                                    
                                                </div>
    
                                            </div>
                                        </div>

    In Developer Tools below code is shown

    <a class="btn btn-danger btn-xs" onclick='editPop(11,C0043)'><i class="fa fa-ban"></i></a>

    Thanks

    Friday, June 28, 2019 8:24 AM

Answers

  • User61956409 posted

    Hi jsshivalik,

    getting abover error Uncaught reference error  C0043 is undefined

    <a class="btn btn-danger btn-xs" onclick='editPop(<%#Eval("No")%>,<%#Eval("Id")%>)'><i class="fa fa-ban"></i></a>

    Please try the following code snippet to pass multiple Eval values to your JavaScript function.

    <a class="btn btn-danger btn-xs" onclick='<%# string.Format("editPop({0}, \"{1}\");", Eval("No"), Eval("Id")) %>'><i class="fa fa-ban"></i></a>

    With Regards,

    Fei Han

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, June 28, 2019 9:22 AM