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

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top