Have asp.net base page property show up in @Page attribute
I have create a list of public properties in our custom page. However, when I want to assign the property on any aspx file, it does not show in intellisense and when I use it it said it is a invalid attribute of element "Page".
So, 2 question.
- How do I make it such that it sh开发者_运维问答ows up in intellisense?
- Can I set any localize variable as a value of the property in the page directive?
Thanks!
here is the property on my base page:
/// <summary>
/// Robot meta tag
/// </summary>
[Browsable(true)]
public string Robots
{
get;
set;
}
I know that it will still work if I assigned it, but it'll be nice to have intellisense of our UI developers. The more important question is if I can set a localized value on the property within the page directive attribute.
- You can't control intellisense. It should show up, but rarely does if ever, at least for me.
- You cannot set page class properties in the @Page directive that I'm aware of, and if you can, you can't control intellisense in that either.
You should be able to use public properties or methods in the page, even though they don't show up... Could you post some sample code so we can see what's going on?
Thanks.
精彩评论