简体   繁体   English

如何将数据从一页发送到另一页,使得该页无法导航C#Web应用程序

[英]How To Send Data From One Page To Another Such That Page Do Not Navigate C# Web Application

i want to navigate only data from one page to another i am using this code to navigate data to another page that is, 我只想将数据从一个页面导航到另一页面,我正在使用此代码将数据导航到另一页面,即

FROM FIRST PAGE
Response.Redirect("testing.aspx?Parameter=" + txtCommission.Text);

To SECOND PAGE
txtCommission.Text = Request.QueryString["Parameter"].ToString();

but by using this code i am also navite to another page while i want to just send data to the Second page when i check check box?? 但是通过使用此代码,我也可以导航到另一页,而我想在选中复选框时仅将数据发送到第二页?

hopes for your suggestions.. 希望您的建议。

That is not possible. 这是不可能的。 If the page isn't open anywhere, then you can't send any data to it without opening it. 如果该页面未在任何地方打开,那么您不打开它就无法向其发送任何数据。

The server code that produces a page only runs when the page is requested, the rest of the time the code is not active and there is no Page instance for the page. 生成页面的服务器代码仅在请求该页面时运行,其余时间该代码不活动并且该页面没有Page实例。

If the page would be open in another window, you could access the page using Javascript as long as you have a reference to it (which you only have in the code that has opened that window), or if that page has opened the current page so that you can use window.opener or window.parent to get the reference to it. 如果该页面将在另一个窗口中打开,则只要您具有对Javascript的引用(只有在打开该窗口的代码中就有该引用),或者该页面已经打开了当前页面,就可以使用Javascript访问该页面。这样您就可以使用window.openerwindow.parent获得对其的引用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM