For Answers, see/post comments

Refreshing Property Window?

In Source view of VS 2005 Standard (for a web page), isn't the property window supposed to update as you select various tags?Mine doesn't.For example, if I have a combo box on my page, and I select it in view, the property window shows properties for the combo box. But, in Source view, if I select the combo box tag, the property window doesn't change.Is this a problem with my installation? Or, is this how it's supposed to work?

11 comments:

Anonymous said...

What doctype does your page have? E.g. what do you see on the line directly after the <%@ Page declaration? And what doctype does the book use?

The number of properties you see depend on the page's doctype...

Imar

Anonymous said...

You mean this: <%@ Master Language="VB" %>

That matches the book.

One difference I DID discover, though, is that the book seems to be refering to Visual Web Developer 2005 Express Edition.

I'm using Visual Studio 2005 Standard. But, I AM using the Web Developer within it. Might that make a difference?

Anonymous said...

No, I meant the line right below that. Didn't know you're using a Master Page.

Imar

Anonymous said...

Ahh. This one?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

It just automatically got set when I created the page.


-Kaprice

Anonymous said...

Yeah, that's the default doc type for every page you add to your web project.

The doctype determines the properties you have available on a page. For example, leftmargin on the <body> tag is considered to be outdated, so it doesn't show up with a modern doctype like XHTML 1.0. Maybe the book is using a different doctype?

Imar

Anonymous said...

Ahh, ok, that clarifies a bit. The doc type does seem to match the book. Odd.

There are a lot of properties that seem to be missing, like TabOrder, as well.

Why would these no longer be considered important?

So, what's considered the modern equivelent to set margins and tab orders?

BTW, thanks so much for your help.


-Kaprice

Anonymous said...

On second thought, it may not be the doctype, but the validation scheme.

On the HTML Source Editing Toolbar there's a drop-down that allows you to select a scheme for validation, like Internet Explorer 6 and XHTML 1. This scheme influences the properties available on your page. With IE 6, you get stuff like LeftMargin, while with XHTML 1 you don't get that.

Most outdated properties have been replaced with CSS, a large subject on it own. If you add a style sheet to your site and reference it in your (master) page, you can influence the margin like this:

body
{
margin: 10px;
}

This gives the body tag a margin of 10px on all four sides.

TabIndex (if that's what you mean with TabOrder) should show up for controls. This page tells you to what HTML elements this attribute applies: http://www.w3.org/TR/html4/index/attributes.html

Cheers,

Imar

Anonymous said...

Imar, you da MAN!

Thank you SO MUCH for that. That was, indeed, the culprit. Changing the Target Schema got me the properties I was looking for.

That's an awfully BIG feature to not be prominent in the books and help files. I've been googling for 3 hours trying to find the solution. I'm really surprised it wasn't easy to find. You'd think a lot of people would have that problem.

Anyway, thank you so much for sticking with me on this. You're a lifesaver.


-Kaprice

Anonymous said...

Imar,

Is the property window supposed to refresh when you select a tag in Source view? The only way I've found to get mine to refresh is to switch to Design view and select the elements there.


-Kaprice

Anonymous said...

You're welcome.

Now that you know where to find that feature, make sure you use it wisely. Targeting Internet Explorer as the validation scheme probably isn't a wise thing to do. The default doctype is XHTML 1, so it's a good idea to use XHTML 1 as the validation scheme as well. That way, you can't accidentally set properties that are (no longer) supported in XHTML 1.

That way, you'll find it easier to create cross browser pages that work in IE, FireFox, Opera and other browsers and that are easy to maintain as well (something like the body margin is something that belongs in a separate CSS file so it applies to all pages in your site without repeating (and thus maintaining) it in every page where you need it.)

Cheers,

Imar

Anonymous said...

Yes, it is. Although it can be a bit slow at times....

Imar