NetTalk Central

Author Topic: How to add server side proc to button with hypelink  (Read 4267 times)

kashiash

  • Newbie
  • *
  • Posts: 48
    • View Profile
    • Email
How to add server side proc to button with hypelink
« on: May 15, 2010, 12:06:18 PM »
I have button with hyperlink to other page
in client side tab i check send value to server and exceute some code

when user press button link page is opened but code on server side is not executed
This happens in one of my app , when i try to other all is ok
is possible to disable somewhere in app settings server side actions on  button ?
what's wrong ?

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: How to add server side proc to button with hypelink
« Reply #1 on: May 15, 2010, 08:10:13 PM »
Is your button set as type "Button" or type "Submit"?

Also check the log, maybe the click is doing two things, but not in the order you expect.

cheers
Bruce

kashiash

  • Newbie
  • *
  • Posts: 48
    • View Profile
    • Email
Re: How to add server side proc to button with hypelink
« Reply #2 on: May 15, 2010, 11:23:14 PM »
I check both Button and submit
i use debugview for "debiggign" and im sure - program only go to new page

when i remove hyperlink then button server code is executed

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: How to add server side proc to button with hypelink
« Reply #3 on: May 16, 2010, 01:43:35 AM »
I have run into the same prob - I think it is because when you add a hyperlink URL it goes to that page and your server side code does not run.

The way I have got around it is to add a parameter to the url and trap that on the next procedure and run the code I want.

Of course it might be just a matter of moving some code around.

kashiash

  • Newbie
  • *
  • Posts: 48
    • View Profile
    • Email
Re: How to add server side proc to button with hypelink
« Reply #4 on: May 16, 2010, 01:34:51 PM »
its no so easy
this code determine where i should go to next page - then i should jnow result before opening next page

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: How to add server side proc to button with hypelink
« Reply #5 on: May 16, 2010, 03:24:09 PM »
can you run that code based on any other event on the form? even if the code did run on that button I don't think it would work anyway. in my experience (and I could easily be wrong) I have always had to set the URL before the page is created and if I change it after that I would need to refresh the control that held the URL ie the button.