0

We've developed our custom .Net Server Control for our ASP.Net project use. It allows users to put HTML/Javascript code into its inner text node. The problem is, when the user is inputting the HTML/Javascript inside the server control, they can't benefit from the built-in intellisense of the Visual Studio. How can we change the implementation of the server in order provide that?

Thanks.

--- EDITED --- For example: The tag for the self-developed server control is , I mean the intellisense for the inner html/javascript in it, for example

<MyServerContol>
    var str1 = 'hello world';
    console.log('Msg is ' + str1);
</MyServerControl>
William X
  • 6,751
  • 6
  • 31
  • 50

1 Answers1

1

You can mark the public properties of the control with Browsable(true) attribute. That way visual studio will show it in intellisense.

you have to import / using System.ComponentModel where browsable attribute class is.

Prashant Lakhlani
  • 5,758
  • 5
  • 25
  • 39
  • Thanks, your answer means to wrap the server control as part of the intellisense in the application scope; but I'm asking the provide intellisense in the inner text of our server control. – William X Nov 15 '11 at 02:36
  • Hi, in general cases, asp.net user controls are not built like this, if you want to support templating in user controls, you have to do something like - http://weblogs.asp.net/scottgu/archive/2006/06/04/Supporting-Templates-with-ASP.NET-User-Controls.aspx let me know if you need more help – Prashant Lakhlani Nov 15 '11 at 05:31