S
Steve Richter
I have a .cs file that contains the c# script of a page:
<script language="c#" runat=server src="item.cs"/>
The file item.cs contains c# code that contains a namespace:
namespace ItemPages
{
public class ShowItemToCust
{
public static void Redirect(System.Web.HttpResponse InResponse,
int InItemId, string InOnlineId,
string InLoadId)
{
StringBuilder sb = "item_ShowToCust.aspx ";
sb.Append("?OnlineId=" + InOnlineId);
sb.Append("&ItemId=" + InItemId.ToString());
sb.Append("&Referer=" + InLoadId);
InResponse.Redirect(sb.ToString());
}
}
}
I get an error with I run the page. a namespace is not permitted in a
c# script code block in an asp.net page?
thanks,
-Steve
c:\Inetpub\wwwroot\lmartin\Controls\item.cs(6,1): error CS1519: Invalid
token 'namespace' in class, struct, or interface member declaration
c:\Inetpub\wwwroot\lmartin\Controls\item.cs(7,1): error CS1519: Invalid
token
<script language="c#" runat=server src="item.cs"/>
The file item.cs contains c# code that contains a namespace:
namespace ItemPages
{
public class ShowItemToCust
{
public static void Redirect(System.Web.HttpResponse InResponse,
int InItemId, string InOnlineId,
string InLoadId)
{
StringBuilder sb = "item_ShowToCust.aspx ";
sb.Append("?OnlineId=" + InOnlineId);
sb.Append("&ItemId=" + InItemId.ToString());
sb.Append("&Referer=" + InLoadId);
InResponse.Redirect(sb.ToString());
}
}
}
I get an error with I run the page. a namespace is not permitted in a
c# script code block in an asp.net page?
thanks,
-Steve
c:\Inetpub\wwwroot\lmartin\Controls\item.cs(6,1): error CS1519: Invalid
token 'namespace' in class, struct, or interface member declaration
c:\Inetpub\wwwroot\lmartin\Controls\item.cs(7,1): error CS1519: Invalid
token