简体   繁体   中英

Asp.Net label text resets when go to back page through browser back button

Hello i am working on ASP.NET I have a label called lblReport and 10 links, when i click on a link lblReport text is set to Report name initially label has no text and page also has a button. when i click on button it go to report page, when i go to back page from report page lblReport text is get reset.

what i need is on going to back page lblReport text should be set to selected report name

here is javascript function

function fun(s, rpt) {

    document.getElementById("lblId").value = s;
    document.getElementById("lblReport").innerHTML = rpt;
}

使用隐藏字段存储lblReport文本,因为回发时不会刷新隐藏字段。

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM