 |
BOOK: Beginning ASP.NET 4 : in C# and VB
 | This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|
|

February 25th, 2011, 03:40 PM
|
|
Authorized User
|
|
Join Date: Feb 2011
Posts: 23
Thanks: 7
Thanked 0 Times in 0 Posts
|
|
Custom Code Formatting
Hi All
Just getting started with .net and the book.
On both computers where I have Visual Web Developer Express 2010 installed the formatting does this to a h1
<h1>
</h1>
when I want it to do this.
<h1></h1>
which is contrary to what it appears to do in the book examples.
On page 25 it explains that I can change code formatting in Tools|Options (show all) Text Editor | HTML | Formatting | Tag Specific Options
However, I can find no where to change the formatting for H1.
I'd be surprised if this is the correct default but I did a default installation on both of my computers.
How can I get it to work the desired way as I showed above?
Last edited by floridaguy; February 25th, 2011 at 03:44 PM..
|
|

February 25th, 2011, 04:18 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi there,
Using that same dialog you mentioned, you can add tags to the list if they don't exist. Simply create a new entry, enter h1 as the tag name and configure it as you want. Then, optionally, repeat this for h2 through h6.
Cheers,
Imar
|
|

February 25th, 2011, 04:28 PM
|
|
Authorized User
|
|
Join Date: Feb 2011
Posts: 23
Thanks: 7
Thanked 0 Times in 0 Posts
|
|
Thanks Imar.
Is is supposed to do this...
<h1>
</h1>
instead of this...
<h1> </h1>
by default? If so, do you know why?
|
|

February 25th, 2011, 04:31 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Yes, I think it has as its default to put opening and closing tags on separate lines.
Take a look at the formatting dialog for the h1 you created and you see options to configure line breaks and indenting. Just chose the option you like best.
I prefer <h1>Content</h1>
Cheers,
Imar
|
|

February 25th, 2011, 04:39 PM
|
|
Authorized User
|
|
Join Date: Feb 2011
Posts: 23
Thanks: 7
Thanked 0 Times in 0 Posts
|
|
I haven't made it very far in your book yet. Is there a way to export/import those customizations so I don't have to do it on both computers?
|
|

February 25th, 2011, 05:09 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Yes; chapter 1 shows how to Import / Export / Restore your settings.
Cheers,
Imar
|
|

February 25th, 2011, 06:23 PM
|
|
Authorized User
|
|
Join Date: Feb 2011
Posts: 23
Thanks: 7
Thanked 0 Times in 0 Posts
|
|
Well, that's embarrassing. Guess I flunked the pop quiz. I will go back and reread. I thought I remembered something like that but couldn't find it when I looked.
I did get the custom h1 tag to work as desired. Thanks.
Your book is clear and easy to understand, thus far, and I like all the neat little things about the IDE that you point out.
|
|
 |
|