> The ASP.Net Page class is a class. You can't just put a block of code
> anywhere you want to in a class. It has to go inside a function, suc
> as the
> Page_Load Event Handler.
Hmmm, I guess when you put it like that it explains a few things bu
makes life a whole lot more difficult, or at least a change in attac
method!
I come from an ASP/PHP coding background and am used to be able to jus
inject server generated stuff anywhere I like. I'm going to try and ta
along with this thread because I'm experiencing the exact same issue a
the minute.
I have written a user control which basically just creates a nic
themed box in the style of my site, the content for the control i
placed within the tags, everything works fine until I add <% %
anywhere like so:
Code
-------------------
<Box:ShadedBox Width="90%" BoxTitle="Registration" runat="server">
<%="hi" %>
</Box:ShadedBox
-------------------
And the page falls over with the error "Code blocks are not supporte
in this context". Is there any way of injecting server side code int
this section WITHOUT resorting to using the page_load method? I want t
be able to keep some of my code in the aspx file rather than the aspx.c
code-behind file.
Regards,
Anthony William
--
ant17
-----------------------------------------------------------------------
ant177's Profile:
http://www.highdots.com/forums/m156
View this thread:
http://www.highdots.com/forums/t63805