473,395 Members | 1,466 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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


Dec 29 '06 #1
2 1101
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.

--

Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006
"ʹÃûÑï" <to*************@hotmail.comwrote in message
news:e1**************@TK2MSFTNGP03.phx.gbl...
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


Dec 29 '06 #2
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.
--

Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006
"ʹÃûÑï" <to*************@hotmail.comwrote in message
news:e1**************@TK2MSFTNGP03.phx.gbl...
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


Dec 29 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Adam Raff | last post by:
Good Afternoon, Today I tried installing .net Framework 1.1 off of the web and received an error. Can not install this program. Let me start with some history first. I have a Dell Optiplex...
5
by: Rich | last post by:
I loaded visual studio.Net 2003 on a windows XP workstation, and I was able to run aspx applications. Later I loaded JBuilder 2005 (Enterprise Java builder 2005) which runs the Tomcat 5.0 web...
2
by: Le | last post by:
I'm developing an Add-In for MS Word 2003 with C# VS 2005, every I attempt to build kicking off the wizard that will add-in registers the .NET class with the COM interop I'm getting an error: ...
1
by: Kisa | last post by:
I am using Visual Studio 2005 on Windows Server 2003 (Virtual Server). All service packs are installed. I first had this problem when trying to distribute an application for testing so I then...
2
by: VMI | last post by:
In the Event Viewer I've been getting this error when I try to run an already-made web application: "aspnet_wp.exe could not be started. The error code for the failure is 80070545. This error..."....
1
by: DCC700 | last post by:
After upgrading a web application from VS 2003 to 2005 there is a page where any control event that should cause a postback instead generates an Invalid character error on the page. For example a...
2
by: travhale | last post by:
in a new project using .net 2005, c#. getting err message "Update requires a valid UpdateCommand when passed DataRow collection with modified rows." source RDBMS is oracle 8i. I add a new...
6
by: Carol | last post by:
Hi. When I try to run Visual Studio 2003 I get the message "MS development environment is not installed for the current user. Please run setup to install the application." Is there any way to...
1
by: =?Utf-8?B?Q29lbg==?= | last post by:
When I right click on My Computer, manage, I get a pop-up with the title "SQL Server Configuration Manager" In the pop up appears the following message: "MMC has detected an error in a snap-in. It...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.