I have two buttons, preview and Save. With help of preview button user can view the data based on the format and then can save.
But when preview is clicked, one text
Use Page.IsPostback() in your aspx code (server-side). Like this:
private void Page_Load() { if (!IsPostBack) { // the code that only needs to run once goes here } }
This code will only run the first time the page is loaded and avoids stepping on user-entered changes to the form.