Click here to Skip to main content
15,898,374 members
Home / Discussions / C#
   

C#

 
GeneralRe: Comparing Hashed Passwords - Part 2 Pin
Richard Deeming27-Jun-18 4:02
mveRichard Deeming27-Jun-18 4:02 
GeneralRe: Comparing Hashed Passwords - Part 2 Pin
#realJSOP27-Jun-18 4:29
professional#realJSOP27-Jun-18 4:29 
GeneralRe: Comparing Hashed Passwords - Part 2 Pin
Richard Deeming27-Jun-18 4:38
mveRichard Deeming27-Jun-18 4:38 
GeneralRe: Comparing Hashed Passwords - Part 2 Pin
#realJSOP27-Jun-18 5:19
professional#realJSOP27-Jun-18 5:19 
GeneralRe: Comparing Hashed Passwords - Part 2 Pin
Richard Deeming27-Jun-18 5:25
mveRichard Deeming27-Jun-18 5:25 
GeneralRe: Comparing Hashed Passwords - Part 2 Pin
OriginalGriff27-Jun-18 5:37
mveOriginalGriff27-Jun-18 5:37 
QuestionRe: Comparing Hashed Passwords - Part 2 Pin
Eddy Vluggen27-Jun-18 4:27
professionalEddy Vluggen27-Jun-18 4:27 
AnswerRe: Comparing Hashed Passwords - Part 2 Pin
#realJSOP27-Jun-18 4:28
professional#realJSOP27-Jun-18 4:28 
GeneralRe: Comparing Hashed Passwords - Part 2 Pin
Eddy Vluggen27-Jun-18 4:38
professionalEddy Vluggen27-Jun-18 4:38 
GeneralRe: Comparing Hashed Passwords - Part 2 Pin
Joe Woodbury28-Jun-18 6:00
professionalJoe Woodbury28-Jun-18 6:00 
AnswerRe: Comparing Hashed Passwords - Part 2 Pin
Eddy Vluggen24-Jun-18 23:18
professionalEddy Vluggen24-Jun-18 23:18 
AnswerRe: Comparing Hashed Passwords - Part 2 Pin
RichardGrimmer26-Jun-18 5:28
RichardGrimmer26-Jun-18 5:28 
QuestionRun a C# code in Visual Studio or SharpDevelop Pin
Member 1388484424-Jun-18 7:41
Member 1388484424-Jun-18 7:41 
AnswerRe: Run a C# code in Visual Studio or SharpDevelop Pin
Pete O'Hanlon24-Jun-18 9:58
mvePete O'Hanlon24-Jun-18 9:58 
QuestionHow to install android ndk for visual studio 2015 ? Pin
Member 245846723-Jun-18 14:07
Member 245846723-Jun-18 14:07 
AnswerRe: How to install android ndk for visual studio 2015 ? Pin
Richard MacCutchan23-Jun-18 21:09
mveRichard MacCutchan23-Jun-18 21:09 
GeneralRe: How to install android ndk for visual studio 2015 ? Pin
Member 245846724-Jun-18 17:45
Member 245846724-Jun-18 17:45 
GeneralRe: How to install android ndk for visual studio 2015 ? Pin
Richard MacCutchan24-Jun-18 21:01
mveRichard MacCutchan24-Jun-18 21:01 
GeneralRe: How to install android ndk for visual studio 2015 ? Pin
Member 245846725-Jun-18 16:27
Member 245846725-Jun-18 16:27 
GeneralRe: How to install android ndk for visual studio 2015 ? Pin
Richard MacCutchan25-Jun-18 21:17
mveRichard MacCutchan25-Jun-18 21:17 
GeneralRe: How to install android ndk for visual studio 2015 ? Pin
Member 245846726-Jun-18 16:17
Member 245846726-Jun-18 16:17 
GeneralRe: How to install android ndk for visual studio 2015 ? Pin
Richard MacCutchan26-Jun-18 21:26
mveRichard MacCutchan26-Jun-18 21:26 
GeneralRe: How to install android ndk for visual studio 2015 ? Pin
Member 245846727-Jun-18 16:08
Member 245846727-Jun-18 16:08 
GeneralRe: How to install android ndk for visual studio 2015 ? Pin
Richard MacCutchan27-Jun-18 21:06
mveRichard MacCutchan27-Jun-18 21:06 
QuestionWhy Is The Text Element Inside Of Razor Code Block Skipped During Debugging Pin
MadDashCoder23-Jun-18 13:43
MadDashCoder23-Jun-18 13:43 
When a user clicks on the delete button to delete a jqgrid row, the form Action attribute is triggered and calls my controller method, which then returns a view. Then in this view, depending on the value of a certain viewbag, an alert will display the message "Successfully deleted" and the grid is reloaded.

Everything worked fine but I would like to use a confirm modal to make user confirm his/her intention so I put a part of the Razor code above the modal script and the rest inside the Success section of the AJAX code inside of the modal code. Below is my script:
C#
@{var message = ViewBag.Message;}
$("#DeleteDialog").dialog({
height: 280,
modal: true,
autoOpen: false,
  buttons: {
    'Confirm': function () {
        $.ajax({
            type: "POST",
            cache: false,
            url: "/Forms/MyMethod",
            success: function (data) {                                    
              @if (message == "Deleted"){
                ViewBag.Message = null;
                ViewBag.Status = null;
                <text>
                 alert("Successfully deleted!");                                            
                 jQuery("#jQGrid").clearGridData(true).trigger("reloadGrid");
                 jQuery('#jqGrid').trigger( 'reloadGrid' );
                 $('#files').empty();
                </text>
              }
            }            
         });
      $(this).dialog('close');
    },
    'Cancel': function () {
        $(this).dialog('close');
     }
  }
 });

I noticed that during debugging the viewbag codes were executed but the "<text>" element was skipped. That means the alert and other code inside of the TEXT element are not executed.

modified 23-Jun-18 20:04pm.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.