简体   繁体   English

如何将参数从通用处理程序文件传递到ASPX页面

[英]How to pass parameter from generic Handler file to aspx page

I want to show a specific persons identity on an aspx page on page load (data includes photo, name, .. etc) On aspx page loading, handler file runs in backhand i fetch data from database, inside this handler file. 我想在页面加载时的apx页面上显示特定的人的身份(数据包括照片,姓名等)。在aspx页面加载时,处理程序文件反手运行,我从该处理程序文件中的数据库中获取数据。 i used handler, for to convert image; 我用处理程序来转换图像; otherwise i would just use aspx page load. 否则我只会使用aspx页面加载。 But had to return also other columns too for the specific record). 但对于特定记录,还必须返回其他列)。

And gotto return data to aspx page and show in aspx controls like; 然后将数据返回到aspx页面并显示在aspx控件中; image control, label control.. etc. 图像控制,标签控制等

Is it possible to access an aspx page's server control id, from a generic handler ashx file? 是否可以从通用处理程序ashx文件访问aspx页面的服务器控件ID? For example, inside ashx file, can i assign a value to a label control which belongs to an aspx page? 例如,在ashx文件中,我可以为属于aspx页面的标签控件分配值吗?

Or, are there any other ways to pass parameters to an aspx page from an ashx file? 或者,还有其他方法可以将参数从ashx文件传递到aspx页面吗? Simply, I want my ashx file return an object record to aspx page, and Show the record in asp.net controls. 简而言之,我希望我的ashx文件将对象记录返回到aspx页面,并在asp.net控件中显示该记录。

如果在页面“打开”时显示图像和其他数据,则应该只在页面加载事件中从数据库中读取数据,然后更新页面控件。

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

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