Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.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 .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old December 7th, 2005, 11:44 AM
Authorized User
 
Join Date: Dec 2005
Location: , , .
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default Send data without opening a new window instance

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?

i.e.
Code:
Response.somethingthatidontknow("http://www.domain.com/page.aspx?param=" & value1 & "param2=" & value2 etc...)

Thanks in advance ;)

__________________
GET ENTERTAINED
Reply With Quote
  #2 (permalink)  
Old December 8th, 2005, 12:46 AM
Friend of Wrox
 
Join Date: Nov 2003
Location: , NJ, USA.
Posts: 1,346
Thanks: 0
Thanked 5 Times in 5 Posts
Default

response.redirect(" the page you want to go to")

Reply With Quote
  #3 (permalink)  
Old December 8th, 2005, 07:23 AM
Authorized User
 
Join Date: Dec 2005
Location: , , .
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

        Process.Start(startInfo)

        startInfo.Arguments = "http://www.somedomain.com/page.aspx?param=value&....etc."

        Process.Start(startInfo)



Thanks in advance ;)


Reply With Quote
  #4 (permalink)  
Old December 8th, 2005, 09:49 AM
Friend of Wrox
 
Join Date: Nov 2003
Location: , NJ, USA.
Posts: 1,346
Thanks: 0
Thanked 5 Times in 5 Posts
Default

I have no idea how to do that or if it is even possible.

Reply With Quote
  #5 (permalink)  
Old December 10th, 2005, 11:27 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,413
Thanks: 0
Thanked 16 Times in 16 Posts
Default

I think you can do what you want with something like this:

Dim objRequest As System.Net.HttpWebRequest
dim strUrl As String = "http://www.somedomain.com/page.aspx?param=value&....etc."

objRequest = CType(System.Net.WebRequest.Create(strUrl), System.Net.HttpWebRequest)
objRequest.GetResponse()



-Peter
Reply With Quote
  #6 (permalink)  
Old December 11th, 2005, 09:55 PM
Authorized User
 
Join Date: Dec 2005
Location: , , .
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
Thanks in advance :)

Reply With Quote
  #7 (permalink)  
Old December 12th, 2005, 03:24 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,413
Thanks: 0
Thanked 16 Times in 16 Posts
Default

What's the error you got?

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.

-Peter
Reply With Quote
  #8 (permalink)  
Old December 12th, 2005, 05:45 PM
Authorized User
 
Join Date: Dec 2005
Location: , , .
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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 :)

Reply With Quote
  #9 (permalink)  
Old December 15th, 2005, 11:01 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,413
Thanks: 0
Thanked 16 Times in 16 Posts
Default

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.

-Peter
Reply With Quote
Reply


Thread Tools
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
Opening a New Window GailCG ASP.NET 2.0 Basics 14 April 1st, 2008 11:32 AM
Opening another instance of Access with VBA dlamarche Access VBA 5 November 20th, 2006 10:22 PM
opening a new window rgpassey Javascript How-To 2 September 14th, 2005 11:38 AM
Close Parent window on opening child window pkdev Javascript How-To 8 April 11th, 2004 12:06 PM
Opening New Window james_sellwood ASP.NET 1.0 and 1.1 Basics 5 June 12th, 2003 11:43 AM



All times are GMT -4. The time now is 12:36 AM.


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