2 Replies - 393 Views - Last Post: 20 January 2012 - 10:21 AM Rate Topic: -----

Topic Sponsor:

#1 Blasterman007  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 25
  • Joined: 15-September 09

Can Client process 2nd ASP Page with return result?

Posted 19 January 2012 - 08:21 PM

OK - amazingly enough this web page appears to actually do what I was looking for.

I wanted to click a button on the webpage to process server side code. If code passes or fails, be able to determine what happended and change HTML accordingly to reflect results. I was thinking about client side button opening a second ASP page that ran the server side script and then use session variables for a return result but without reloading the client page, wasn't sure how to read the session back in.

The button below for attachments appears to do exactly what I am looking for. The form above is not submitted and the page does not appear to reset. After a successful upload, the page changes slightly to reflect the results. Again, all without submitting the form or reloading the page. I don't want to reload the page because I want the original form data and the response from the second code written to a DB as a single record.

Code is always appreciated but terminology would be fantastic as well. it's one of those cases that I know what I want, know it appears possible (based on below), and now what is it called so I can try to research (google) it for understanding and potential samples?

Any advice would be appreciated.

Thx.

Is This A Good Question/Topic? 0
  • +

Replies To: Can Client process 2nd ASP Page with return result?

#2 Nakor  Icon User is offline

  • ASP.NET/C# Developer
  • member icon

Reputation: 346
  • View blog
  • Posts: 1,228
  • Joined: 28-April 09

Re: Can Client process 2nd ASP Page with return result?

Posted 20 January 2012 - 09:19 AM

Look into AJAX (asynchronous javascript and xml). Ajax basically allows you to send a request to your server and to update a section of your page with data returned from your server without needing to reload the entire page.

If you are using asp.net webforms then you'll want to do some research on using UpdatePanels as these make it very simple to ajaxify (probably not a real word :P) your page.

If you are not using asp.net webforms then the best solution would probably be to look into JQuery, specifically the $.Ajax or $.Post methods.

This post has been edited by Nakor: 20 January 2012 - 09:25 AM

Was This Post Helpful? 1
  • +
  • -

#3 Blasterman007  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 25
  • Joined: 15-September 09

Re: Can Client process 2nd ASP Page with return result?

Posted 20 January 2012 - 10:21 AM

Thank you - Will look into your suggestions today.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1