search

Home  >  Q&A  >  body text

javascript - How to pass the value of the variable in the asp.net backend .cs file to the frontend aspx for use (JS can also be used)

As the title says, I am making a paging function, because one page in .net corresponds to a background processing program, which feels a little different from Java, so I would like to ask how to pass the values ​​​​in the variables in the background Go to his corresponding front page:
Background handler a.cs:

## Front-end display page a.aspx:

How to get these background values ​​during paging?
is now a null value

我想大声告诉你我想大声告诉你2809 days ago594

reply all(1)I'll reply

  • 大家讲道理

    大家讲道理2017-05-18 11:01:59

    You can define a variable in the a.cs file to store the total number of pages
    Write a method
    GetPageTotalPage(){
    return totalPage;
    }

    In the frontend you can write like this <%=GetPageTotalPage()%>

    reply
    0
  • Cancelreply