开发者

Read value from one aspx page to another

开发者_开发知识库

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜