开发者

Read value from one aspx page to another

开发者 https://www.devze.com 2022-12-23 01:43 出处:网络
开发者_开发知识库i have two pages: 1) web control(ascx page) and 2) web page(aspx page without master page).
开发者_开发知识库

i have two pages: 1) web control(ascx page) and 2) web page(aspx page without master page). Now i calculate some values on page2 through google api through Javascript on render, and i need to transfer these values to page 1 in a hidden field through code. please help

Khushi


One way (of many):

  • On the Client side: Fill the hidden field, submit the form (with js)
  • Code Behind Page 2: Collect the data in the code behind, Populate the session, Response.Redirect to page 1

Another:

  • Without using the the hidden field, you could just append the calculation result to the query string. (/page.aspx?myResult=xy)


Obvious, quick answer: use querystring or Session object.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号