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

  • Home
  • SEARCH
  • 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 398511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T16:45:20+00:00 2026-05-12T16:45:20+00:00

I have a weird one. I’m trying to render out a standard textarea simply

  • 0

I have a weird one. I’m trying to render out a standard textarea simply using the TextArea helper:

    <p>
        <label for="Message">Message:</label>
        ${ Html.TextArea("IssueText") }
        ${ Html.ValidationMessage("IssueText", "*") }
    </p>

And my controller

   public ActionResult Contact() {
            return View();
    }
  [AcceptVerbs(HttpVerbs.Post)]
        public ActionResult Contact(FormCollection form) {
            Seller user = _session.AuthenticatedSeller;
            ServiceTicket ticket = new ServiceTicket(user, form["IssueText"],
               form["ContactReason"]);
            if (ticket.IsValid) {
                _servicetTicketRepository.Add(ticket);
                _servicetTicketRepository.Commit();
                return RedirectToAction("Index", "MyPlace");
            }

            ModelState.AddModelErrors(ticket.GetRuleViolations());
            return View();
        }

And on the first load of the page it works just fine and renders the textarea

Before http://cadred.net/personal/contact-before.png

However, when I submit the form to test validation it no longer renders the textarea

After http://cadred.net/personal/contact-after.png

  • 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-05-12T16:45:20+00:00Added an answer on May 12, 2026 at 4:45 pm

    The reason you are getting the spark code instead of the test area is due to a null ref exception occurring when it is trying to execute the html.textarea related statements.

    Rework your view as follows and you will be able to break into the view code generated by spark in a debugger.

    <p>
      <label for="Message">Message:</label>
    # System.Diagnostics.Debugger.Break();
      ${ Html.TextArea("IssueText") }
      ${ Html.ValidationMessage("IssueText", "*") }
    </p>
    

    Now you can F5 the project and you should get a dialog asking to launch a debugger when you hit the view, ignore it the first time ( hit No ) and launch a debugger the second time ( after you hit submit ). The list should include the VS instance you ran the project from, select that and away you go.

    Look for nulls otherwise drop breakpoints in the try catch that renders the text area and in the catch handler for it. Hopefully you will get sufficient info to enable you to determine whats happening.

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

Sidebar

Related Questions

This one is weird, I have a page that consists of a html table
Have a bit of a weird one and hopefully someone can help out. The
I have got one weird issue. I am working on an asp .net mvc
Ok, this is a really weird one. I have an MPI program, where each
I know this one is the weirdest of all weird questions I have asked
Weird to describe but here goes. I have a table with several rows. One
I am facing a weird problem regarding bluetooth on android devices. I have one
I am trying to use install_name_tool in Mac OS X, and have weird error
This is a weird one for you... I have a search box in my
This is a weird one. On and off as I have been working on

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.