开发者

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.

  1. How do I make it such that it sh开发者_运维问答ows up in intellisense?
  2. 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.


  1. You can't control intellisense. It should show up, but rarely does if ever, at least for me.
  2. 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜