You must Sign In to post a response.
  • Category: ASP.Net MVC

    Revert Modal value if not saved

    Hi.
    Consider the scenario.
    I have one screen with 1 textbox and 2 buttons (View Popup and Save)
    On click on Pop up, 1 pop will open where I have 1 textbox which bind through modal on load.
    Once pop up open, if I change text and instead of Save, I close the pop up.
    When next time I click on Pop up, it should display the original value in textbox.
    But currently it show modified value. It should not because, I have not saved it.

    Scenario 2 :- If I save the value of pop up, when next time I click on Pop up, it should display updated value.
  • #768314
    Hi,

    Basically when you type something in your pop up and when try to close, it automatically keep that value in the text box. it means you are not intend to save the value but it takes automatically because once the pop modal got closed it consider that all the job related to this was completed. So avoid this scenarios you can keep a alert message while user click on Pop up close "Whether you want to save or not". if yes, just leave it like that. If not, cleat the textbox with empty like.

    Text1.Text = " ";

    Thanks,
    Mani


Sign In to post your comments