?
Solved

Performing an actual form post from Asp.net code behind

Posted on 2014-03-20
4
Medium Priority
?
375 Views
Last Modified: 2014-03-25
Hello, I am in the process of making some asp.net/php integrations and I need to be able to load an asp.net page, and as soon as that page opens do an actual form post of two custom values to a php page.  The php page then reads to values and loads them to the database.

My issue is that I am having trouble trying to figure out how to do an actual form post where the page redirects to the php page (just as if I were doing a form post with a submit button).  I do know how to form post from asp.net code behind, but when I do that the page does not redirect.  How can I do a real form post as soon as the asp.net page loads to the php page?
0
Comment
Question by:jtmerch
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39943443
I don't think you can because the post from the 'code behind' does not involve the browser at all.  The best you could do is to perform the post and redirect the browser when you get a response.  That is often done with PHP only code.
0
 

Author Comment

by:jtmerch
ID: 39943597
Wow so there is no way to just automate a true form post in .net?
0
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 1500 total points
ID: 39943780
I think you're confusing things.  If you were to do the form post from the web page in the browser, the browser would go to that page.  But when you do it in the code behind on the server, it does not involve the browser.  In fact the browser knows nothing about it so there is nothing to take it to that next page.  

And it's not just .NET.  The same thing is true in all the other server side languages.  The browser doesn't know about anything you do on the server unless the info is sent to the browser.
0
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 39944100
I think a bit of Client / Server theory may be helpful to you as you seek to frame the problem.
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/A_11271-Understanding-Client-Server-Protocols-and-Web-Applications.html
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question