A customer has passed us some docs to aid us in styling up our product (asp.net 4.0 web forms) to match their corporate website. Bread and butter stuff.
In one of the markup samples they provided, they’re using tags that look to be pulling a html fragment into the page using JS.
Markup looks like this:
<server>
var client = new HttpClient();
client.sendRequest("http://www.fakedomain.info/foo.html");
if(client.content) write(client.content.toString());
</server>
Visual Studio puts up an ‘Element is not supported’ validation warning on the tags, and I’ve only managed to find one place on the net that agrees this is a valid HTML element.
When we run the app (through IIS), the contents of the tag are rendered as text.
We’ve got workarounds, but I’m curious about what this element is and why IIS is refusing to render it.
Thanks in advance.
<server>is not a valid HTML element, nor is it defined in ASP.NET code.Your client is not using IIS – the documentation you linked to seems to suggest they are using a Netscape web server which understands this element.
I would also guess they are using Javascript as the server side language – again, not something native to IIS.
You can convert it to IIS server side code and preserve the meaning using normal C#.