Brian Hooper
Brian Hooper

Reputation: 22074

What does "##" mean in this ASP.NET file?

I'm maintaining a C# ASP.NET application and I have come across the following little snippet in a .aspx file.

<body>
    <form id="form1" runat="server">
    .
    snip
    .
    <ComponentArt:DataGrid id="Grid1"
    .
    snip
    .
        <ClientTemplates>
            <ComponentArt:ClientTemplate Id="DataCellClientTemplate">
                ## Grid1_GetEditContent(DataItem) ##
            </ComponentArt:ClientTemplate>
            .
            .
            .

(The function Grid1_GetEditContent() is defined in the JavaScript at the top of the file.)

I was wondering what the "##" means here? Does it mean the function could be invoked from some activity or other on the screen? (I may have to fiddle with this and I'm trying to detect all the mines without treading on them.)

Upvotes: 0

Views: 1584

Answers (2)

Damith
Damith

Reputation: 63105

'##' delimiters are using on ComponentArt controls.

Ref: Q10081 - HOWTO: Using ClientTemplates in ComponentArt controls

A simple example of a client-side template is one that renders the time on the client when it was instantiated:

  <ClientTemplates>
    ...
    <ComponentArt:ClientTemplate ID="timeTemplate">
      The time on the client is: <b>## (new Date()) ##</b>
    </ComponentArt:ClientTemplate>
  </ClientTemplates>

When the client template is instantiated, expressions defined within '##' delimiters are evaluated and replaced with the result of the evaluation. Any valid JavaScript can be used in client templates.

Upvotes: 5

Royi Namir
Royi Namir

Reputation: 148704

its not related to .net

its an internal token for the componentArt.

This token is used to render some html by logic when created on the server ( this control is SERVER SIDE)

Upvotes: 2

Related Questions