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

Discussion in 'ASP .Net' started by ʹÃûÑï, Dec 29, 2006.

  1. ʹÃûÑï

    ʹÃûÑï Guest

    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, 2006
    #1
    1. Advertising

  2. 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


    "ʹÃûÑï" <> wrote in message
    news:...
    > 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
    >
    >
    >
    >
     
    Mark Fitzpatrick, Dec 29, 2006
    #2
    1. Advertising

  3. 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


    "ʹÃûÑï" <> wrote in message
    news:...
    > 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
    >
    >
    >
    >
     
    Mark Fitzpatrick, Dec 29, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sql Agentman
    Replies:
    0
    Views:
    665
    Sql Agentman
    Jan 19, 2006
  2. =?Utf-8?B?TWljaGFlbA==?=

    How to update datagrid after update

    =?Utf-8?B?TWljaGFlbA==?=, Mar 17, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    508
    Alex D.
    Mar 17, 2006
  3. Replies:
    0
    Views:
    922
  4. Replies:
    2
    Views:
    205
  5. Stephan Kämper
    Replies:
    1
    Views:
    154
    Assaph Mehr
    Jul 15, 2006
Loading...

Share This Page