code error after update vs.net 2003 to vs.net 2005

Ê

ʹÃûÑï

In vs.net2003£¬there is a code like this

admin_left.aspx
<%if(CanSee(1,14))
{
%>
<tr>
<td align="center" background="images/home_40.gif"><A
href="admin_list.aspx?boardid=78" target="main">Health</A></td>
</tr>
<%}%>


admin_left.cs
protected void Page_Load(object sender, EventArgs e)
{
}
public bool CanSee(int pid, int rightid)
{
return true;
}
and it works ok


but in
vs.net 2005 in admin_left.aspx IDE return a error
"Class, struct, or interface method must have a return type"

why?
how to solve this problem
 
M

Mark Fitzpatrick

It's not finding the codebehind class in the designer. Are you using the VS
2005 Web Site project, or the add-on Web Application Project. The Web
Application project works very similar to the original VS 2003 web project.
The new Web Site project doesn't compile in the same fashion as it's much
more just-in-time so the codebehind may not be compiled and available to the
designer.
 
M

Mark Fitzpatrick

I should also have mentioned that if you need the Web Application project it
is available in the downloads section of the www.asp.net web site, and is
also included as part of the new VS 2005 Service Pack 1.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top