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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T01:17:25+00:00 2026-06-13T01:17:25+00:00

I am using the Asp.net mvc4 WebRole, and I found this is a Web

  • 0

I am using the Asp.net mvc4 WebRole, and I found this is a Web Application , Not a Web Site.
after reading this article, I knew how to add customer Helper function in Asp.MVC4. In Web Site Appliction I can add a cshtml file in app_code folder like below so that I can use my custom helper method in another cshtml.

  @helper  HotDeployButton(string value, string url , bool enable= true){

      string enablestr = string.Empty;
      if (!enable)
      {
          enablestr = "disabled=\"disabled\"";
      }

      <input type="button"  name="@value" value="@value" onclick=" window.location.href='@url'" class="mobile-button"  @enablestr />
  }

  @helper Img(string picName, string alt ){

      string root = "/content/themes/default/images/";
      string imgurl = root + picName;

      <img  alt="@alt" src="@imgurl" title="@alt" />

  }

In Another cshtml shown below will use HotDeployButton method.

<div class="bottom-div">
            @Html.Hidden("hdSelMinorPackId", "")
            <!--Html.Hidden("randomId", (object)ViewBag.RandomId)-->
            <input type="submit" name="ExcuteDeploy" id="ExcuteDeploy" value="Deploy" onclick="return validateVersion();"
                class="mobile-button" />
            &nbsp;&nbsp;&nbsp;&nbsp;
            @Helpers.HotDeployButton("Back", Url.Action("Index"))
        </div>

But in Asp.net Web Application there is no App_code Folder in project. I don’t know how to make it in a Web Application . please help me .Thanks

  • 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-13T01:17:26+00:00Added an answer on June 13, 2026 at 1:17 am

    The directory is not created with the default Web Application project template so you just need to create the App_Code folder by hand and it should work (right click on the project -> Add -> New Folder).

    If you’ve done it right it will have a special icon:

    enter image description here

    By the way this is the first step in your linked tutorial:

    Creating a Helper

    This procedure shows you how to create the helper that creates the
    note, as just described. This is a simple example, but the custom
    helper can include any markup and ASP.NET code that you need.

    1. In the root folder of the website, create a folder named App_Code. This is a reserved folder name in ASP.NET where you can put code for
      components like helpers.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Playing with a Mobile application in ASP.NET MVC4 beta, using great that article ,
I have a web site built using ASP.NET MVC4 that I can publish fine
I am creating a web api using asp.net mvc4 and the response output is
I have been writing an application using ASP.Net MVC4, where the majority of the
I'm using latest MVC4-RC (.net 4.0) with Microsoft ASP.NET Web Optimization Framework http://nuget.org/packages/Microsoft.AspNet.Web.Optimization/1.0.0-beta3 and
I've just recently started to build a web site using ASP.NET - MVC 4,
I am creating an asp.net mvc4 site using entity framework 5 with codefirst and
I am developing a JQuery mobile application in ASP.net MVC4 razor using VSRC, In
I am programming a web-service with Asp.Net MVC4. I am using WinForms for the
I've read the list to upgrade a site to MVC4 here http://www.asp.net/whitepapers/mvc4-release-notes#_Toc303253806 and after

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.