vb.net post

I'm trying to create a vb.net button that will redirect a user to another site while appending a query string based on user entries & that will do a post instead of a get. The page unfortunately is an aspx page that inherits 2 master pages, user controls, includes ajax, etc. so I can't just create a standard html page. Is there a way to do this?
robanddeannaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

blandyukCommented:
If you generating a query string on the end of the URL, why do you need to do a POST request? The easiest way is applying a onclick event to a button:

<asp:Button ID="btnDoIt" Text=" Go " runat="server" />

Code:

btnDoIt.Attributes.Add("onclick", "window.open('http://www.domain.com/page.aspx?id=123');")
0
robanddeannaAuthor Commented:
Thank you for the tip but unfortunately I have already tried that & it does not work. The reason I want the button to do the post is because I have a hotel reservation form on our site that sends the URL & query string. If I do this in a standard (client side) html page, it works fine. However, if I do this in a server side aspx page, it does not. Instead it takes me to another reservation form that is hosted on the external site. I need to bypass the external reservation form & have it take me directly to the list of available hotel rooms & rates for the dates entered by the user.
0
blandyukCommented:
mmmmm, I don't see any other way of doing this apart from used .net WebRequest, WebResponse classes and passing the POST via that. Here is a site for reference:

http://www.winsocketdotnetworkprogramming.com/httpgetrequestdotnetworkprogramming10f.html

I'll see if I can find anything easier.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
robanddeannaAuthor Commented:
Thank you for your help - unfortunately, I will not have time to test or try this as it appears to be quite involved.  I appreciate your time.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.