Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

159
Views
how Redirection does not work in javascript

when I click on the submit button, the message is displayed but redirected to the edituser page while I want to be redirected to index

public void OnPost(List<long> SelectedRoles)
    {
        if (!ModelState.IsValid||SelectedRoles.Count==0)
        {   
             Roles= _RoleApplication.GetRoleList();              
         
        }                     
          _UserRoleApplication.Edit(EditProfile.Id,SelectedRoles);
          _AccountApplication.EditUserByAdmin(EditProfile);
    }
function edit(id) {
    Swal.fire({
    title: 'edit',
    showDenyButton: true,
    confirmButtonText: 'yes',
    denyButtonText: `no`,
    }).then((result) => {
    if (result.isConfirmed) {
        Swal.fire('save!', '', 'success').then((r) => {
            if (r.isConfirmed)
            {
                window.location.replace('https://localhost:5001/Admin/index);
            }
        })                           
    } else if (result.isDenied) {
        Swal.fire('error', '', 'info')
    }
    })
};

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!