syntax question

  • Thread starter Thread starter suzy
  • Start date Start date
S

suzy

what does the following toolboxdata syntax mean? and is there a name for it
so i can read up on it?

namespace Wilson.MasterPages

{

[ToolboxData("<{0}:ContentRegion runat=server></{0}:ContentRegion>")]

public class ContentRegion : System.Web.UI.WebControls.Panel
 
Suzy,

From what I can tell, it probably is a string passed to the static
Format method on the String class. I imagine it is there so that a
namespace alias can be placed in there instead of a full namespace name.

Hope this helps.
 
suzy said:
what does the following toolboxdata syntax mean? and is there a name for it
so i can read up on it?

namespace Wilson.MasterPages

{

[ToolboxData("<{0}:ContentRegion runat=server></{0}:ContentRegion>")]

public class ContentRegion : System.Web.UI.WebControls.Panel

Yup - that's an attribute. See "Attributes" in any good C# book for
more general information, and ToolboxDataAttribute for exactly what
that particular attribute means.
 
its an attribute used by the VS ide toolbox. It identifies the default html
tag to generate when a control is placed on the form.

-- bruce (sqlwork.com)
 
Its a C# language feature called Attributes. Allows you to to provide
metadata to your classes/methods/properties etc.
what does the following toolboxdata syntax mean? and is there a name for it
so i can read up on it?

namespace Wilson.MasterPages

{

[ToolboxData("<{0}:ContentRegion runat=server></{0}:ContentRegion>")]

public class ContentRegion : System.Web.UI.WebControls.Panel
 
Back
Top