Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > ASP.NET 4 General Discussion
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 16th, 2011, 11:24 PM
Authorized User
 
Join Date: Mar 2011
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
Default 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
Reply With Quote
  #2 (permalink)  
Old April 17th, 2011, 04:28 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

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
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
  #3 (permalink)  
Old April 23rd, 2011, 10:10 PM
Authorized User
 
Join Date: Mar 2011
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
Default

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.
Reply With Quote
  #4 (permalink)  
Old April 24th, 2011, 12:56 PM
Authorized User
 
Join Date: Mar 2011
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
Default

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.
Reply With Quote
  #5 (permalink)  
Old April 24th, 2011, 01:52 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

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
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
  #6 (permalink)  
Old April 25th, 2011, 10:58 AM
Authorized User
 
Join Date: Dec 2004
Location: Madurai, Tamil Nadu, India.
Posts: 69
Thanks: 0
Thanked 5 Times in 5 Posts
Send a message via Yahoo to whiterainbow
Default

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.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pass XSL variable back to asp.net page ayamas XSLT 8 September 14th, 2006 06:07 AM
How to pass variables from Aspx page to Asp Page jayaraj Classic ASP Basics 2 May 23rd, 2004 06:56 AM
How to pass the variables in Aspx page to Asp Page jayaraj ASP.NET 1.0 and 1.1 Basics 3 May 23rd, 2004 06:55 AM
Pass data from Web page to Word Doc kilika Classic ASP Professional 1 April 8th, 2004 06:14 PM



All times are GMT -4. The time now is 02:08 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.