I have a problem when i click a hyperlink to pop up a report; the main page will display 'The Page Has Expired'. It happens when i click a RadioButtonList
and then click a button. The RadioButtonList
has a postback
function and the button will pop up a new window using javascript
. Meanwhile, if i didn't click the RadioButtonList
and only click the button and then click the hyperlink; it will not produce 'The Page Has Expired'. May i know what is the problem behind this and how i can solve this?
the javascript
function when the button clicked:
function buttonClicked(event, object) {
var variableA = "<%=variableA %>";
var variableB = "<%=variableB %>";
var variableC = "<%=variableC %>";
window.open('../Common/RandomPage.aspx?variableA=' + variableA + '&variableB=' + variableB + '&variableC=' + variableC, '', ' height=500,width=850,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=yes');
}
the RadioButtonList
in aspx:
<asp:RadioButtonList ID="RadioButtonList" runat="server" AutoPostBack="true" RepeatDirection="Horizontal" OnSelectedIndexChanged="RadioButtonList_SelectedIndexChanged" >
the RadioButtonList
function when RadioButton clicked(.cs):
protected void RadioButtonList_SelectedIndexChanged(object sender, EventArgs e)
{
//hide/show some details;
}
I have found the problem. There's History.back()
method in the code which basically function as clicking the 'Back Button' in the browser. Here is i solve my problem:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.