1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to get values from asp to aspx

Discussion in 'C#' started by Karthik chennappan, Oct 29, 2010.

  1. #1
    Hi,

    Below is my scenario,

    1. I have ASP page and i want to call ASPX page from ASP (But it should not redirect or my ASP should not hide).
    2. I dont want to send any inputs from ASP to ASPX
    3. I Want to send a values from ASPX to ASP.
    4. The above all events should happen in my ASP page loading itself. There is no Click Event.

    In Simple Words: - On ASP page load, i want to call ASPX page and return values from ASPX page to ASP and write those values in ASP.
    SEMrush
     
    Last edited: Oct 29, 2010
    Karthik chennappan, Oct 29, 2010 IP
    SEMrush
  2. bencummins

    bencummins Peon

    Messages:
    55
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You can use ASP to called the xmlhttp object, and use that to pull info from the asp.net page
     
    bencummins, Nov 2, 2010 IP
  3. longcall911

    longcall911 Peon

    Messages:
    1,672
    Likes Received:
    87
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Your example is not very clear about what data you are trying to get from where to where. There are only a few ways in general to move data from page to another.

    - data can be in a form that gets posted from one page to another
    - data can be in the URL of link or redirect
    - data can be stored in a cookie on the users machine
    - data can be stored in a file on the server
    - data can be stored in a database that both pages can access
    - data can be stored in custom session data objects (not recommended for use by novices)

    You say you want to get values from an aspx page, but where are those values coming from? Are they hard coded in a script? If you are trying to run some function on another page, use the redirect (or server transfer). In either case the user would have no idea that they were sent to another page and back. Don't know why you don't want to use redirect, unless the page is on someone else's site and you want to use the function without approval.
     
    longcall911, Nov 6, 2010 IP