J
John Wallace
Hi,
I have a class, derived from "Control" which I can include on a page
using:
<tag:MyControl attr1=value></tag:MyControl>
My questions are:
1. What's the best way to programatically add this reference to pages
on the server - to the actual source file as opposed to generating it
upon page request?
2. What's the best way to parse source code like this and RETRIEVE all
such references, to interrogate the attributes?
3. Are there any classes that will let me build a well-formed
reference (like the one above) - as opposed to just concatenating the
string manually!
e.g. If the following aspx page is uploaded:
<%@ Page language="c#" Codebehind="NewPage.aspx.cs"
AutoEventWireup="false" Inherits="NS.NewPage" %>
<html><head></head>
<body>
Some Text
</body>
</html>
It should change to this:
<html><head></head>
<body>
<tag:MyControl attributes...></tag:MyControl>
Some Text
</body>
</html>
I have valid reasons for doing this! Obviously I can use string-based
methods to update the source but I'm sure there's a better way
Thanks.
John
I have a class, derived from "Control" which I can include on a page
using:
<tag:MyControl attr1=value></tag:MyControl>
My questions are:
1. What's the best way to programatically add this reference to pages
on the server - to the actual source file as opposed to generating it
upon page request?
2. What's the best way to parse source code like this and RETRIEVE all
such references, to interrogate the attributes?
3. Are there any classes that will let me build a well-formed
reference (like the one above) - as opposed to just concatenating the
string manually!
e.g. If the following aspx page is uploaded:
<%@ Page language="c#" Codebehind="NewPage.aspx.cs"
AutoEventWireup="false" Inherits="NS.NewPage" %>
<html><head></head>
<body>
Some Text
</body>
</html>
It should change to this:
<html><head></head>
<body>
<tag:MyControl attributes...></tag:MyControl>
Some Text
</body>
</html>
I have valid reasons for doing this! Obviously I can use string-based
methods to update the source but I'm sure there's a better way
Thanks.
John