NetTalk Central

Author Topic: How to execute server side code on a button click?  (Read 3777 times)

rayb12

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
How to execute server side code on a button click?
« on: May 27, 2015, 02:28:30 PM »
I know this sounds like a silly question but I can't seem to get it to work.  I looked at the example "web28" buttons and I put a simple "message('hello world')" in the serverbutton field add server side code here and it works!  But in my application, on a form, I have a simple button with the same message in the same embed point and it does not work.

Just to test, I even put in a url in the url field of the button and when I click the button it goes to the url.

Any help is greatly appreciated!

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: How to execute server side code on a button click?
« Reply #1 on: May 27, 2015, 03:22:55 PM »
try to delete your button, add it back in and add your server side test and don't do anything else to the button.

If the button calls a procedure or URL then the server side code will not run.

JohanR

  • Sr. Member
  • ****
  • Posts: 375
    • View Profile
    • Email
Re: How to execute server side code on a button click?
« Reply #2 on: May 28, 2015, 01:19:25 AM »


Hi Ray

Is it a multi DLL app?
If yes and the button was added to a procedure in a dll , then you must compile the the exe,
so that the button is registered in the webserver procedure.



Johan

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: How to execute server side code on a button click?
« Reply #3 on: May 28, 2015, 01:34:05 AM »
Hi Ray,

on the button you added, go to the client-side tab, and make sure
"send to server" is clicked on.

cheers
Bruce

rayb12

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
Re: How to execute server side code on a button click?
« Reply #4 on: June 01, 2015, 06:53:37 AM »
Kevin - Thanks for the suggestion.
Johan - It's a single exe.
Bruce - That worked.  Send to server was not clicked on.  As soon as I did this it worked.  Thank you for your help!