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 9259755
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:43:58+00:00 2026-06-18T12:43:58+00:00

I know I’m doing something wrong somewhere, could somebody point it out to me?

  • 0

I know I’m doing something wrong somewhere, could somebody point it out to me?

I have a viewmodel, containing a CurrentSection property

public String CurrentSection {get; set;}

In the view, I call the viewmodel and jQuery

@model Application1.ViewModels.fooVM

@Scripts.Render("~/bundles/jquery")

Then I do the following (Which works in JSFiddle)

<script type="text/javascript">
    $(document).ready(function () {
        $("#CurrentSection").val('SecStoreIndex');
    });
</script>

@Html.EditorFor(X => X.CurrentSection)

With the EditorFor rendering as

<input id="CurrentSection" name="CurrentSection" type="hidden" value="" />

Can anyone point out what I’m doing wrong?

  • 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-18T12:43:59+00:00Added an answer on June 18, 2026 at 12:43 pm

    I am holding my hands up and owning up to stupidity.

    I was attempting to view the dynamically changed value view viewing the pages source. It suddenly occurred to me this does not show up. I threw in an alert and the value is being changed.

    Sorry to waste your time.

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

Sidebar

Related Questions

Know this might be rather basic, but I been trying to figure out how
I know there have been many questions on grid and pack in the past
I know it's the javascript causing the issue, but how I have no idea.
I know the benefits of chaining within PHP but lets say we have this
know question is not clear at a glance, i have this table: ID Start
I know jquery have backwardscompatibility files. But if you link to this specific version:
This could be a duplicate question, but I have no idea what search terms
I know questions like this have been asked before, but I'm not sure how
I know there's a lot of other questions out there that deal with this
Know anybody something about hooking __userpurge type of functions? I hooking successfully __thiscall ,

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.