Skip to main content

Where and how do I define 'Response.Redirect' in my web application?

I get a COBCH0301 Unrecognized verb error.

Thanks

Shirley

Where and how do I define 'Response.Redirect' in my web application?

I get a COBCH0301 Unrecognized verb error.

Thanks

Shirley

Hi Shirley,

The following works for me when coded within a Web Form:

 

      $set ilusing"System.Web"
      $set ilusing"System.Web.UI"
      $set ilusing"System.Web.UI.WebControls"
       class-id testasp._Default is partial
               inherits type System.Web.UI.Page public.
       working-storage section.
      
       method-id Page_Load protected.
       local-storage section.
       procedure division using by value sender as object by value e as type EventArgs.
       
           goback.           
       end method.
              
       method-id Button1_Click protected.
       procedure division using by value sender as object e as type System.EventArgs.
         
           invoke Response::Redirect("About.aspx")

       end method.

       end class.

Where and how do I define 'Response.Redirect' in my web application?

I get a COBCH0301 Unrecognized verb error.

Thanks

Shirley

Hi Chris

It wouldn't allow me to use '$set ilusing' or just '$set using' but changing the syntax of the Response.Direct to
invoke Response::Redirect did the trick.

Thank you so much

Shirley

Where and how do I define 'Response.Redirect' in my web application?

I get a COBCH0301 Unrecognized verb error.

Thanks

Shirley

If you're getting an error on a $set ilusing directive, it's probably in the wrong column. Consult the product documentation, or just make sure the $ character is in column 7. Also make sure all $set ilusing directives appear before any code in the source file; it's an initial directive (again, as described in the product documentation).

Namespaces can also be specified in the project properties.