Change HtmlForm action in C# ASP.NET 3.5

后端 未结 6 1345
醉酒成梦
醉酒成梦 2021-01-18 15:11

I have a form as

When accessing in C# code-behind via



        
6条回答
  •  一整个雨季
    2021-01-18 15:54

    That's just not the way ASP.NET works. You can selectively set certain controls to post to a different page, however. This is called Cross Page Posting. See: http://msdn.microsoft.com/en-us/library/ms178139(v=vs.100).aspx. To perform a cross page postback with a button for example see: http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.button.postbackurl.aspx. Basically, you simply set the PostBackUrl for the button.

提交回复
热议问题