Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

279
Visualizações
How to get Mouse Click Event From Code Behind in JavaScript

How can I Pass Mouse Click Event to JavaScript function from code behind.

  imgTest.Attributes.Add("onclick", "javascript:return Test('" + sUrl + "','" + txtTest.ClientID + "','"
            + hdnTestId.ClientID  + "');");

function Test(sUrl,TestName,TestId){
    
}

How can I Get Click Event Test JavaScript Function

I Have Try eventargument not worked Please Below Code

EventArgs e  = new EventArgs();
imgTest.Attributes.Add("onclick", "javascript:return Test('" + sUrl + "','" + txtTest.ClientID + "','"
            + hdnTestId.ClientID  + "','" +  e + "');");

function Test(sUrl,TestName,TestId,EventArg){
    
}

Note :- I can't change Calling mechanism..

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Well, if you wire up a client side event?

You can always drop in a button on the page - hide it with style="display:none"

    <asp:Button ID="cmdRunServerCode" runat="server" Text="Button"  style="display:none" ClientIDMode="Static" />

    <script>

        function mytest() {
            // do whatever
            // now run server side button code
            $('#cmdRunServerCode').click()
            
        }

    </script>

So, you can use js to "click" the hidden button to run that button code stub you have server side.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda