By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,633 Members | 1,753 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,633 IT Pros & Developers. It's quick & easy.

To grab the name of the ASP page on the server

P: n/a
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!
Jul 22 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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" <ak******@guideone.com> wrote in message
news:uo****************@TK2MSFTNGP10.phx.gbl...
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!

Jul 22 '05 #2

P: n/a
Uh, aren't you already on that page?
Look at the Request.ServerVariables collection

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Andy Kasotia" <ak******@guideone.com> wrote in message
news:uo****************@TK2MSFTNGP10.phx.gbl...
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!

Jul 22 '05 #3

P: n/a
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!
Jul 22 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.