Results 1 to 2 of 2

Thread: [RESOLVED] Two buttons posting to different locations

  1. #1

    Thread Starter
    Fanatic Member davebat's Avatar
    Join Date
    Dec 2002
    Posts
    727

    Resolved [RESOLVED] Two buttons posting to different locations

    Hi,

    I have an asp .net form and within it two buttons. One button posts to a page, the other posts to self.

    I don't have an issue, but some users report that upon pressing the first button that posts to another page, then pressing back in browser, the button that should post to itself and do stuff code behind posts to the other page.

    Can anyone help, a bit of code here but its standard stuff

    Code:
     
    <asp:Button ID="btnPreview" runat="server" PostBackUrl="xpreviewmycard.asp" Text="Preview" ValidationGroup="card" CausesValidation="true" />
    
    <asp:Button ID="btnsend" runat="server" Text="Send" ValidationGroup="card" CausesValidation="true" />
    Last edited by davebat; Dec 10th, 2010 at 10:26 AM. Reason: formatiing issues

  2. #2

    Thread Starter
    Fanatic Member davebat's Avatar
    Join Date
    Dec 2002
    Posts
    727

    Re: Two buttons posting to different locations

    Hey Ho, I added postbackurl to second button (Just calling itself) and it seems to work now.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width