문제

In we have IsPostBack that we use to validate if is or isn't a postback.

if (!IsPostBack)
{
    // Validate initially to force asterisks
    // to appear before the first roundtrip.
    Validate();
}

There is a javascript/jQuery equivalent?

Note that

I don't wanna a solution using any other language than javascript (not excluding html, since it is not a programming language). Those questions below show how to do it using , I don't wanna that!. I want a solution in javascript (or jQuery) ONLY.

도움이 되었습니까?

해결책

No, there is no direct equivalent. You'd have to track the state of the application using JavaScript. One popular way of doing that is hashbang urls. Ex:

http://domain.com/#some-state or http://domain.com/#/some-state

window.location.hash exposes the hashbang url and there are frameworks like AngularJS that make working with hashbang urls to control state and what view is displayed very easy.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top