Click here to Skip to main content
15,908,015 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello.

I have made an application (sruvey) by Asp.net 4 and sqlserver 2008 which users select an item (Radio button) and submit their response which will be inserted into the database.

i would like to make a button in each page that when user wanted to modify his answers be able to return to previous page and Update them.

so i have put a button in one page which redirect the page toward previous page , but all of my answers in radio button are removed totoally and there is no trce of my responses

inside the page. the code is for button is below:
C#
Response.Redirect("GeneralCourse.aspx"); //this is the .net code which redirect page to back page


ASP.NET
<form id="fro"  runat="server">
              <asp:ImageButton ID="ImageButton1" runat="server" Height="43px"
             ImageUrl="~/Images/ForwardArrow.png" ToolTip="ثبت و ادامه سوالات نظرسنجی" 
             Width="150px" BorderColor="#1E6D8E" BorderStyle="Double" 
             BorderWidth="1px" onclick="ImageButton1_Click1"  />
     </form> 


so what i shall i do ?

thank you so much..
Posted
Comments
TrushnaK 20-Aug-13 3:32am    
it would be better if you use state management like (query-string,cookie etc..).

1 solution

Either pass the result of the Radio Button selection to the previous page as a QueryString or Redirect using javaScript.

Check the article How to go back to the previous page in ASP.NET 2.0[^] to know more on redirecting to previous page.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900