在其他页面中获取控件ID [英] Getting Controls ID in different page

查看:85
本文介绍了在其他页面中获取控件ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



如何在不同页面中获取控件ID?

Hi,

How can I get the Controls ID in different page?

推荐答案

控件是特定于页面的.如果要将某些控件值公开给其他页面,则可以使用属性(get-set)公开它们.

此外,如果您具有页面实例,则可以使用页面的``FindControl''方法使用控件ID查找该页面的控件.

更新:
您对问题做了一些修改.一旦回答,请不要删除.
如果您希望将控件的ID传递给各个页面,则可以使用相同的查询字符串或会话.

这些对您没有帮助,那么最好共享您正在研究的方案.


更新2 :
瞧,一旦您告诉自己的情况,答案将如何改变.您只需要设计一个用户控件.在此用户控件中具有参数控件,然后在所需的所有页面上使用此用户控件.
Controls are page specific. If you want to expose a certain control values to other page then you can expose them using properties (get-set) .

Further, if you have page instance then you can use ''FindControl'' method of the page to find a control of that page using control ID.

UPDATE:
You modified your question a little. Please don''t delete once answered.
If you are looking to pass on the ID of control to various pages then you can use query string or sessions for the same.

Is these does not help, then it would be better to share the scenario you are working on.


UPDATE 2:
See, how answer can change as soon you tell your scenario. You simply need to design a User Control. Have the parameter controls in this user control and then use this user control on all the pages where you need.


我编辑并回答了这个问题.但是在您的问题列表中找不到它了.您删除了吗?

如何获取其他页面中的控件ID?

您无法在另一个页面中获得页面的控件ID.
但是,您可以通过多种方法获得控件的价值.

您能解释一下您要做什么吗?
I edited and answered this question. But can''t find it anymore in your question list. Have you deleted it?

How can I get the Controls ID in different page??

You cannot get the control id of a page in another page.
But there are ways you can get the value of a control.

Can you explain what you are trying to do?


这篇关于在其他页面中获取控件ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆