Prevent Visual Studio From Appending Folder Name To New Classes?
May 28, 2010
How can I prevent Visual Studio from naming the classes for new pages that are in folders from being named with the folder name? Does this method not set "right" with anyone else?
View 1 Replies
Similar Messages:
Jan 7, 2011
I've searched but not found much that helps, could be using wrong search terms.Anyway, currently using Visual Studio 2005 and VB, but just got Visual Studio 2010 and trying to use C# and am having problems using classes, I think I'm missing something simple here.
In both 2005 & 2010 I create a new website and a Default.aspx, in 2005 using VB, C# in 2010.
Right-click the project -> Add New Item -> Class, and leave it as Class1.vb/Class1.cs
Both 2005 & 2010 prompt to place it in the App_Code folder, so choose yes.
Here are the class files, I've not changed anything apart from create a very simple function:
Class1.vb code: [Code]....
Class1.cs code: [Code]....
In my VB project Default.aspx.vb: [Code]....
No errors, and debugging shows that a = "hello"
My Default.aspx.cs: [Code]....
This gives an error:Error 1 The name 'tester' does not exist in the current context D:Visual Studio 2010WebSite11Default.aspx.cs
How do I reference the tester function within Class1 in my C# project?
View 4 Replies
Jan 11, 2010
I am new to LINQ. when we drag tables we get a dbml file and designer file.
For example DataClasses1.dbml and DataClasses1.designer.cs.
Once we have them then we can start using our LINQ Queries.
In my company project I do not see this designer files and instead there are .tt files which were used as templates to greate ABC.generated.cs files. Is this same as designer class?
View 3 Replies
Feb 14, 2010
Even though I when I create a linqtosql class I mark C# as the language it was always shows up as a Visual Basic file in the App Code file. I can't get it to stop doing that. ????? What is going on?
View 5 Replies
Mar 5, 2011
I signed up with a new hosting company that uses Plesk. I use Visual Studio 2005 It appears that my rootfolder must be named httpdocs, which means every website I create would have the same name. If I do nothave my aspx files stored locally in an httpdocs folder, then I cannot synchronize with the server when I usethe copyweb dialog. Also Visual Studio 2005 creates a folder using the website name in the C:Documents and SettingsuserLocalSettingsApplication DataMicrosoftWebsiteCache for storing website settings, but cannot have multiple folders of same name, i.e., httpdocs, so this seems to be a conflict with Plesk. What can I do to resolve this?I talked with support at the hosting company, but they do not know Visual Studio at all. I am thinking I need to switch to
View 2 Replies
May 1, 2010
Can't find new classes in namespace
View 3 Replies
Sep 21, 2010
I'm using VS 2010. I got the references to the classes from my project, now I need the .dll files but I can't seem to find them. How do you add the .dll's?
View 1 Replies
Jun 21, 2010
I have existing ASP.NET 3.5 project I migrated to Visual Studio 2010. I didn't migrate it to .NET 4.0. Every time I try to edit .aspx page, it alters the .designer.cs class to point to System.Web.UI.WebControls.WebParts.UpdatePanel class instead of
System.Web.UI.UpdatePanel
class and then the build of course produces an error. The project properties says ".NET3.5".Also the "design" tab produces just one box saying "unknown server tag asp:UpdatePanel". It seems like it is looking at .NET4.0 to generate the desgn view, not 3.5
Is there a setting somewhere I need to change?
View 3 Replies
Feb 20, 2011
VWD 2010 Express.
We have shared CSharp classes put into a shared folders for re-use. Now I want to add those classes into my project by creating a new folder:
1) Right click the solution,
Add -> New Folder
Give it a new, eg. SharedClasses
2) Right click the new folder "SharedClasses"
Add- > Existing Item...
Browse to the "Shared Folder", include those shared classes. But those files are added physically into the folder "SharedClasses" rather than a reference. How do I just add a link to those shared files? Since these files might be modified from time to time, I don't want to delete and add those file frequently.
View 3 Replies
Nov 24, 2010
I've build a Class Library, in the same project i put a web project. But its impossible to access the classes from the dll generated by the class library. Whats wrong? JumpTide XML uses the namespace like:
namespace JumpTideClassLib
{
public class jumptidexml
{
public class MetaTags
{
Image:
View 1 Replies
Aug 10, 2010
My class names are this annoyingly bright-blue color and I can't figure out which display item class names would fall into under the fonts and colors option.
View 2 Replies
Aug 5, 2010
I am fairly new to ASP.net and web page development. I normally create Windows Apps, but the move is on to web pages. I have read and tried a number of posts on this matter, but none of them resolved the problem I am having. I have created a web site (I'm positive it is a web site) and added a class. Visual Studio automatically created and added the class to the App_Code folder. Accordingly, I added the get/set methods to the class and made them public. When ever I try to access the class from a code behind for any page, I get the class name, but nothing more. Intellisense shows only Equals and EqualsReference - no variables. I'm used to using classes in windows forms application and this would make life so much easier if it worked like it is supposed to work.
View 2 Replies
Jul 14, 2010
my solution in VS 2008, consisting of a dozen projects, does not compile because it gives me errors on constructors of a couple of classes, telling me that lacks the constructor that takes one parameter, which lacks the parameterless constructor, and so on.Actually I have all the correct constructors, and other times I compile without problems.I'm not understand why I have these random problems, that it is practically impossible to replicate.
View 2 Replies
Jan 24, 2010
im facing problem to access classes out side my project folders. for example if i want to use some methods from store.vb file inside my project i get error : Name Space is not defiend, i have tried all ways such as import sdf.ITracjer.Data
[Code]....
i can't fetch the Store Class Methods or Function because its out of project directory, as its showin in image.
View 3 Replies
Mar 17, 2011
I can't believe I'm having so much trouble finding this information. I'm endeavouring to learn about creating model classes with Linq to SQL. By default VS2010 wants to use SQL Express, but our organisation has several database servers for development so I'd rather use one of those. PLEASE can somebody tell me how I can configure VS2010 to do that, as all I get is 'A network-related or instance-specific error occurred while establishing a connection to SQL Server ... Verify that the instance name is correct'. Yeah, thanks Microsoft. Actually telling me how to verify the instance name would be a really good move here.
View 1 Replies
Jul 22, 2010
how to make the formatting also apply to the ASP.NET server side tag <% %>
Like the related question, a block like this one
Good
<ul id="menu">
<li><%: Html.ActionLink("Home", "Index", "Home")%></li>
<li><%: Html.ActionLink("About", "About", "Home")%></li>
</ul>
Will get formatted into
Bad
<ul id="menu">
<li>
<%: Html.ActionLink("Home", "Index", "Home")%></li>
<li>
<%: Html.ActionLink("About", "About", "Home")%></li>
</ul>
I want to prevent Visual Studio from changing the formatting concerning asp.net server tag <% %>.
View 1 Replies
Apr 12, 2010
I am using visual studio 2005 (and team explorer 2005) with tfs 2008. I have installed both Visual Studio 2005 SP1 and VS80sp1-KB932544-X86-ENU.exe.
I perform the following steps:
Select Project->ASP.NET Configuration within Visual Studio 2005. Within Visual Studio 2005, attempt to perform either a check-in or a checkout.
The following happens:
The local server started by Visual Studio starts closing itself. I suspect it is crashing; the systray icons are not properly disposed of. It then reopens itself. It does this over and over again, maybe once every second or two. The TFS progress meter doesn't even budge, it just sits there. Canceling out of the checkout does not work; it says it is cancelling and does nothing.
View 1 Replies
May 27, 2010
Sometimes i move files and folders by mistake. Is there a way to prevent this. Something like putting a "lock" on the position of files and folders?
View 6 Replies
May 4, 2010
When writing inline code in an .aspx file and some lines down closing a statement with <% } %>, Visual Studio tries to be nice but messes it up by rewriting it all. Is there any way of turning this rewriting off, but only for inline code?
View 2 Replies
Mar 4, 2010
If I have the following in an ASP.NET Web Form:
<asp:TextBox runat="server" ID="tbxUser"/>
and I copy and paste that line in the same page, I usually get the following:
<asp:TextBox runat="server" ID="TextBox1"/>
Obviously, nobody is going to name their controls in that way (if you don't want to name a textbox, simply don't asign an ID to it), and it's not nice having to change the ids of pasted controls. The same happens if I copy a control without an explicit ID, VS simply generates one for me. Is there any way of preventing VS from autogenerating IDs when I copy-paste ASP.NET code?
View 1 Replies
Mar 10, 2011
I'm using Visual Studio 2010 and working on an ASP.NET 4.0 web application. At the moment, a co-worker and I are tweaking CSS, which means constantly changing and saving CSS files and then refreshing the running page in a web browser.Every few saves, the application restarts, causing a considerable delay while we wait for the app to start up, log in again, and return to the page we were working on. In an IIS production environment a CSS file wouldn't go through the ASP.NET ISAPI, but apparently when running with VS2010 and the developent web server this doesn't matter... or something.
View 2 Replies
Jun 22, 2010
at vs2008 i could set App_Code folder, but at vs2010 i can not do it, that's why i put my dataset's and class' to App_Data folder. Either I do not know even App_Data folder is secure?
View 4 Replies
Jan 21, 2011
I know you can add an existing item(s), but is there a way to add an Existing folder (and contents) to a project? It sucks without this option. I need to add a folder that has many folders and a lot of content.
View 1 Replies
Jan 2, 2011
After i delete some files from my system to save space on my hard disk ::i face the following problem each time i click on any project exe the application data folder for visual studio cannot be created how to fix this problem?
View 1 Replies
Sep 29, 2010
I have a few questions regarding the "special" ASP.NET folders in Visual Studio web projects.
Adding an App_Data folder in Visual Studio is present, but grayed out in my C# web project, why?
What are the meanings of the various ASP.NET "special" folders?
App_GlobalResources App_LocalResources App_Data App_Browsers Themes - I know this is used to contain stylesheets for a particular theme and is then specified in the web.config or page (if I remember right).
App_Code - Were these classes that were pre-compiled? Do these ASP.NET folders retain their special meaning if you manually create a folder with the same name instead using the "Add ASP.NET Folder" feature in Visual Studio?
View 4 Replies