ASP.NET Url rewriting – change form action value

Before change you can see real file name:

<form name="aspnetForm" method="post" action="/templates/myPage.aspx" id="aspnetForm">

In the top Master Page change form action:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)    Me.form1.Action = Page.Request.RawUrlEnd Sub

After change:

<form name="aspnetForm" method="post" action="/english/AboutUs.aspx" id="aspnetForm">

Leave a Reply

Your email address will not be published. Required fields are marked *