0

I have created a template server control which is responsible for rendering out all the reusable markup across multiple projects like: doctype, script and style references, html, head and body tags.

It uses ITemplate for the <content> property, so a developer can drop the template on the page and put their content in.

However, because the <body> tag is created by the control, the <content> property has no intellisense.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Demo.aspx.cs" Inherits="PageExamples.Examples.Demo" %>    
<Template:Standard runat="server" pagetitle="Page Title">
    <Content>
       no intellisense here...
    </Content>
</Template:Standard>

I basically want to put any tag that is valid inside a <body> tag inside <content> but I'm unsure what I need to do to get Intellisense to understand it.

Stuff I have tried:

Rename the <content> property to be <body>. This effectively tricks VS into thinking this is an actual body tag. However, there is no intellisense for other templateable properties which have been left off to simplify the example.

Community
  • 1
  • 1
Chris Spittles
  • 15,023
  • 10
  • 61
  • 85

1 Answers1

0

It happened to me like this. I added dll server control to bin folder of my project and intellisense worked. Maybe it works for you too.

Ali Soltani
  • 9,589
  • 5
  • 30
  • 55
  • Thanks for the response, I can get intellisense if I type between a `` tag, I just don't get it if I type inside my custom `` template; I presume because the schema doesn't recognise it as a valid place to add it because its not inside a `` tag. – Chris Spittles Aug 15 '17 at 10:49