views:

384

answers:

1

I'm looking in Web.Config to add a simple (from a book) amendment -

<configuration>
 <appSettings>
   <add key="SupportEmail" value="[email protected]" />. 
 </appSettings>
</configuration>

However in the web.config I see there is only the following sign/bracket/block(?):

 <appSettings/>

I can't find the opening . And isn't that an incorreect way to write the block?

Or is this a way to tell me I can amend this and add my own opening and closing block?

+3  A: 

You can indeed amend it (the format /> is a self closing tag which is valid if theres nothing in it)

AJM
I take it that it's a known shorthand to mean 'this is where the block would sit if you had anything to put into it'.
Mike
Yes it's just a bit easier to write when theres nothing to put in it.For example in XHTML <br /> is obviously easier to type than if you were forced to type <br> </br> (which would be wrong anyway!)
AJM
@Mike: Yes, it's the XML way of saying just that.
R. Bemrose