Posting to Form in Subdirectory

Discussion in 'ASP .Net' started by =?Utf-8?B?bW9iaWxlbW9iaWxl?=, Oct 10, 2007.

  1. Hi all. I have experience with C#/VB.NET and ASP Classic, but am very new to
    ASP.NET.

    I'm using ASP.NET 2.0 and am modifying a site. I copied the site files to a
    subdirectory to test and (hopefully) not interfere with the live version.

    I am running a page in the subdirectory that should submit to itself:
    http://www.<site>.com/dev/QuoteGuestInfo.aspx. The Page directive is:

    <%@ Page Language="VB" MasterPageFile="~/dev/masterfile.master"
    AutoEventWireup="false" CodeFile="QuoteGuestInfo.aspx.vb"
    Inherits="QuoteGuestInfo" %>

    When I do a View Source on the page, I see the <form> tag as:
    <form name="aspnetForm" method="post" action="QuoteGuestInfo.aspx"
    id="aspnetForm">

    When I submit the form, I get a "The resource cannot be found." error, with
    Requested URL: /QuoteGuestInfo.aspx.

    So it looks like it's going to the main directory instead of my dev
    subdirectory. Is there a way to make the post go back to the dev
    subdirectory instead of the main dir?

    (I did a search but I'm new enough on this topic I'm not quite sure what to
    search on.)

    Thanks for any help,
    Steve
    =?Utf-8?B?bW9iaWxlbW9iaWxl?=, Oct 10, 2007
    #1
    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. Jeff Baker

    WebClient form Posting with form name?

    Jeff Baker, Aug 28, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    738
    John Saunders
    Aug 29, 2003
  2. alanb
    Replies:
    2
    Views:
    517
    alanb
    Apr 23, 2004
  3. Scott Natwick

    Creating a Form in a subdirectory

    Scott Natwick, Oct 23, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    317
    Scott Natwick
    Oct 24, 2004
  4. Replies:
    1
    Views:
    442
    =?Utf-8?B?RFdT?=
    Mar 2, 2006
  5. AmitKu
    Replies:
    7
    Views:
    485
    John Timney \(MVP\)
    Jan 8, 2007
Loading...

Share This Page