.ASP C# Update button the forward to the next page

Posted on 2008-11-14
Last Modified: 2012-05-05

I have created an update button on a new page from a Data Navigate URL Fomatting string. which is the following "AccNum.aspx?AccNum={0}" and I've come from page "Default.aspx"

In the programming "onclick" the update sends a SQL query and then the page is blank after completion.
But I want the update got to go back to the previous page. How is this possible?

I have attached the current code for the button

protected void UpdateButton_Click(object sender, EventArgs e)


 String updateSQL;

 updateSQL = "UPDATE..."        

 AccessDataSource1.SelectCommand = updateSQL;


Open in new window

Question by:ShockUK
    1 Comment
    LVL 9

    Accepted Solution

    response.redirect(String.Format(""AccNum.aspx?AccNum={0}"", variable));  ?

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    Suggested Solutions

    There are two main kinds of selectors in CSS: One is base selector like h1, h2, body, table or any existing HTML tags.  For instance, the following rule sets all paragraphs (<p> elements) to red: (CODE) CSS also allows us to define our own custom …
    What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
    Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
    The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now