473,785 Members | 2,297 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

To grab the name of the ASP page on the server

On the client once the user clicks the Submit button....in my code the
following javascript function kicks off...
onclick="return SubmitForm('frm CurrBuildings', '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.QuerySt ring( "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
3 1371
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******@guide one.com> wrote in message
news:uo******** ********@TK2MSF TNGP10.phx.gbl. ..
On the client once the user clicks the Submit button....in my code the
following javascript function kicks off...
onclick="return SubmitForm('frm CurrBuildings', '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.QuerySt ring( "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
Uh, aren't you already on that page?
Look at the Request.ServerV ariables collection

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Andy Kasotia" <ak******@guide one.com> wrote in message
news:uo******** ********@TK2MSF TNGP10.phx.gbl. ..
On the client once the user clicks the Submit button....in my code the
following javascript function kicks off...
onclick="return SubmitForm('frm CurrBuildings', '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.QuerySt ring( "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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
13321
by: Larry R. Baker | last post by:
Is it possible to grab a client side IP Address using JavaScript in an htm page? I have a web page hosted on a non-ASP server and I want a piece of code in JavaScript to grab the IP address of the client and send it to a web page on another server. The other page will be ASP. I need this for both Netscape and IE browsers. Any ideas?
2
5636
by: David Taylor | last post by:
I'm looking for a way to grab the HTML behind one of my pages and display it to the user. The page I'm trying to get the HTML from is an ASP page, so obviously I'm looking for the post-asp processing results. Basically I want the same HTML that the user could get if they had done a "View Source" in their browser on the page. Does IIS/ASP provide a way to do this natively, or do I have to buy a third party component? TIA
2
1517
by: Jack | last post by:
Hi, I got a simple form where one needs to input data. The data is being processed in an asp page. However, I cannot figure out why couple of values I am typing in the form is not being retrived in the asp processing page. Instead it shows as a null value. Any help is appreciated. I have attached the major code for the form, the processing page and output on the screen including sql output. Any help is appreciated. Regards.
3
4561
by: James | last post by:
Hi guys, I have been building a search engine here - not because I have plans of dethrowning Google but as a simple app upon which to develop a function set that I can use for other things. So I coded my little search engine, uploaded it and it didn't work with my host (Dreamhost.com): Warning: fopen(): URL file-access is disabled in the server
10
1437
by: Jonathan Schwarz via DotNetMonster.com | last post by:
Hi folks, I am a complete newbie to ASP.NET, VB, etc... I am coming from a Cold Fusion background where it only takes me 4 lines to query a MSSQL db and display a field name. Please, how do I connect to my SQL db using the DSN ("mydsnname") and then select "thisfieldname" from "thistablename". Then how do i display the value in my html page? ....later I will ask how to grab an uplaoded files name and update the same
4
2518
by: louise raisbeck | last post by:
Resending this as own topic as didnt get answer from original. Would be grateful for a response from anyone that knows. Thanks. Hi there, I found your post really helpful..but i wondered if, once I have exposed a public property containing the value of a textbox in a user control..how do I grab this from the calling page? I cant think of the syntax, since my page doesnt know the contents of the class (and therefore, the public...
8
9421
by: '69 Camaro | last post by:
Perhaps I'm Googling for the wrong terms. Does anyone have links to examples of the syntax necessary to read the HTML on another Web page when that HTML is produced from JavaScript using the document.write( ) method? For a simplified example, I have two Web pages. Page 1 uses JavaScript with the following: htmlData = "<B>This is bold text.</B>"; document.write(htmlData);
6
7556
by: fmdevelopertim | last post by:
New to AJAX so sorry if this is simple. Have a page that gives the user a list to select a brand. Based on the brand selected it shows a list of sizes available using the following code: function handleStateChange() { if(xmlHttp.readyState == 4) { if(xmlHttp.status == 200) { document.getElementById("serverResponse").innerHTML =
19
1877
by: JRough | last post by:
I have used this function to create a string called $headers: function GetHeaders($file_name){ return "<th><a href='".$file_name."&order_by=l_e'>L_E</a></th> <th><a href='". $file_name."&order_by=carnumber'>Carnumber</a></th> <th><a href='". $file_name."&order_by=location'>Location</a></th> <th><a href='". $file_name."&order_by=sighting_date_asc'>Sighting
0
9489
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10356
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10162
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10100
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5396
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5528
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4061
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2893
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.