How to pass a hidden field from one page to another?

前端 未结 5 2071
别那么骄傲
别那么骄傲 2021-01-28 01:23

I have a .Net class library. I want to pass a hidden variable from once code behind page and fetch it in another code behind page. PLease note I dont have any design page(aspx p

5条回答
  •  天命终不由人
    2021-01-28 01:53

    What about cross-page postbacks (see Cross-Page Posting in ASP.NET Web Pages, http://msdn.microsoft.com/en-us/library/ms178139.aspx)? Never really used it, but it could be an option. Otherwise, you could access your hidden form element via the old school Request.Form . Another option could be to always have this hidden element on every page by putting it in the master page. Then you expose it as a public property and can get/set it to your heart's content.

提交回复
热议问题