NetTalk Central

Author Topic: Button with warning, serverside action and change to indexpage  (Read 3977 times)

Edvard Korsbaek

  • Newbie
  • *
  • Posts: 19
    • View Profile
    • Email
Button with warning, serverside action and change to indexpage
« on: January 19, 2017, 11:26:23 PM »
Hi all!

This was trivial in desktop aps...

on a new page. I want to add a button, that does 3 things:

Opens a warning - 'Do you really want to reset due date for all members', if yes then execute a sqlscript and change to indexpage, if no change to indexpage

I can add a button on a webform page, that changes back to indexpage, but the rest...

I have tried to use the logic from the calculater(34) example, but no luck so far.

Best regards

Edvard

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Button with warning, serverside action and change to indexpage
« Reply #1 on: January 20, 2017, 04:09:34 AM »
Hi Edvard,

>> I want to add a button, that does 3 things:

There are a few approaches to this.

But breaking it down a bit helps to simplify it.

>> Opens a warning - 'Do you really want to reset due date for all members',

think of this as a NetWebForm, with a Display field (message) and two buttons.
Yes button takes you to a Done page -
No button takes you to IndexPage

Done Page contains the SqlScript code, perhaps tied to a progress control, which displays "Done" when it has completed.

Breaking it down to a simple UI flow like this makes it easier for you to implement.

(there are other approaches, but this is probably the one I'd recommend.)

cheers
Bruce


Edvard Korsbaek

  • Newbie
  • *
  • Posts: 19
    • View Profile
    • Email
Re: Button with warning, serverside action and change to indexpage
« Reply #2 on: January 26, 2017, 06:01:44 AM »
Dear Bruce!

Just needed a new of thinking. The web is stateless i think is what should be remembered.

When i put it through all the pages you suggested, it just worked as expected.

As so often before - Thanks for your help.

Best wishes

Edvard