Pass data between pages

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Re: Pass data between pages

    in .net help, search for "Passing Server Control Values Between Pages"

    Michelle wrote:
    > I wonder if anybody can give me some hints.
    >
    > I have 2 web pages. There is an add button on the 1st page. When the user
    > clicks on it, the 2nd page pops up. User can select products on the 2nd page
    > and clicks ok. Then the 2nd page closes, and the focus backs to the 1st
    > page. The selected products needs to store in a datagrid in the 1st page.
    >
    > I am not sure what is a good way to implement this scenario in .Net. Very
    > appreciate it if anyone provides any idea, link, or code snippet.
    >
    > Thanks.
    >
    >
    Kairi Zikpin Guest

  2. Similar Questions and Discussions

    1. Trying to pass data from one page to another
      I have tried and tried to find an answer in DW help, and feel like I'm close, but can't figure out the final step. All of the fields in my page...
    2. flash in cf pages calls for domain un/pass
      I'm running a small CF app on a W2k3 server with IIS6. I've really had no major hang ups except this one. I've been working with ColdFusion for a...
    3. Unable to pass session var between app pages
      I'm having trouble passing a session variable from a form page to multiple action pages. The form page points to the first action page, but I'm...
    4. How to pass data
      I need help with a small problem. I am working on a CourseBuilder 15 question test with each question is on its own page. I want to keep track of...
    5. how to pass data?
      You could create a recordset that retrieves the most recently added record by that user, maybe selecting the Max(ID) from the database, dunno what...
  3. #2

    Default Re: Pass data between pages

    You could store the current user selection in a table. On the second page
    you'll add to this table and when closing refreshing the first page will
    show the updated selection.

    You could also store just the keys in a cookie, in a session variable or to
    pass them back as the return value from the popup call (and refresh).

    I would go for 1 (especially if you want to do something later for this
    selection) or 4 (if you want to save the additional resource used by this
    table).

    --

    "Michelle" <Michelle@yahoo.com> a écrit dans le message de news:
    eN9pqD#PDHA.2700@tk2msftngp13.phx.gbl...
    > I wonder if anybody can give me some hints.
    >
    > I have 2 web pages. There is an add button on the 1st page. When the user
    > clicks on it, the 2nd page pops up. User can select products on the 2nd
    page
    > and clicks ok. Then the 2nd page closes, and the focus backs to the 1st
    > page. The selected products needs to store in a datagrid in the 1st page.
    >
    > I am not sure what is a good way to implement this scenario in .Net. Very
    > appreciate it if anyone provides any idea, link, or code snippet.
    >
    > Thanks.
    >
    >
    Patrice Scribe Guest

  4. #3

    Default Re: Pass data between pages

    You might want to see if this technique can work in your scenario. You might
    have to use some Javascript to get the selected values back.

    [url]http://www.aspalliance.com/kenc/passval.aspx[/url]

    "Michelle" <Michelle@yahoo.com> wrote in message
    news:eN9pqD%23PDHA.2700@tk2msftngp13.phx.gbl...
    I wonder if anybody can give me some hints.

    I have 2 web pages. There is an add button on the 1st page. When the user
    clicks on it, the 2nd page pops up. User can select products on the 2nd page
    and clicks ok. Then the 2nd page closes, and the focus backs to the 1st
    page. The selected products needs to store in a datagrid in the 1st page.

    I am not sure what is a good way to implement this scenario in .Net. Very
    appreciate it if anyone provides any idea, link, or code snippet.

    Thanks.



    Ken Cox [Microsoft MVP] Guest

  5. #4

    Default Re: Pass data between pages

    I have a follow-up dump question.

    Server.transfer won't pop up the 2nd web page. It actually the 2nd page on
    the same window. How can I create a pop-up page in ASP.Net? Also, how can I
    close the pop-up window in ASP.Net when the user clicks button on the 2nd
    page?

    Thanks.


    "zPaul" <~pyoon@phnip.com> wrote in message
    news:#XbIGI#PDHA.3664@tk2msftngp13.phx.gbl...
    > ASP.NET is good as long as you are in same page. But, if you try to pass
    the
    > value to another page, you have to go back to previous technology.
    >
    > Search for server.transfer and there should be some document about this.
    >
    > I would prefer to use user control and flip and flop to different pages as
    > needed.
    >
    >
    > "Michelle" <Michelle@yahoo.com> wrote in message
    > news:eN9pqD#PDHA.2700@tk2msftngp13.phx.gbl...
    > > I wonder if anybody can give me some hints.
    > >
    > > I have 2 web pages. There is an add button on the 1st page. When the
    user
    > > clicks on it, the 2nd page pops up. User can select products on the 2nd
    > page
    > > and clicks ok. Then the 2nd page closes, and the focus backs to the 1st
    > > page. The selected products needs to store in a datagrid in the 1st
    page.
    > >
    > > I am not sure what is a good way to implement this scenario in .Net.
    Very
    > > appreciate it if anyone provides any idea, link, or code snippet.
    > >
    > > Thanks.
    > >
    > >
    >
    >

    Michelle Guest

  6. #5

    Default Re: Pass data between pages

    Check out this article,
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm[/url]
    l/cpconPassingServerControlValuesBetweenPages.asp

    If you can use client script, then you can check out this article
    [url]http://www.microsoft.com/india/msdn/articles/PopupCalendarinASP.aspx[/url]

    --
    Saravana
    Microsoft India Community Star,
    MCAD,SE,SD,DBA.


    "Michelle" <Michelle@yahoo.com> wrote in message
    news:eN9pqD#PDHA.2700@tk2msftngp13.phx.gbl...
    > I wonder if anybody can give me some hints.
    >
    > I have 2 web pages. There is an add button on the 1st page. When the user
    > clicks on it, the 2nd page pops up. User can select products on the 2nd
    page
    > and clicks ok. Then the 2nd page closes, and the focus backs to the 1st
    > page. The selected products needs to store in a datagrid in the 1st page.
    >
    > I am not sure what is a good way to implement this scenario in .Net. Very
    > appreciate it if anyone provides any idea, link, or code snippet.
    >
    > Thanks.
    >
    >

    Saravana Guest

  7. #6

    Default Re: Pass data between pages

    Session state is still allowed!...or set up a StateServer if you're going
    for an enterprise solution...

    Alternatively, just append the values to the URL of page 1, and post
    back....

    Pete

    "Michelle" <Michelle@yahoo.com> wrote in message
    news:eN9pqD%23PDHA.2700@tk2msftngp13.phx.gbl...
    > I wonder if anybody can give me some hints.
    >
    > I have 2 web pages. There is an add button on the 1st page. When the user
    > clicks on it, the 2nd page pops up. User can select products on the 2nd
    page
    > and clicks ok. Then the 2nd page closes, and the focus backs to the 1st
    > page. The selected products needs to store in a datagrid in the 1st page.
    >
    > I am not sure what is a good way to implement this scenario in .Net. Very
    > appreciate it if anyone provides any idea, link, or code snippet.
    >
    > Thanks.
    >
    >

    Pete Wood Guest

  8. #7

    Default Re: Pass data between pages

    Hi Michelle,
    You can use window.showmodaldialog to open the detail page.
    Explanation:
    On clicking(HtmlButton) this button write the client script to open the
    detail over the master page in Modal fashion. Pass your data in Xml form
    using its argument. And on the way back from the that modal page return the
    values(if u want).

    The sample code is given below:
    ....
    <INPUT id="btnDetail" onclick="openDetail()" type="button" value="Detail">
    ....
    <script language=vbscript>
    function openDetail()
    mValue=
    window.showModalDialog ("abc.aspx"
    ,myXmlObj,"dialogHeight:500px;dialogwidth:500px;st atus:off;help:yes;scroll:y
    es")
    end function
    </script>

    Hope this will help u.
    Regards
    ZaHeer

    "Michelle" <Michelle@yahoo.com> wrote in message
    news:eQDvNb#PDHA.560@TK2MSFTNGP10.phx.gbl...
    > I have a follow-up dump question.
    >
    > Server.transfer won't pop up the 2nd web page. It actually the 2nd page on
    > the same window. How can I create a pop-up page in ASP.Net? Also, how can
    I
    > close the pop-up window in ASP.Net when the user clicks button on the 2nd
    > page?
    >
    > Thanks.
    >
    >
    > "zPaul" <~pyoon@phnip.com> wrote in message
    > news:#XbIGI#PDHA.3664@tk2msftngp13.phx.gbl...
    > > ASP.NET is good as long as you are in same page. But, if you try to pass
    > the
    > > value to another page, you have to go back to previous technology.
    > >
    > > Search for server.transfer and there should be some document about this.
    > >
    > > I would prefer to use user control and flip and flop to different pages
    as
    > > needed.
    > >
    > >
    > > "Michelle" <Michelle@yahoo.com> wrote in message
    > > news:eN9pqD#PDHA.2700@tk2msftngp13.phx.gbl...
    > > > I wonder if anybody can give me some hints.
    > > >
    > > > I have 2 web pages. There is an add button on the 1st page. When the
    > user
    > > > clicks on it, the 2nd page pops up. User can select products on the
    2nd
    > > page
    > > > and clicks ok. Then the 2nd page closes, and the focus backs to the
    1st
    > > > page. The selected products needs to store in a datagrid in the 1st
    > page.
    > > >
    > > > I am not sure what is a good way to implement this scenario in .Net.
    > Very
    > > > appreciate it if anyone provides any idea, link, or code snippet.
    > > >
    > > > Thanks.
    > > >
    > > >
    > >
    > >
    >
    >

    ZaHeer Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139