sarsnake
sarsnake

Reputation: 27713

How do I make an asp.net page submit to a specific IP address?

How do I make an asp.net page submit to a specific IP address?

Every time the page submits (during postback) I wish to have it submit to a specific IP address? Is that possible in .net 3.5?

Upvotes: 2

Views: 174

Answers (3)

rick schott
rick schott

Reputation: 21117

How to: Post ASP.NET Web Pages to a Different Page

<asp:Button 
  ID="Button1" 
  PostBackUrl="~/TargetPage.aspx"
  runat="server"
  Text="Submit" />

Upvotes: 1

John K
John K

Reputation: 28869

If you are relying on the user to interact with a Button for postback operations, then use the Button.PosbackUrl property. You can specify a completely different host.

Upvotes: 0

koosk
koosk

Reputation: 104

In Asp.Net 3.5 (you must have Visual Studio SP1 installed) you can set the Form's action in the code behind page by using form.Action = 172.21.151.203

Please note that this will only work with the web application model and not on the web site model.

Upvotes: 1

Related Questions