namespaces

C#: How to convert a Website project to a Web Project

UPDATE: All of these problems was for converting a Website application to a Web Project in Visual Studio. Once I dug in and I found the solution, as I marked as answer below. Basically, if you are wanting to upgrade/move your Website project to a Web Project, you will run into a number of errors. The short how-to is in the answer belo...

XML default namespace issue

Hello everyone, Suppose I have the following XML schema file and the following XML document file. I have two questions, Since there is no target name space specified in XML Schema file, what namespace will Information element in? In the XML document file, when using Information, which namespace does it belong to? Please notice in this...

Subsonic 3 - Namespace hidden - Probably me!

Hi, It's Friday so I'm prob doing something stoopid here. In fact I'd put money on it. I'm playing around with Subsonic - got my feet happily into v2.2 but intrigued by v3 alpha Followed Rob's webcast, did as he did, watched T4 generate the code, went to use the new namespace and oh. No namespace. I can see the namespace Test.Data ...

is namespace checking in xml string or URI based?

I always wondered how an XML parser handle the check of a URI namespace. is it string based, or URI based? in other words, this is the standard URI for SVG xmlns="http://www.w3.org/2000/svg" suppose that I write instead xmlns="http://www.w3.org/2000/../2000/svg" or xmlns="http://www.w3.org/2000/svg/" or even xmlns="http://www....

Postgresql: is "public." an standard way to fully qualify table name in Postgresql?

If i don't qualify a "public." on account_category table, *out account_category* will have a conflict with account_category table name. Does "public." also works on other rdbms? CREATE OR REPLACE FUNCTION X_RAIN(x VARCHAR, OUT user_id VARCHAR, out account_category varchar, out depth int) returns setof record AS $$ BEGIN return qu...

which namespace does element belong to in XML?

Hello everyone, Suppose I have the following XML document, which has no default namespace defined, and "Information" element is not prefixed with any namespace prefix. My questions are, 1. what is the namespace element "Information" belong to? 2. is there any way to apply XML schema check against "Information" element (for example, I wa...

how i can list out all the namespace in XML?

hi My basic requirement is to get element value from the XML file, i have used XMLDoxument.SelectSingleNode. My XML file contains some Namespace in header, so i have used NameSpaceManager to add namespace-prefix and i have used prefix to get that particular element. Now in my XML files that namespaces are getting vary, i don’t want to...

Namespace and Sub Namespaces

Is there a way to use a namespace and then have it automatically use all sub namespaces? Example: namespace Root.Account { //code goes here } namespace Root.Orders { //code goes here } //New File: using Root; In order for me to use the code in Root.Account, I would need to add using Root.Account to my code. I would like to be abl...

What is the best way to approach creating a corporate .Net Namespace framework from scratch?

We are migrating our applications to VB.Net 2008 from Classic VB and I need to create a base namespace and business layer. My method of approach is going to be to visit our top BA and identify the common areas of our (Fixed Income) company and try to form a decent inheritence model with as much of the code in generics as possible. What'...

Resolve CLR Type from DataContract.Namespace?

Hello, I'm a newbie whitebelt with WCF. I have a namespace: http://schemas.datacontract.org/2004/07/System/ArgumentException. I'm looking to take that string and convert it into a CLR type so that I end up with typeof(ArgumentException). Is this possible? :) Thank you, MichaelD ...

Non-(X)HTML Attributes... any disadvantages?

I've generally tried to stick with DOM-only attributes when writing Javascript. Now that I've switched from Prototype to jQuery, I can get some serious mileage out of adding my own attributes to various DOM elements, mostly in the realm of being able to set up a very readable coding convention for handling AJAX requests. As a short exa...

foo.com/alice vs. foo.com/users/alice

It's of course nice to give users friendly URLs for their content on your site. But how best to do that? There are a lot of advantages to something like foo.com/users/alice, most importantly that you aren't cluttering up your root namespace. But I think simplicity for users trumps all that. A lot of big sites seem to agree (friendfee...

Does C# Support Project-Wide Default Namespace Imports Like VB.NET?

I am a recently converted VB developer to C#, but there is one thing thus far that I haven't been able to find. In VB when I setup a new project I can specify the namespaces used in the project and add them to the default imports for all classes (so everything automatically has them as if I added "Imports System.Data.OracleClient" to eac...

namespace doesn't exist

Hi I would like to try out a code in Microsoft Visual C# Express Edition and I'm getting this error: The type or namespace name 'Properties' does not exist in the namespace 'EducationalSuite.Core' (are you missing an assembly reference?) I right click the Reference but I didn't find the "Properties" either the "EducationalSuite.Core"....

C#: Xml-documentation for a namespace

Would you write xml-doc for a namespace? And if yes, how and where? I would think, if it is possible, maybe an almost empty file like this: /// <summary> /// This namespace contains stuff /// </summary> namespace Some.Namespace { } But will that work? Since you... "declare", or at least use the namespace in all the other files as we...

My linq-query doesn't work when adding the xmlns-attribute to the root-element in my XML-document

Hi I'm trying to get more into LINQ-to-XML, so I've made myself a neat little example XML-document to try things out on. In addition, I tried (and successfully) made my own XML-schema for that file, just to test things out. The XML-document is pretty straightforward, and pretty much looks like this: <cars xmlns="/carsSchema.xsd"> <ca...

.NET namespaces and using statements

What is the difference between namespace x { using y; } and using y; namespace x { } ? ...

What the difference between a namespace and a module in F#?

I've just started learning F# (with little prior experience with .NET) so forgive me for what is probably a very simple question: What the difference between a namespace and a module in F#? Thanks Dave Edit: Thanks for the answer Brian. That's what I wanted to know. Just a clarification: can you also open a namespace as well (similar...

ASP.NET MVC How to specify which folder the View pages reside in?

Hi, by default the ASP.NET MVC engine searches the following folders for View pages: /Views/{Controller_Name}/{Action}.aspx /Views/Shared/{Action}.aspx However I want to put some of my View pages like this: /Views/{Namespace}/{Controller_Name}/{Action}.aspx How can I let the engine look for this? ...

How do I reference an external C++ namespace from within a nested one?

I have two namespaces defined in the default/"root" namespace, nsA and nsB. nsA has a sub-namespace, nsA::subA. When I try referencing a function that belongs to nsB, from inside of nsA::subA, I get an error: undefined reference to `nsA::subA::nsB::theFunctionInNsB(...)' Any ideas? ...