ASP.NET 1.0 and 1.1 BasicsASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP.NET 1.0 and 1.1 Basics 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 .
Hi,
I just want to send the data from the domain I am to the other
domain and I don't want it to open a new window and I don't need to receive anything back. Is there any member/method of web response and request class that is able to do the job?
Hi friend,
Thanks for the answer but actually it was not my question. I need to first send some data or with other words to execute couple links (without opening a new windows) just same as we would do that through GET Method but on server-side if it's possible. and then i will redirect the user to the new page of my app.
Means scenario goes like this:
1. Execute link1 (i.e. http://www/domain.com/save.aspx?param=value&...etc..")
2. Execute link1 (i.e. http://www/anotherdomain.com/save.aspx?param=value&...etc..")
'notice that i would like if it is possible to stay on same page of my app durring this steps
3. Save data to DB
4. Redirect to another page i.e. Response.Redirect("mypage.aspx")
I tried with process class but i couldn't make it to the end (simply it doesnt work)
Dim startInfo As New ProcessStartInfo("IExplore.exe")
startInfo.WindowStyle = ProcessWindowStyle.Hidden
Well Peter you were right it works flawless ...
Btw, i tried with this code but it seems like it couldnt help me much
Code:
Dim getValues as String = "http://www.domain.com/reg_final.php?ref=crm836&email=" & Session("myEmail") & "&fname=" & Session("myfName") & "&lname=" & Session("mylName") & etc....."
Dim request As Net.HttpWebRequest = Net.WebRequest.Create(getValues)
With request
.ContentType = "application/x-www-form-urlencoded"
.Method = "GET"
End With
Thanks a millions ;)
Btw, how to get the response in XML format ... say i tried something like this but it throws me an error all the time:
Code:
Dim response As Net.HttpWebResponse
' Obtain the response, e.g. the XML doc
response = CType(request.GetResponse(), Net.HttpWebResponse)
' Obtain the response strema
Dim s As IO.Stream = response.GetResponseStream
' Load the stream into a new dataset
Dim ds As New DataSet
ds.ReadXml(s) 'this line get an error msg
I tried something like this myself. I was just trying to get the response to a string just to show it. But I hadn't thought of dumping the stream directly to an XML document.
Hi Peter,
Thanks for your kindness and willing to help me. Btw, can you show me an example how to get response no matter in XML or any other format (text file, string etc.)???
THnaks ones again :)
I haven't done this myself aside from seeing where the HttpWebResponse class is used so I'd have to take time to play with it myself to find an answer.