ASP.NET Page.ispostback相当于JSP / Java的

编程入门 行业动态 更新时间:2024-10-20 13:51:19
本文介绍了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的

本文发布于:2023-11-03 15:32:01,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1555460.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Page   NET   ASP   Java   JSP

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!