Generally the asp.net server form action property point to current url. This can be changed using the below class which inherited Stream. This new user-defined class "clsResponseModifier" gets the form tag through regex match and replace the action url that we specify. First create this class "clsResponseModifier"
public class clsResponseModifier : Stream
{
private Stream _sink;
private long _position;
string _url;
public override bool CanRead { get { return true; } }
public override bool CanSeek { get { return true; } }
public override bool CanWrite { get { return true; } }
public override long Length { get { return 0; } }
public override long Position { get { return _position; } set { _position = value; } }
public override void SetLength(long length) { _sink.SetLength(length); }
public override void Close() { _sink.Close(); }
public override void Flush() { _sink.Flush(); }
public clsResponseModifier(Stream sink, string url)
{ _sink = sink; _url = "$1" + url + "$3"; }
public override long Seek(long offset, System.IO.SeekOrigin direction)
{ return _sink.Seek(offset, direction); }
public override int Read(byte[] buffer, int offset, int count)
{ return _sink.Read(buffer, offset, count); }
public override void Write(byte[] buffer, int offset, int count)
{
string s = System.Text.UTF8Encoding.UTF8.GetString(buffer, offset, count);
Regex reg = new Regex("(
protected void Page_Load(object sender, EventArgs e)
{
this.Response.Filter = new clsResponseModifier(this.Response.Filter, "your_new_actional_url");
}