Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8949481
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:13:40+00:00 2026-06-15T13:13:40+00:00

All my routes: routes.MapRoute( name: Login, url: {eid}/Login, defaults: new { controller = Account,

  • 0

All my routes:

    routes.MapRoute(
        name: "Login",
        url: "{eid}/Login",
        defaults: new { controller = "Account", action = "Login", eid = ConfigurationManager.AppSettings["Congress_Code"] } // Parameter defaults
    );

    routes.MapRoute(
        name: "Account",
        url: "{eid}/Account/{action}",
        defaults: new { controller = "Account", action = "{action}", eid = ConfigurationManager.AppSettings["Congress_Code"] }
    );

    routes.MapRoute(
        name: "Default",
        url: "{eid}/{controller}/{action}",
        defaults: new { controller = "Account", action = "Login", eid = ConfigurationManager.AppSettings["Congress_Code"] }
    );

In manage.cshtml:

@using (Html.BeginForm(new { eid = ViewBag.EventId }))
{
    @Html.ValidationSummary(false)

In the account controller:

//
// GET: /Account/Manage
//[AllowAnonymous]
public ActionResult Manage(int eid, ManageMessageId? message)
{
    ViewBag.StatusMessage =
        (message == ManageMessageId.UpdateDetailsObjSuccess) ? "Your user details have been modified."
        : "";
    return View();
}

//
// POST: /Account/Manage
[HttpPost]
public ActionResult Manage(UpdateUserDetailsModel model,int eid)
{
    if (ModelState.IsValid)
    {
        var updateModel = AutoMapper.Mapper.Map<Models.UpdateUserDetailsModel,KPAD_Api.Kiosk.KioskUserDetailsExtended>(model);
        try
        {
            long token = Proxy.Proxy.Instance.Token[KioskUser.Id];
            var result = Proxy.Proxy.Instance.KioskUserClient.UpdateKioskUser(updateModel, token);
            if (result.ErrorCode == ReturnCodes.Codes.ALL_OK)
                return RedirectToAction("Manage", new { Message = ManageMessageId.UpdateDetailsObjSuccess });
            else
                ModelState.AddModelError(ReturnCodes.Instance.GetMessage(result.ErrorCode), new Exception(ReturnCodes.Instance.GetMessage(result.ErrorCode)));
        }
        catch (Exception e)
        {
            ModelState.AddModelError("Database error occured.Please contact the website administrator", e);
        }
    }
    else
    {
        ModelState.AddModelError("An unknown error occurend. Please try again. If it persists please contact the admin.",new Exception("Unknown"));
    }
    // If we got this far, something failed, redisplay form
    return View(model);
}

But still the validation summary doesn’t show when I generate an exception on purpose or when it happens by nature.
Does anyone have any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T13:13:41+00:00Added an answer on June 15, 2026 at 1:13 pm

    Try this

    In manage.cshtml:

    @using (Html.BeginForm(new { eid = ViewBag.EventId }))
    {
        @Html.ValidationSummary(true)
    

    In controller

    [HttpPost]
    public ActionResult Manage(UpdateUserDetailsModel model,int eid)
    {
        if (ModelState.IsValid)
        {
            var updateModel = AutoMapper.Mapper.Map<Models.UpdateUserDetailsModel,KPAD_Api.Kiosk.KioskUserDetailsExtended>(model);
            try
            {
                long token = Proxy.Proxy.Instance.Token[KioskUser.Id];
                var result = Proxy.Proxy.Instance.KioskUserClient.UpdateKioskUser(updateModel, token);
                if (result.ErrorCode == ReturnCodes.Codes.ALL_OK)
                    return RedirectToAction("Manage", new { Message = ManageMessageId.UpdateDetailsObjSuccess });
                else
                    ModelState.AddModelError(ReturnCodes.Instance.GetMessage(result.ErrorCode), new Exception(ReturnCodes.Instance.GetMessage(result.ErrorCode)));
            }
            catch (Exception e)
            {
                ModelState.AddModelError("","Database error occured.Please contact the website administrator");
            }
        }
        else
        {
            ModelState.AddModelError("","An unknown error occurend. Please try again. If it persists please contact the admin.");
        }
        // If we got this far, something failed, redisplay form
        return View(model);
    }
    

    it’s bind the error in key- value pair.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this route routes.MapRoute( ViewGames, // Route name psp/{controller}/{action}, // URL with parameters
If I have a route: routes.MapRoute( RouteName, // route name {action}, // url with
I have the following custom route routes.MapRoute(custom, Groups/{groupname}/{action}/{id}, new { controller = Groups, action
I have a route (which works): routes.MapRoute( Details, // Route name {controller}/{id}, // URL
So, I have implemented custom routing in mysite. routes.MapRoute( WithFriendlyNameOnly, {friendlyName}, new { controller
I've got the following routes: // Submission/* routes.MapRoute( Submission, Submission/{form}, new { controller =
All of a sudden my form link looks like this: <form action=/r.ashx/Models.Module_ContactUs?action=Submit&amp;controller=Contact id=contactUsForm method=post>
I have this routing setup at the moment routes.MapRoute( OldPages, // Route name page{id}.html,
I changed the default routing in ASP.NET MVC from routes.MapRoute( Default, // Route name
I have the following routes defined: public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute({resource}.axd/{*pathInfo}); routes.MapRoute(name:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.