I have a piece of code that is just HTML. It was previously created as a user control. Within the application i'm working with there are two seperate websites that are interlinked to make one website. There is a documents section where users do not need to login and a data section where users need to login. The design was implemented long before I was hired. My problem is I want to use the code from the documents website with the data website but I can't seem to register the control. I only one this piece of code in one place so when it is updated it doesn't have to be in multiple places. I tried setting "src=http://website/doc/doc.ascx" but this errors out saying
I've seen some teams that start breaking into multiple projects from the beginning and others build behemoth single projects. The large project teams say that one massive project is easier to maintain than multiple smaller projects.
I just moved to a new PC and installed VS 2010. I copied all of my websites over from the old machine and now when I open the old websites on the new machine, they do not show up in my recent projects list on the start page. New websites that I make do show up there but the old ones do not. This is very inconvenient. Is there a way to make old projects that I open show up in the list?
This brings up another question. Is there a way to make a shortcut that will open VS2010 up with a website already loaded so that I don't have to go through the file open dialog every time?
i am still relatively new to web development and have been encountering some issues when multiple users click a button at the same time.
i was wondering what could be causing this as i have already removed all static variables realiseing that was a mistake and replaced them with viewstates were needed then sessions when moving across pages
So I've create a solution with multiple projects... one is for my website, the other for my data. I've added the reference and everything seems to be working just fine. Until now...
I recently created a model.edmx for a table and a stored procedure. When I trying and create a variable of that model, I get this error:
The type 'System.Data.Objects.ObjectContext' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
I'm assuming this is because I'm using multiple projects.
I'm looking at doing a pair of MVC applications. One of the application will be a public website and the other for a POS kiosk. There will be some common views between the two applications. I'm considering having a single Visual Studio solution that will contain the two projects. But, I'm not sure how I can go about sharing the common views between the two projects, without just copy and pasting.
Is there way of doing it? Or should I be looking at using a different approach?
I am trying to add multiple CSS files across several projects and have added them as a "link" but when I build my solution it does not copy the files. Is there any way to share a bunch of CSS files across several projects?
I am attempting to setup Config Transforms on my project that I migrated to VS 2010. The web project works just fine, but I have a WCF Host project that I seem to be unable to add transforms.
I currently have an ASP .NET MVC / EF4 project that contains many pieces of autonomous functionality such as a blogging, events, contests, wiki, etc.
The entities used by each system are all mapped to my database through one giant EDM file.
This works well for the main site, but I also have a few personal sites where I want to reuse just the blogging functionality from the mains ite.
My biggest problem is that due to the mac daddy EDM file, my blog sites have to constantly have their database schemas updated to reflect changes made to areas of functionality that they don't use (i.e. changes to the events system).
The only other gotcha is that there are some entities (Users and Tags) that have relationships with entities from each area of functionality, making it hard to simply split each area of functionality off into its own EDM.
With all of this said, I'm trying to figure out the most efficient way to set this up.
Should I go down the road of splitting up the EDMs by each area (blogs, events, contests, wiki) and figuring out a way to maintain relationships for the User and Tag entities?
Or should I just perhaps be creating an EDM for each website that only maps the entities that it will actually need? The only problem with this is that my repository layer takes in a UnitOfWork/ObjectContext, and by creating new ObjectContexts for each site I'd have problems reusing my repository code.
If MVC application has multiple projects (The solution may grow large in future). These projects may share controllers such as application controller accouts controller and there may also be a situation in which namespace of one project is shared by other project. What is the best way of implementing such solution. One approach may be to use areas.
Now, I've refactored my code to have a data layer, business layer and the main project as the view layer. Next I'd like to split this big project smaller projects based on discrete functionality. As I understand it, one way to handle a shared masterpage is to copy it into each project, that's not the worst thing, it hasn't changed in over a year and if it does it's easy enough to propagate the changes out to the other projects.
I was also reading that I could create an assembly from my master page and share it that way. My masterpage.aspx has a reference to a asp.net sitemap, Unlike the masterpage I'd like to maintain only one site map if possible.
I am currently extending the NopCommerce solution for a client and have some general questions about workflow, since this is a relatively large solution for me (50+ projects).
I want to add some classes to the DAL, BLL, and so forth.
What would be the recommended process for this workflow? For example, I created a class in the DAL -> ran build. Then I created a test.aspx page in the main project which instantiates this class -> ran build; however, adding just one line of code causes the solution to rebuild all other projects such as payment modules, which makes the process tedious.
Am I approaching this in the correct manner? I have read about: creating a seperate solution with relevant projects; is this the recommended approach?
I need to create a sample project (for educational purposes) and I'm faced with the choice between Web Site Projects or Web Application Projects. This feels similar to the choice between C# and VB. My question isn't about the differences between these 2 choices, but rather which is more popular (relevant, recognizable) to the general ASP.NET community.Has anyone seen any statistics in terms of adoption/usage of these 2 different project types? What project type should I use to reach the widest audience?Update: I created a poll on this subject - http://poll.fm/2e6cy
I have a multi-tiered application. I would like to publish the class libraries to UI developers to let them add to their web or windows projects to add all the functionality.
I would like to restrict access so only a certain project can be referenced. The reason is so that they do not refer to the data access layer directly and start making calls that would bypass the business logic built into the business tier.
UI->>Business Logic->>Data Access
So in other words, BL and DA are deployed as compiled assemblies. BL references DA. UI will reference BL, but I would like to strictly prevent any other project from referencing DA directly.
We have a solution with multiple web projects, and there are some pages that should be present in several of them. So we'd need some sort of a shared project which contains aspx files, and which can be referenced by other web projects.
Now there are a few implementations out there:
One implementation described by ScottGu which involves building the shared project, and than copying the output aspx into the host project, and referencing the dll of the aspx. This method has the disadvantage that if the apsx gets modified it must been recopied.
Another option, based on David Ebbo's post would be to convert the aspx into ascx-es which can be referenced as custom controls, and than include those custom control aspx-es into the host project inside of some placeholder pages. (This solution seems to be the most promising) But the concerns are: can all apsx pages transformed into an ascx? I mean there's no Page.LoadComplete to give an example.
And yet another option is to use virtual directories that map into the shared webproject, as described in a Microsoft KB article. The problem again with this method is that the shared aspx-es must be in predefined directories(that is the virtual directory). If the name of virtual directory overlaps a physical directory, the virtual overrides it and no pages from the latter can be used. Is it perhaps possible to merge these two together?
I am creating a asp.net project that have one master page for all pages?Why my object's name for example my div with ID="div1" is changed to ctl00_ div1 when this object is in master page?
I have a page where I have 20 textboxes, each indicating a name that I need to go through. Rather than having 20 sets of code, I would rather loop through, something like this:
Code:
[code]....
But it fails to find execute when I hit it, Object reference not set to an instance of an object."
Is it possible to look into multiple virtual directories, using a single web application?
I'm trying to develop a web app; which can create a site, save this site to a virtual directory in the same server, and make changes (i.e. add/edit webpages).
The web app will handle multiple domain names (IIS will handle the bindings going into the single web app), which are routed by the web app to their respective virtual directories.
This works great, but there are a few values that I need to store on each panel within the loop. I need to be able to access these values in both c# and javascript, once the control is rendered on the page. What would be the best way to achieve this? I've used the Tag property before on some controls, but a Panel doesn't have one.