how to know the calling page from called page.

hi,

i need to know how to get the calling page from the called page even there is no post back has been done.

0
dharshmkp
8/6/2008 1:02:40 PM
asp.net.vs2005-webapp-projects 1239 articles. 0 followers. Follow

4 Replies
629 Views

Similar Articles

[PageSpeed] 14

Look at the ServerVariables, in particular the Referer


0
Curt_C
8/6/2008 1:32:33 PM

i am having the linkbutton in the previous page called page1.

while clicking the button the page is redirect to the current page called page2.

now i want to know the name or url of the page1.

how can i do????

0
dharshmkp
8/6/2008 1:42:39 PM

As I already said....

HttpContext.Current.Request.ServerVariables("HTTP_REFERER")


0
Curt_C
8/6/2008 3:47:01 PM

Thank You so much...

it works very well....SmileSmile

0
dharshmkp
8/7/2008 4:43:45 AM
Reply:

Similar Artilces:

In a web page(c#), I want to call another page and come back to next instruction of calling page
In a web page(c#), I want to call another page and come back to next instruction of calling page. Called page have no web item , it has only c# codes. after executing of this page (by IExplore), I want the remaining lines of calling page to be executed. How can I do that? What are you trying to do? What is the second page accomplishing? Will the first page stay open and the second page closes? You might be able to use WebRequest and WebResponse to do what you want. Hey bro, since you say that the called page has no web items, why dont you put the code in the called pa...

Passing data from the called page(IFRAME) to the calling page
Hi, I am calling an HTML page in a <IFRAME> control "Src" attribute. How can I pass some data from that page to the calling page?   Thanks, Siddharth       As long as they are on the same domain (meaning, if your "calling page" is from www.SingingEels.com and your IFrame page points to www.google.com you can do nothing because that's Cross-Site Scripting)... anyway, as long as they are on the same domain you can do this in the child page: <script type="text/javascript"> parent.document.getElementById("...

Which page has called a page
Hello, Is a page able to know which page has called it ? If Page_A and Page_B can call Page_C, I would want to know during Page_Load of Page_C if it is Page_A or Page_B which is the calling page ? Thank's Alain You could try using Request.UrlReferrer. This will give you the complete url, type: http://localhost/NetSamples/Employees.aspx To strip away everything unecessary like Querystrings etc. you could use something like this: Dim strReferrer As String = Request.UrlReferrer.ToString Dim intStart As Int32 = strReferrer.LastIndexOf("/") + 1 ...

Call codebehind method from aspx page OR call javascript function of usercontrol control from page
Hi, I have a page which contains a user control.  When a user clicks on a submit button, I'd like to detect when elements in the user control have changed and popup a message box if changes have been detected to confirm if the user wants to save the changes. Obviously the message box is executed using javascript.  But I'd really like to be able to call a method in the code behind of the page which queries the user control if it has changed.  Is there a way of calling the code behind method from within a javascript function? Otherwise, if I make all the functions execut...

Page current page called from!
Can I retreive the page that called the current page in asp.net using c#.  I took a jsp class a few years back and use a http header call method type thing.  Anything similar in asp.net. stwenterOff the top of my head.... Hi, I think you're looking for this: HttpRequest.UrlReferrer Property. Grz, Kris.Read my blog. Handy Firefox plugins for web developers.Workaround for non working Mark as answer buttons....

Paging Paging Paging
I am trying to do paging with my search results and it isnt working very well. Here is what I've tried and I feel I've tried everything, lol, please help me out. Sub DataGrid1_SortCommand(Sender as object, e as DataGridSortCOmmandEventArgs) DataGrid1.DataBind() End Sub Sub Datagrid1_PageIndexChanged(Sender as object, e as DataGridPageChangedEventArgs) Dim ds as dataSet DataGrid1.CurrentPageIndex = e.NewPageIndex if Session("Search") is nothing then 'Session probably has expired, get the datasource from database Datagrid1.DataSource = ...

master page treeview control treenodechanged event called from my content page but in one case event does not called
Hi All, I have a Treeview control at my master page and from my content page I show user interface based on TreeNodeChanged, Treenodechanged event from my content page but in one case this event does not executing.  I checked using trace and debug but this event does not fired from my content page in one case only, all other case it work perfectly. // here I am triggering node changeEvent but in one case it does not even called................protected void Page_Init(object sender, EventArgs e) {Trace.Write("Content Page", "Page_Init"); myMaster = (Ma...

Find the URL of the calling page when both the calling and the caller pages use Ajax's update panel
hi, I am trying to find the URL of the calling page when both the calling and the caller pages use Ajax's update panel. I have used Requst.UrlReferrer for this but it returns empty string.  I have written this piece of code in page load event of Page1 which will be called by Page2 or Page3.string url = Convert.ToString(Request.UrlReferrer);if ((url.Contains("Page2.aspx")) || (url.Contains("Page3.aspx"))) { //Perform some operation }  I have update panels on Page1 and Page2. When Page3 calls Page1 it works fine.But when Page2 calls Page1 it will not...

Calling HTML page from ASPX page + sending parameters to the HTML page
Dear EE I am working with ASP.NET2.0, C# And want to call an HTML page from my ASPX page and: 1. I want it to be a popup window. 2. I want to pass 2 parameters to the page that I will call. Please tell me how to do that, Thank you  If you're going to be opening the new window from a hyperlink anchor or a form, you need to give a target="_blank" attribute.  By the way, it's not considered good practice to create pop up windows since it makes it hard for accessibility tools like screen readers to make sense of them.  You can use QueryStrings to pass ...

Calling a method from a control page on the axpx page where the control page exists.
Hello,  I have an .aspx page that has a method called grdMain_DataBind().  I have a control page that loads within the aspx page which has its own logic.  I have a button on my control page called "SAVE".  How can I call the method grdMain_DataBind thats in my aspx logic from the control that exists on that page when I click SAVE button.  Is there a way? If I were you, I'd simply create a "Save" Event within your control. When the Button in your control is pressed, in the Click handler for that Button you can raise the event. Then, within t...

Calling HTML page from ASPX page + sending parameters to the HTML page
Dear ALL I am working with ASP.NET2.0, C# And want to call an HTML page from my ASPX page and: 1. I want it to be a popup window. 2. I want to pass 2 parameters to the page that I will call. Please tell me how to do that, Thank you You can set the button (or onload event, whatever) that you are using to trigger the popup by doing something like this: <asp:Button id="myButton" runat="server" OnClientClick="window.open('myhtmlpage.html?param1=this&param2=that', 'mypopup')">Click Me!</asp:Button>Or, you can set the OnClie...

How could I know where is the page calling from?
Hello   I’m making an application which get the gmt time from the users. But I don’t know how much hours should I add or deduct, because I don’t know where the page is calling from. How could I know where is the page calling from?As Heinlein said "specialization is for insects" explore beyond the universe. and why u just don''t use yr server time for this?Guennadi Vanine - Gennady Vanin - Геннадий Ванин I know what you mean, but the application would only get the time from the server, that my site is hosted, which I could see how much the difference from the GMT is...

How to call a page of other projects?
First my english is not very well. I'm so sorry I want to call a page of other projects,how do I do it? thank all of answers. Sounds like you need to call a page on another site/application.  Investigate the System.Net namespace and the HttpWebRequest and HttpWebResponse objects.    Chuck Boyer, MCSD .NETDirector of Production and DevelopmentEdge Media Design...

Call the previous page on the current page?
 Hi Friends,I have a login page with a register button. There are other two pages(x and y) and on the other two pages there is a login button which direct the user to the login page. I need some code on the login page and the register button which will tell from which of the two pages(x and y) the login was called.  Thanks in Advance Sushim   you can get the calling page by using this HttpContext.Current.Request.UrlReferrer   Can you please explain me this a bit? What it will do?Thanks   on the page load of the login pageif you make th...

Web resources about - how to know the calling page from called page. - asp.net.vs2005-webapp-projects

London Calling - Wikipedia, the free encyclopedia
London Calling is the third studio album by the English punk rock band The Clash . It was released in the United Kingdom on 14 December 1979 ...

List of country calling codes - Wikipedia, the free encyclopedia
This is a list of country calling codes defined by ITU-T recommendations E.123 and E.164 , also called IDD ( International Direct Dialling ) ...

Free VoIP Calling Added To Facebook Messenger For IOS In The U.K.
Voice-over-Internet-protocol calling has made its way across the pond for Facebook Messenger users, as the social network updated its iOS version ...

Facebook Video Calling - Facebook
Bring your conversations to life on Facebook. With face-to-face video calling, now you can watch your friends smile, wink and LOL. To get started, ...

Facebook roundup: video ads, voice calling, logos and more
... than three per day at launch. It is unclear whether the ads will autoplay in the feed or not. More Messenger for Android users get free calling ...

Berlin Calling (@neuraum) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

Calling all foodies: Here comes @TwitterFood
There are many thousands of food-related Tweets people send on Twitter each day – Tweets about meals, ingredients, favorites, recipes and dining ...

YUBISASHI NIPPON CALLING ENGLISH for iPhone, iPod touch, and iPad on the iTunes App Store
Get YUBISASHI NIPPON CALLING ENGLISH on the App Store. See screenshots and ratings, and read customer reviews.

Calling woman II - Flickr - Photo Sharing!
Explore Marcel Oosterwijk's photos on Flickr. Marcel Oosterwijk has uploaded 2195 photos to Flickr.

They're back. All-Australian Koels calling in ACT suburbia
Too many Gang-gang cockatoos, our dear territory's faunal emblem,&nbsp;are not enough.

resources last updated: 11/20/2015 6:40:25 PM