Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

setting the action in an aspx form

jdrodasjdrodas Posts: 1Member
Hi everyone!

I'm just started writing a .NET app and I've already smashed myself against the wall!

Can you people tell me how can I set a different action to my form instead of the default one? my page's name is default.aspx and the code I wrote was:



" name="btnNext">


But When I look at the code in the html of the compiled page I see:



" name="btnNext">


What am I doing wrong?

Thank you in advance....

JuanD

Comments

  • NC01NC01 Posts: 4Member
    You can't do that in ASP.NET as the form has to PostBack to itself to maintain state. To go to another page use either:
    Response.Redirect("next-page.aspx");
    or
    Server.Transfer("next-page.aspx");

    HTH,
    NC...

    : Hi everyone!
    :
    : I'm just started writing a .NET app and I've already smashed myself against the wall!
    :
    : Can you people tell me how can I set a different action to my form instead of the default one? my page's name is default.aspx and the code I wrote was:
    :
    :
    :
    : " name="btnNext">
    :
    :
    : But When I look at the code in the html of the compiled page I see:
    :
    :
    :
    : " name="btnNext">
    :
    :
    : What am I doing wrong?
    :
    : Thank you in advance....
    :
    : JuanD
    :

Sign In or Register to comment.