T
tony collier
I have the following in one of my .aspx pages:
.....
<script runat="server">
enum bookstores
{
Amazon,
Blackwells,
ComputerManuals,
ComputerBooks
};
void Page_Load(Object sender, EventArgs e)
{
// DECLARE VARIABLES
.....
}
</script>
can someone tell me why the above works fine, yet if i put the enum
declaration IN Page_Load function above // DECLARE VARIABLES I get:
Compiler Error Message: CS1513: } expected
Line 10: void Page_Load(Object sender, EventArgs e)
Line 11:
Line 12: {
Line 13:
Line 14: enum bookstores
error on line 12 ?
Thanks to anyone who can throw light on this
.....
<script runat="server">
enum bookstores
{
Amazon,
Blackwells,
ComputerManuals,
ComputerBooks
};
void Page_Load(Object sender, EventArgs e)
{
// DECLARE VARIABLES
.....
}
</script>
can someone tell me why the above works fine, yet if i put the enum
declaration IN Page_Load function above // DECLARE VARIABLES I get:
Compiler Error Message: CS1513: } expected
Line 10: void Page_Load(Object sender, EventArgs e)
Line 11:
Line 12: {
Line 13:
Line 14: enum bookstores
error on line 12 ?
Thanks to anyone who can throw light on this