473,811 Members | 2,749 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Calling script name from codebehind

I have a mechanism that performs a server transfer to another page that uses
the same codebehind class if an alternate page URL exists in the application
variables.

My problem is there is an endless loop because I cannot find the REAL script
name calling the codebehind. Request.ServerV ariables["script_nam e"] returns
the original script name since it is a server transfer. Redirect is not an
option, as I want this to be seemless.

How can I find out the name of the script that is calling the Page_Load
function of the codebehind class?

Thanks!
Stefan
Nov 18 '05 #1
1 1393
Never mind, Request.Current ExecutionFilePa th

"Stefan Barlow" <st****@NOSPAM. americomlp.com> wrote in message
news:zb******** **********@twis ter.austin.rr.c om...
I have a mechanism that performs a server transfer to another page that uses the same codebehind class if an alternate page URL exists in the application variables.

My problem is there is an endless loop because I cannot find the REAL script name calling the codebehind. Request.ServerV ariables["script_nam e"] returns the original script name since it is a server transfer. Redirect is not an option, as I want this to be seemless.

How can I find out the name of the script that is calling the Page_Load
function of the codebehind class?

Thanks!
Stefan

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
8791
by: Scott Wallace | last post by:
I have a page that displays several pictures pulled from a database. I want any one of the pictures to appear in a larger main picture container when the user clicks on it. I want to do this on the client side so that the page doesn't post back. I have the following JavaScript function in my HTML: <script> function change(pic) { centerPic.src=pic
2
12444
by: exshige | last post by:
I read from some book that you can actually on any tag in the html page put a onClick or something and assign it with the sub/function name that is in the codebehind. I tried but it say name undefined. I am trying to make a rollover effect using codebehind. I have a <a> tag that onmouseover will call a sub in codebehind to change a <asp:image> image url. How come i can see a lot of "on" events of the <a> in the html side but when i...
2
2415
by: a | last post by:
Hi Extremely easy question for someone who knows the answer I'm sure :-) (aren't they all) What exactly does LoadControl do? Whats the difference between calling this and just constructing a user control? Thanks anon'ish
8
5361
by: Brett Robichaud | last post by:
I understand how code-behind can handle events for a page, but can I call a code-behind method from within a <script> tag in my ASP.Net page, or can I only call methods defined in other <script> sections? I can't seem to figure out the syntax for for calling code-behind directly. The method is within the class my page inherits from and is public, but when I try to call it from my page I get this error: CS1520: Class, struct, or...
2
1964
by: Ekken Zuiber | last post by:
hiye people, i know this have been ask multipletimes over the past year, but i cant find any here in the new group so here goes.. in my code behind, i'm going to do some validation and use javascript to throw the msg out to them, these errors msg are query from the db 1st, how can i call a javascript function from codebehind. is there any other way besides response.write = "<script></script>" ?? 2nd, can someone recommend me ways i can pass...
2
1992
by: Gerald | last post by:
Hi, can anyone please solve this problem? My main page is :WebForm2.aspx <%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm2.aspx.vb" Inherits="Transactions.WebForm2"%> <%@ Import Namespace="System" %> <%@ Import Namespace="ReportComponents" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD>
7
33873
by: =?Utf-8?B?Qw==?= | last post by:
I have a dropdown list as below. I add an onchnage attribute in my codebehind to call some Javascript. I want to get the selected text from my dropdown. What am I doing wrong below? <asp:DropDownList ID="ddlStatus" runat="server" /> In my codebehind
0
884
by: ninjastar85 | last post by:
Hi, I'm trying to call a vbscript subroutine from my c# codebehind using RegisterStartupScript but for some reason it wont work.. I have this in my c#-codebehind Page.RegisterStartupScript("hey","<SCRIPT language=\"vbscript\"> \n call test() \n</SCRIPT>"); and I have this in my aspx page: <SCRIPT language="vbscript"> 'call test() sub test
1
3634
by: ahmh | last post by:
The javascript function is called getsportart2 in the codebehind page_load I have the following Page.RegisterStartupScript("MyScript3","<script type='text/javascript' src='http://www.halaeducation.com/media/modules/sports/getsportart2.js'></script>"); I would like to activate this function as soon as the page load. I do not have a problem with activating this function from the <body onload=""> but I have a problem doing so from...
0
9605
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
10647
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
10386
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
10398
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
10133
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9204
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6889
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5692
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3017
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.