NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: rayb12 on May 27, 2015, 02:28:30 PM

Title: How to execute server side code on a button click?
Post by: rayb12 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!
Title: Re: How to execute server side code on a button click?
Post by: kevin plummer 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.
Title: Re: How to execute server side code on a button click?
Post by: JohanR 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
Title: Re: How to execute server side code on a button click?
Post by: Bruce 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
Title: Re: How to execute server side code on a button click?
Post by: rayb12 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!