如何防止渲染页面导致删除有效(已回答)的项目? [英] how can prevent rendering pages which cause removing the effeced(answered) items?
问题描述
您好。
我已经通过Asp.net 4和sqlserver 2008制作了一个应用程序(sruvey)用户选择一个项目(单选按钮)并提交他们的响应将被插入到数据库中。
i想在每个页面中创建一个按钮,当用户想要修改他的答案时,能够返回上一页并更新他们。
所以我在一个页面上放了一个按钮,将页面重定向到上一页,但我在单选按钮中的所有答案都被删除了,而且没有我的回复的内容
页面内的
。代码用于按钮如下:
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:
Response.Redirect("GeneralCourse.aspx"); //this is the .net code which redirect page to back page
< br $> b $ b
<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我该怎么办?
非常感谢你..
so what i shall i do ?
thank you so much..
推荐答案
要么传递结果单选按钮选择上一页为QueryString
或使用重定向> javaScript
。
查看文章如何返回ASP.NET 2.0中的上一页 [ ^ ]了解有关重定向到上一页。
Either pass the result of the Radio Button selection to the previous page as aQueryString
or Redirect usingjavaScript
.
Check the article How to go back to the previous page in ASP.NET 2.0[^] to know more on redirecting to previous page.
这篇关于如何防止渲染页面导致删除有效(已回答)的项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!