Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Redirect to a URL but without oppeing a new IE borswer 1

Status
Not open for further replies.

c100cbk2

Programmer
Sep 20, 2010
11
GB
Hi

I have a URL i need to post to but do not need to open another broswer window, the purpose it to allow those at the other end to record the detail in the parameters to their database and i do not need to know anything in return.

I have the url already but can any body give me some advice onthe the best way to go abou this and an example if you have one would be perfect.

code base is in vb.net 2

Much thanks in advance.
 
if your browser is opening a new tab/window, that is either a browser setting (open links in a new window) or the anchor tag has a target set.
Code:
<a target="..." href="apage.aspx">label</a>
in either case it's related to the client, not the server.

if you mean the browser refreshes the entire page, or something to that effect. than yes, that's the way the web works. send a request, get a response.







Jason Meckley
Programmer

faq855-7190
faq732-7259
 
I have mislead you, I do not have a browser session open. I want to from a vb.net applicatino ppost to a url and not have a browser open up to try and display a page.
I hope this makes a little more sense.
 
ok, that makes more sense. what does your code currently look like?

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
this also means the problem is not related to asp.net. it's how you send an http request from the application. you may want to try the vb.net forum instead.

If you aren't already, you will be using WebRequest.Create() to access the url.

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
Thank you for the tip jmeckley,

Here is my code which works perfectly in dev so, all being well, will be tested in live shortly.
Dim _request As System.Net.WebRequest

_request = WebRequest.Create(" _request.Method = "POST"
'_request.Timeout = 2000
_request.GetResponse()

This code runs a method in the form load of the web page to write to a text file in order to test the method gets called.

Any comments welcome.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top