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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:39:38+00:00 2026-05-28T02:39:38+00:00

I’m attempting to merge two projects in visual studios 2008 The project I am

  • 0

I’m attempting to merge two projects in visual studios 2008

The project I am trying to bring in is styled like the old school asp.net projects using the code behind setups to access the on page load methods and so on, but the other projects is the new fangled MVC3 styled project.

Now I am fully aware that these two projects are mapped differently for access and most likely shouldn’t be put together, but if i listened to every thing i was told not to do, i wouldn’t have the bad ass tattoo of an angel eating a hot dog on my left ass cheek.

Now when I talk about merging these two together all I’m really talking about is bring in 1 view of .aspx type into my MVC3 project and making it run along side the other views that are there. I have been able to bring it in, I have a function in a controller setup for it and I have it’s code behind there linked in properly, every thing seems to be a go, but intellisense doesn’t recognize that the html tags that have an id and a runat server property on them are going to be objects in my code behind. It keeps telling me to declare these variables.

For shits and giggles I did try declaring them, at which point intellisense smiled and gave me a wink before dashing my hopes against a sharp rock by alerting me that the variables had all ready been declared when the page was parsed.

Edit: The controller is performing it’s own tasks, as I stated above the code behind is handling the page load function and in the old setup the you could directly access any html tags that used the runat server propertie, I’m trying to duplicate this along side MVC3, I’m not trying to put it all in the controller. So to clear it up, I have a Model, View, controller, then inside my view i have my aspx page with a code page named filename.aspx.cs, does that help?

Edit2: OK for this setup like i said above were using vs2008 so it has the view model and controller folders where you place your three separate areas I have a particular view from another project that was using the old code behind approach of attaching a code file to a .aspx file by using the CodeBehind=”Default.aspx.cs” parameter, so I pulled this .aspx file with it’s code behind file from the old project and stuck it into the new MVC3 project and told them to coexist much like a an adult tells a child not to stick something in there mouth(just cause you tell em to doesn’t mean there gonna). but the old code behind file uses a page load function that has to initialize some html tags from a certain library but i of course can’t access these tags, and they don’t have html helpers or any thing cool like that.

Any help would be greatly appreciated.

  • 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-28T02:39:39+00:00Added an answer on May 28, 2026 at 2:39 am

    I found the solution, all i needed to do to access these tags was use the FindControl() function, in side the code behind file, it was that simple, the thing runs like a champ now.
    So what i had was a view with a control like

    <button id="foo" runat="server">
    

    then of course i had a controller with the function

    public ActionResult Index()
    {
        Return View();
    }
    

    and lastly I have the code behind which contains

    protected void Page_Load(object sender, EventArgs e)
    {
        ((Button)This.FindControl("foo")).DoSomething();    
    }
    

    Easy peasy lemon squeezy.

    thanks for the help any way guys

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am trying to render a haml file in a javascript response like so:
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I've got a string that has curly quotes in it. I'd like to replace
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

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.