converting files to web applications in Visual Studio

Good day!  I am new to Visual Studio 2012 and am running into an issue with coverting .ascx files into web application files, with .cs code behind files.

I am supposed to be able to right-click on the parent directory containing several files, all with .ascx as the file type, and select 'Convert to web application'.  This should then create .cs code behind files for each file in the directory (in this case, called Sublayouts).  I try to do this and the first file is adjusted correctly, but none of the others are.

I am not aware of any error messages being displayed.  The only message I see in the Error List window  is the following:

Validation (ASP.Net): Attribute 'placeholder' is not a valid attribute of element 'Sublayout'.

I check that part of the .ascx code and the code shows placeholder="content'

How do I correct this?  I have tried several other avenues of support to no avail.  

Thanks in advance!
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bob LearnedCommented:
The 'Convert to web application' option is for converting a Web Site model web site to a Web Application model, so it does not operate as you had guessed.

I am trying to understand your question.  Are the .ascx files just all HTML, JavaScript, without any code behind class?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
chipsterva69Author Commented:
Thanks for replying, The LearnedOne.  To the best of my knowledge, I am working on a model web site (this is part of a demo site used for tutorials).

Currently, prior to running the conversation, none of the files in this particular directory contain code behind files.  My understanding of the exercise is that once I have created a new file and saved it to the directory (Sublayouts), I should be able to run the convert tool on the higher up directory (Starter Kit) to automatically create the code behind class files.

When I run the convert, nothing happens, except to the first file in the directory, Breadcrumb.ascx.

The pages are mostly just HTML with asp declarations:
<%@ Register TagPrefix="sc" Namespace="Sitecore.Web.UI.WebControls" Assembly="Sitecore.Kernel" %>
<%@ Control Language="c#" AutoEventWireup="true" TargetSchema="" %>
<sc:Sublayout runat="server" RenderingID="{2BF352A5-6413-45DD-ABD3-2787356F555C}"
    Path="/layouts/Starter Kit/Sublayouts/Breadcrumb.ascx" ID="uxBreadcrumb" placeholder="content"
<div id="columns-C-and-R">
    <div id="content-col">
        <sc:Placeholder runat="server" Key="column-content" ID="columncontent" />
    <div id="right-col">
        <sc:Placeholder runat="server" Key="column-right" ID="contentright" />

Open in new window

Thanks for considering!
Bob LearnedCommented:
Conversion is not my area of expertise, but I am willing to try to help.  

Do you still have the original code before conversion?  

Can we try some different things to see what is going wrong?

What version of .NET IDE are you using?

What steps did you take to convert the Web Site model web site to a Web Application model?
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

chipsterva69Author Commented:
Thanks for still trying, TheLearnedOne.

1.  Unfortunately, not without wiping out the practice site and restoring the tutorial, which I am happy to do if nothing else makes sense.

2.  At this point, I will try anything.  This one exercise is holding up the rest of the tuts.

3.  I am using MS Visual Studio 2012 Update 3.

4.  According the tut, to create the code behind files, it is a matter of saving the new file I created by doing a save as, then in the parent directory above the one the file is saved in, right-button clicking on the folder name in Solution Explorer and choosing Convert to Web Application.  The end result should be the typical ascx file, with two code behind files attached, for each file in the directory.

Regarding #4 - I have tried the conversion process on the new file's home directory and the one above it.  I have also tried it on the file itself.

Thanks again!
Bob LearnedCommented:
I am not sure that I understand what tutorial (or starter kit) that you are referring to.
chipsterva69Author Commented:
My apologies - this is part of a larger move on our part to developing a SiteCore-based CMS website.  This particular issue came up while working with the tutorials that were part of our training several months ago, and I am trying to go through them again as a refresher.  I wasn't sure if all of the background was pertinent to the problem and didn't want to bury the problem with a bunch of extraneous info.
Bob LearnedCommented:
As an outsider, I am trying to understand your problem space, so that I can give you better guidance.
chipsterva69Author Commented:
Yeah - it is a mess in there.  I don't want to waste any more of your time, TheLearnedOne.  I am going to get the site cleaned out and reinstalled and try the process again.  Thanks for giving it the college try - it isn't easy trying to understand someonelse's mess based on only what they can tell you!!

I appreciate the assistance.  You helped me decide to go back to step one and retrace the process.
chipsterva69Author Commented:
While this comment wasn't the ultimate solution, it clarified for me what the process represented and where I most likely went wrong with it.  Thanks for helping clear the mist in my head!
Bob LearnedCommented:
When you create a web application, use the File > New Project > Visual C# > Web templates, which should give you what you need, since the default installation will use code-behind files.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.