 |
| ASP.NET 4 General Discussion For ASP.NET 4 discussions not relating to a specific Wrox book |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP.NET 4 General Discussion section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

April 16th, 2011, 11:24 PM
|
|
Authorized User
|
|
Join Date: Mar 2011
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
From a page, call another, get some data, pass it back to first page
I have a page of data intered by a user. To complete that page I need to call another page to do a lookup, select a row, then pass the selected row key data back to the original page and continue from there. Now this is probably pretty common activity but I'm still new to the ways of the web (asp.net). Can anyone point me to an example for this? Is there a better way than what I described?
Thanks 
|
|

April 17th, 2011, 04:28 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi there,
Can you elaborate a bit on what data you need exactly and where / how? From client side code?
I am thinking that ASP.NET Page Methods or Web Services would be a good solution, but it all depends on the actual scenario.
Cheers,
Imar
|
|

April 23rd, 2011, 10:10 PM
|
|
Authorized User
|
|
Join Date: Mar 2011
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
I have a page of patient data. I need to 'attach' this patient to a 'guarantor (of payment)'. My plan was to call a second page passing to it the last name of the patient. The second page would use the last name to look up all guarantors with the name then display them in a grid on that second page. The use would select one of the guarantors, the second page would then call the first page (hopefully still with all the fields filled out) passing to it the key to the selected guarantor.
|
|

April 24th, 2011, 12:56 PM
|
|
Authorized User
|
|
Join Date: Mar 2011
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
I should add here that the first page has just been filled in by the user. To complete the page the second page is called and the user selects the appropriate match from the grid and that value is passed back to the first page.
If I can do all of this from one page please let me know. I'm using a gridview so I can display enough info for the user to make a valid selection.
|
|

April 24th, 2011, 01:52 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
You can do it all from one page using Web Services or Page Methods. Did you check out the links I added to my previous post?
But again, it all depends. Your terminology makes things a bit confusing (what is "call a page" for example; call it from client side script? Do you post from one page to anoher? Do you let a page post back to itself and then use a Redirect or a Transfer to another), so I am not sure what it is you want and how you would want it implemented. You could also do this:
1. Page 1 Let user enter details and click Save
2. Save the changes and then redirect to page 2, passing the ID of what you just saved in the query stirng
3. Page 2: read the query string, find whatever you need to find and present it to the user.
4. Save the changes made by the user in page 2 and redirect wherever your users need to go.
Vague answer, but that's because question is a bit vague.
Cheers.
Imar
|
|

April 25th, 2011, 10:58 AM
|
|
Authorized User
|
|
Join Date: Dec 2004
Posts: 69
Thanks: 0
Thanked 5 Times in 5 Posts
|
|
Or you can do through a pop-up if you think that it is a feasible solution to your problem. Just pass the lastname to the popup, populate the guarantor details and pass the selected guarantor name back to the homepage using the JavaScript...
__________________
Thanks in advance.
Regards,
Senthil Kumar M.
|
|
 |