T
TEN TOD PSA
you can trick ASP.NET into letting you declare methods with code blocks
(how anybody can survive without this i have no idea - in classic asp i
haven't written any html outside of a sub/method in 8 years - ASP.NET seems
to be going backwards in some respects)
(seems to me using Classic ASP but accessing the juicy .NET framework
features via COM Interop is a better choice than actually using ASP.NET)
in your aspx page do this:
(start)
<%
}
void RenderHTML(System.Web.UI.HtmlTextWriter __output) {
%><%="what ever you want"%><%
(end)
explanation follows:
(inside a code block)
<%
(close the render method with a brace)
}
(declare a new method which takes the hidden output object)
void RenderHTML(System.Web.UI.HtmlTextWriter __output) {
(use a codeblock inside the method)
%><%="what ever you want"%><%
(omit the closing brace - asp will put it in for you thinking it is closing
the render method)
(end)
you can call your new method as follows:
RenderHTML(__output);
(how anybody can survive without this i have no idea - in classic asp i
haven't written any html outside of a sub/method in 8 years - ASP.NET seems
to be going backwards in some respects)
(seems to me using Classic ASP but accessing the juicy .NET framework
features via COM Interop is a better choice than actually using ASP.NET)
in your aspx page do this:
(start)
<%
}
void RenderHTML(System.Web.UI.HtmlTextWriter __output) {
%><%="what ever you want"%><%
(end)
explanation follows:
(inside a code block)
<%
(close the render method with a brace)
}
(declare a new method which takes the hidden output object)
void RenderHTML(System.Web.UI.HtmlTextWriter __output) {
(use a codeblock inside the method)
%><%="what ever you want"%><%
(omit the closing brace - asp will put it in for you thinking it is closing
the render method)
(end)
you can call your new method as follows:
RenderHTML(__output);