本文介绍了ASP.NET Page.ispostback相当于JSP / Java的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有任何ASP.NET Page.IsPostback相当于JSP / Java的?我需要做的就是检查这个请求是否是第一次或者是造成后回来。有JSP页面上几个组合框,我需要加载它仅适用于第一次,(我从数据库加载组合框的数据)不每次重新加载页面。我们重新加载在同一页基于各种输入/选择等,所以我一直在寻找这种类型的方法。
解决方案 如果(POST.equalsIgnoreCase(request.getMethod())及和放大器; ((request.getRemoteURL()= NULL和放大器;!&安培; request.getRemoteURL()。的toString()。equalsIgnoreCase(yoursite)){ //调用回传}您还可能看到此question
Is there any ASP.NET Page.IsPostback equivalent in JSP/Java? What I need to do is check whether this request is first time or is it result of post back. There are few Combo Boxes on JSP page and I need to load it only for the first time, (I am loading combo box's data from DB) not everytime page reloads. We reload the same page based on various input/selections etc. So I was looking for that type of method.
解决方案 if ( "POST".equalsIgnoreCase(request.getMethod()) && ((request.getRemoteURL() != null && request.getRemoteURL().toString().equalsIgnoreCase("yoursite")) { //postback call }You may also see this question
更多推荐
ASP.NET Page.ispostback相当于JSP / Java的
发布评论