Notification Confirm from server side code

4 posts, 0 answers
  1. dhuss
    dhuss avatar
    120 posts
    Member since:
    Sep 2009

    Posted 25 Sep 2013 Link to this post

    I am trying to create a confirm notification that will display during a button click event (server side). What I want to do is:

    1. Run the click event on postback
    2. Check for existing data in a table
    3. If data exists pause code and alert the user with the notification and give them the ability to cancel or overwrite the existing data.
    4. Continue running the remainder of code.

    I have tried the client "args.set_cancel(!window.confirm" on the client side, but this always fires first. I need something like this to pause execution of vb.net code, alert the user and then continue running the code. Is this even possible?
  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3600 posts

    Posted 25 Sep 2013 Link to this post

    Hello,

    I advise that you examine the following resources that explain how to achieve similar functionality:
    http://www.telerik.com/help/aspnet-ajax/window-using-radconfirm-in-server-code.html
    http://demos.telerik.com/aspnet-ajax/window/examples/confirmserverclicks/defaultcs.aspx


    Regards,
    Marin Bratanov
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. dhuss
    dhuss avatar
    120 posts
    Member since:
    Sep 2009

    Posted 26 Sep 2013 Link to this post

    I built a test web using the examples you listed. What I found is the aspx "onclientclick" will always fire first and run the Javascript. If the OK button is clicked then a postback occurs to run the server side code. This is not what I am trying to accomplish. I want to run the server side code first, if a specfic condition is meet then open a radConfirm to allow the user to decide what they want to do. If the user clicks the OK button, finish running the server side code. If they click CANCEL, exit the sub.
  5. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3600 posts

    Posted 27 Sep 2013 Link to this post

    Hi,

    Have you examined the first article I linked: http://www.telerik.com/help/aspnet-ajax/window-using-radconfirm-in-server-code.html? It offers three different ways to do this.

    The second one I linked shows a different approach that can spare you one postback.


    Regards,
    Marin Bratanov
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top