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

The Archive Base Latest Questions

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

I have a function in asp.net mvc , in razor template . I want

  • 0

I have a function in asp.net mvc , in razor template .
I want to naming my function dynamically . but how can I do this ?
this is my function :

function ipro-@count() {
                numpro-@count = numpro-@count + 1;
                document.getElementById("numpro-@count").innerHTML = numpro-@count;
            }

count is a dynamic number . it does not work for function name . how can I fix it ?

  • 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-11T13:40:25+00:00Added an answer on June 11, 2026 at 1:40 pm

    What happens if you do this, need to add the parens around the variable name

                 function ipro@(count) () {
                    numpro@(count) = numpro@(count) + 1;
                    document.getElementById("numpro@(count)").innerHTML = numpro@(count);
                }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have this code in a javascript function in my ASP.NET MVC application...
I have a ASP.Net MVC JsonResult function in which I want to return the
I am working on an asp.net MVC 3 application. I have a C# function
I have asp.net generated html code. I want execute jQuery click function when user
In an ASP.MVC application, I have a function defined in my _ViewStart.cshtml like this:
I have a file upload function in my asp.net mvc application that allows users
I have an asp.net mvc project, and a function that streams out an image
I have an asp.net mvc site and i want to call the server when
I'm attempting to integrate jqGrid into an ASP.NET MVC 4 Razor view and have
I have an Asp.Net mvc 3 project I'm using razor, and need to generate

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.