PostBackUrl and the Insert command

Joined
Jul 9, 2007
Messages
1
Reaction score
0
When a user submits data in a form, I want to tell the user that the information has been saved to the database. But when I use the PostBackUrl="~/success.aspx", the data is not written. However, it works without the PostBackUrl. For example:


<asp:Button
ID="InsertButton1"
runat="server"
CausesValidation="True"
CommandName="Insert"
Text="Submit (will work)">
</asp:Button>

<asp:Button
ID="InsertButton2"
runat="server"
CausesValidation="True"
CommandName="Insert"
Text="Submit (will not work)"
PostBackUrl="~/success.aspx">
</asp:Button>

Any ideas?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
SterlingLa
Top