Cannot assign to 'Redirect' because it is a 'method group'

Discussion in 'ASP .Net' started by Chino, Mar 27, 2006.

  1. Chino

    Chino Guest

    Hi guys,

    Sorry but i am new to ASP.Net and C# so please bear with my pleb
    questions.

    I have the following in a C# class which is being inherited by my
    ASP.Net page.

    In this class i have an event for a button i have on the web page:
    protected void btnAuthorise_Click(object sender, EventArgs e)
    {
    ResetControls();
    Page.Response.Redirect = "Authorisation.aspx?rqNo=";
    }

    When i attempt to build the website i am getting the error:
    Cannot assign to 'Redirect' because it is a 'method group'

    Can someone please explain to me this message? I have searched the
    internet for this but i only got one forum which answered this question
    but it was in Italian :(

    Kind regards,
    Chino
     
    Chino, Mar 27, 2006
    #1
    1. Advertisements

  2. Chino

    Guest

    Hello Chino,

    with my limited knowledge in C# I can still notice a small syntax error
    in your response line,
    after looking it up Im certain it has to be:

    Response.Redirect("mightbeinamap/authorisation.aspx?rqNo=");

    Egu
     
    , Mar 27, 2006
    #2
    1. Advertisements

  3. Chino

    Chino Guest

    Thank you for pointing that out! I can't believe i did that.

    Thanks for your help =]

    Kind regards,
    Chino
     
    Chino, Mar 27, 2006
    #3
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.