call another page without showing in using

Posted on 2009-12-25
Last Modified: 2013-11-26

1st -- don't give me referrels website links send me the valid and working code.. and don't send the code of VB or other i want (only) and

2nd -- my query is:

i have 2 pages; in my first page when i click button then server side code intiate and then i want to call the page2 without showing the page .. and process the data on page2 then i get the session and i want to use that session on first page ... so thats why i some that call page2 with showing and process my data on page2 page_load event .. and then i get the session which was created by page2 and show the data output on page1..

    LVL 11

    Accepted Solution

    What do you mean by "get the session which was created by page2". What is the requirement of that ?

    LVL 2

    Assisted Solution

    Do this....

    Page1 code :

    ButtonClick Event()

    Page2 code

         //Do Session related activity ;
         Session["newValue"] = value ;

    Now you will be again in Page1 and you will get the session value : Session["newValue"]

    --------------- 2nd approach
    Derive your page1 from page2 and do whatever you want to do in Page2's page load event.

    Let me know if this solves ur issue.
    LVL 6

    Assisted Solution

    You could always put the Page 2 processing in a class that you can call from Page 1. You can indeed access the Session data from the class using context. Then you never have to transfer away from Page 1.
    LVL 18

    Assisted Solution

    by:Gary Davis
    If you do not want to have the round trip(s) to the user's browser, use Server.Transfer() or Server.Execute().
    Gary Davis
    LVL 14

    Assisted Solution

    Hmm well i don't know why u have this requirement but you can use this way also

    In the page load of page2 use this

    this.Visible = false;

    and do what ever you want to do in this page save the values in session and then redirect this page to page1 and you can use the session there..

    I hope this is what you want..


    Amarjit Singh
    LVL 14

    Expert Comment

    strange acceptance...

    LVL 2

    Expert Comment

    Yes, I also agree.... THIS IS STRANGE ACCEPTANCE OF SOLUTION......

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Suggested Solutions

    Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
    Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now