To grab the name of the ASP page on the server

Discussion in 'ASP General' started by Andy Kasotia, Jan 12, 2005.

  1. Andy Kasotia

    Andy Kasotia Guest

    On the client once the user clicks the Submit button....in my code the
    following javascript function kicks off...
    onclick="return SubmitForm('frmCurrBuildings', 'CurrBuildings.asp',
    c_iLOADNEW, '_self')"

    function SubmitForm( FormName, ActionASP, ActionVal, TargetVal )
    eval( "document." + FormName + ".target = '" + TargetVal + "'" ) ;
    eval( "document." + FormName + ".action = '" + ActionASP + "?Action=" +
    ActionVal + "'" ) ;
    eval( "document." + FormName + ".submit()" ) ;

    On the server, I would like to grab the name of the ASP page which was
    called when the user hit the submit button which happens to be stored in
    the variable ActionASP. But this variable resides on the client so I
    can't reference it (ActionASP) on the server. I could put this variable
    in the query string like I'm doing ActionVal but I don't want to do
    that. Is there any other way I can grab that name on the server?

    I know doing Request.QueryString( "Action" ) gives me what was passed
    after the "?". Is there a way to get the pagename that happens to be
    before the "?" OR is there another way of doing this?

    Any ideas, suggestions would be appreciated.

    Thanks,
    Andy.


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Andy Kasotia, Jan 12, 2005
    #1
    1. Advertising

  2. Wouldn't it just be the page itself that is running? If I submit a form to
    page1.asp, page1.asp is the page that's processing the data! So, if your
    question is about how to return an ASP file's own name to itself, see
    http://www.aspfaq.com/show.asp?id=2072.

    --

    Ray at work
    Microsoft ASP/ASP.NET MVP


    "Andy Kasotia" <> wrote in message
    news:uoLtkEP%...
    > On the client once the user clicks the Submit button....in my code the
    > following javascript function kicks off...
    > onclick="return SubmitForm('frmCurrBuildings', 'CurrBuildings.asp',
    > c_iLOADNEW, '_self')"
    >
    > function SubmitForm( FormName, ActionASP, ActionVal, TargetVal )
    > eval( "document." + FormName + ".target = '" + TargetVal + "'" ) ;
    > eval( "document." + FormName + ".action = '" + ActionASP + "?Action=" +
    > ActionVal + "'" ) ;
    > eval( "document." + FormName + ".submit()" ) ;
    >
    > On the server, I would like to grab the name of the ASP page which was
    > called when the user hit the submit button which happens to be stored in
    > the variable ActionASP. But this variable resides on the client so I
    > can't reference it (ActionASP) on the server. I could put this variable
    > in the query string like I'm doing ActionVal but I don't want to do
    > that. Is there any other way I can grab that name on the server?
    >
    > I know doing Request.QueryString( "Action" ) gives me what was passed
    > after the "?". Is there a way to get the pagename that happens to be
    > before the "?" OR is there another way of doing this?
    >
    > Any ideas, suggestions would be appreciated.
    >
    > Thanks,
    > Andy.
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
     
    Ray Costanzo [MVP], Jan 12, 2005
    #2
    1. Advertising

  3. Andy Kasotia

    Andy Kasotia Guest

    Thank you for your response. The aspfaq.com site answered my question.
    Thanks much.


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Andy Kasotia, Jan 12, 2005
    #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. Replies:
    0
    Views:
    559
  2. Replies:
    0
    Views:
    467
  3. Kelly

    Grab a User's Logon name in ASP.NET form?

    Kelly, Mar 10, 2005, in forum: ASP .Net Web Controls
    Replies:
    4
    Views:
    208
    Kelly
    Mar 15, 2005
  4. rubisher
    Replies:
    4
    Views:
    110
    Marc Heiler
    May 24, 2008
  5. perchance
    Replies:
    3
    Views:
    122
    Dr.Ruud
    Jan 27, 2008
Loading...

Share This Page