1 Replies - 229 Views - Last Post: 26 May 2020 - 07:02 PM Rate Topic: -----

#1 DarenR   User is offline

  • D.I.C Lover

Reputation: 708
  • View blog
  • Posts: 4,580
  • Joined: 12-January 10

is it possible to call a jquery function that is located on a file

Posted 26 May 2020 - 10:42 AM

so is it possible to call a jquery function that is located on a separate javascript file?

so if i have an aspx.net page and in that page we are calling a javascript file like:
 <script type="text/javascript" src='<%= ResolveUrl("~/Scripts/EmailMaintenance.js")%>'></script>



is there a way to call functions out of that file from the c# code behind?

I have tried this and it does nothing:
Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "ShowDivs()", true);


the function works on the page by clicking on a button however i need to tie this function to a gridview that on OnRowCommand code behind it calls that function.

Is This A Good Question/Topic? 0
  • +

Replies To: is it possible to call a jquery function that is located on a file

#2 Skydiver   User is online

  • Code herder
  • member icon

Reputation: 7453
  • View blog
  • Posts: 25,095
  • Joined: 05-May 12

Re: is it possible to call a jquery function that is located on a file

Posted 26 May 2020 - 07:02 PM

Stop and think about it. Your code is running on the web server. That Javascript is running in the web browser of your user that is running on their computer or mobile device and could be multiple firewalls away.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1