Thanks but I've sorted it by by following these steps:
1. remove the "USE database" statements at the start and end of the sql server generated query
2. create a mdf file by right clicking the...
Type: Posts; User: garry79
Thanks but I've sorted it by by following these steps:
1. remove the "USE database" statements at the start and end of the sql server generated query
2. create a mdf file by right clicking the...
I've got a SQL file from a previous database I exported from a SQL Server via SSMS. Now I want to create an mdf file from it in visual studio. I've tried running a sql query but it doesn't work as...
I'm only using VS, none of these are hosted right now. Maybe it could be a problem with the SQL Server at the university, which the web server connects to, but I don't have rights to tinker about...
I've been debugging a MVC project that connects to a WCF project using VS development server and started getting "Server too busy" message, or words to that effect, in my browser window. After about...
Thanks mate, I did it a different way, using some logic in the code you posted first. Like this:
I want to copy the typed list to implicit objects.
Hi,
I need to build an array of implicit objects in a var object by looping through a List and adding the to the array. For example...
var data = new[] { new { Name = "China",...
I give up, I'm just going to submit the assignment as is. It's probably something to do with the way I've published the website and it mixing MVC with non MVC but hey-ho. Thanks again for your help,...
My solution consists of a Web Application project and a MVC project. I've just found that if I publish both projects I get "the resource cannot be found" if I don't explicitly type default.aspx. If I...
I've uploaded my project to the university server and noticed this issue started up. I don't have access to any web server settings or anything, just my web space that's on there. I've tried renaming...
I'm not sure what I did to cause this but my website homepage won't load unless I specifically type the filename into the root of the website - i.e. www.mywebsite.com/default.aspx works but...
Thank you, Jason. I will give this a go and see how I get on :-)
I'm using a datalist that uses an itemtemplate to display results from an objectdatasource. The thing is, I'm only fetching a single record so a datalist doesn't seem like the best option. Is there a...
Do you know any good links that can help me to do this? I don't want to start again as it's for an assignment and I won't have time to implement everything in MVC.
I have an MVC project and a separate Web Application project. How can I link the two together. Currently, when I try to open a page in the MVC project from the main project I get a 404 error. They...
Hello,
I have a page for products which links to another page for a more detailed page for a specific product the user selects.
In design view, I've attached a objectdatasource and datalist in...
Thanks mate! This makes a more sense now I've added the ShoppingCart directory in the views folder.
I'm not sure what you mean. I placed the view in the Views>Shared folder and it worked but if i place in the Views folder I get the error. This is the URL I use:...
Ok, I've added the view to the shared folder of the Views folder and the view works now but why won't it world from the top level folder?
Hello, I've been following a tutorial in developing an MVC shopping cart but I get the following error when i try to access the controller class:
The view 'Index' or its master was not found or no...
I've recently upgraded to VS2012 Ultimate to VS2012 Ultimate and I can't add an Entity Framework item to the solution I'm working on.
I've added EntityFramework via the NugetManager and also the...
I've instantiated a new Users entity and attached an new Avatars entity to it. The primary and foreign key in the Avatar table is UserID and the primary key in the user table is UserID.
When I...
Thanks, I got around this issue by storing the images in the App_Data folder and then getting the path that way.
I want to get the file path for the current file in the project file. I've tried various approaches but they all point to the folder in the IIS that the site is executing in. The reason I need this...
I've recreated the DAL and it works now
Thanks
I don't remember how I generated the connection string. The error continues to pop up. It's so annoying because it doesn't point to the code. How am I supposed to find the error if it doesn't point...
Thanks for your comments!
I've changed the constructor to this, to try to get the path from the web config file:
Public Sub New()
...
I should have pointed out that the New MilkywayDataContext() contained a ConnectionString parameter from My.Settings previously. I've deleted this setting and the compiler now points to this code:
...
Hi, I'm trying to connect a Linq-to-SQL context to a database with a relative path using DataDirectory but I get the following error:
"You need to specify the full path to an executable file"
...
Hi, I've reinstalled windows on a new hard drive using an AlienRespawn Restore backup disk which seems to have gone ok. However, when I try to install SQL Server Management Studio as administrator I...
I've installed VS 2012 Pro followed by SQL Server 2012 Express. I then joined one solution to another so they share the same APP_DATA folder. Both projects have SQL server mdf databases in the...
I've reinstalled vs and I'm still getting the same error :mad:
Same error again :afrog:
Hi mate, I've tried reinstalling it a few times and enabling NuGet 1.6x and 1.1x and still get the same error. I'm going to try installing 2.1 and see what happens :)
I've created a sql server database in the App_Data folder and a new class library DLL. In this DLL, I've tried adding an ADO.NET Entity Framework Model based on said database, but when I click to...
I made a change to the underlying database model which meant I had to update the linq-to-sql model also. It works fine now.
Now I'm getting the following error on the webpage with the same code :
I've created a sql server in the App_Data folder of my solution. I then created a linq to sql dml in a class library and copied the folders across.
From a Web Form on load method in the root...
I have a master page, sub master page and content page.
The master page has a form control which both masters can access by name alone:
<form id="form1" runat="server">
The content...