Вызов C # публичной void-функции внутри нажатия клавиш javascript

Добавляя к этому вопросу, если у вас когда-либо было несколько столбцов для переназначения в фрейме данных данных:

def remap(data,dict_labels):
    """
    This function take in a dictionnary of labels : dict_labels 
    and replace the values (previously labelencode) into the string.

    ex: dict_labels = {{'col1':{1:'A',2:'B'}}

    """
    for field,values in dict_labels.items():
        print("I am remapping %s"%field)
        data.replace({field:values},inplace=True)
    print("DONE")

    return data

Надеюсь, что это может быть полезно кому-то.

Cheers

g2]
0
задан Timato1 21 February 2019 в 07:27
поделиться

1 ответ

[System.Web.Services.WebMethod]
    public static void GetData()
    {
        MessageBox.Show("Calling From Client Side");
        //Your Logic comes here
    }

<asp:ScriptManager ID="ScriptManager2" runat="server" EnablePageMethods="true"/>
<body>
    <form id="form1" runat="server">
    <script type="text/javascript">
        function CallingServerSideFunction() {
            PageMethods.GetData();
        }
    </script>
    </form>
</body>
0
ответ дан enginne 21 February 2019 в 07:27
поделиться
Другие вопросы по тегам:

Похожие вопросы: