How to fetch data from web page?

How to transfer data from a Web Page to another one?

  • Hi. I need some help, I want to transfer the input data from a Web Page to another one, I'm working in ASP using Visual Basic language. I guess I need to use Post and Get method, but I don't know how to do it. Can anybody help me, please? I really apreciate samples of the code.

  • Answer:

    Is this page inside the same application? If so, you can use Server.Transfer and the request querystring will survive, since there's no round tripping. i.e. Dim Fred, Bob Fred = Request("Fred") Bob = Request("Bob") If Bob = "Yes, send me to the other page" then Server.Transfer "BobPage.asp" End if ...and then BobPage.asp can also query Request("Bob")

@k@i S@sori at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

to get one web page to send data to another you need to either use forms or on the link that a user clicks on include get information in the form url.asp?var1=val1&var2=val2... If you don't want the user to see what information is being sent in a form use a hidden field <input type="hidden" name="myField" value="you won't see this except in source" />

John J

Switch to ASP.NET and you won't need to transfer the form data to another web page. Since ASP.NET uses the postback model (a much more elegant solution) the data entered into a web form is simply sent back to the same page. You can catch the "post back" in the code with if (!this.Page.IsPostBack) { // postback // process the input data } else { // initial load of the page // display the input form } Now you've reduced what would have taken two files to just one.

Railgun

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.