如何在另一个用户控件 ID 中获取用户控件 ID

How to get user control id inside another user control id?

本文关键字:ID 控件 用户 获取 另一个      更新时间:2023-09-26

如何在另一个用户控件中获取一个用户控件 ID。使用java脚本。请帮助我。

 window.onload = function CheckQueryString() 
 {      
  // here i want to get user control id
 }

如果我理解你的问题是正确的,你可以做这样的事情

// get a handle on your original control 
var myControl = $('[id$="<controlID>"]'); 
// and then access it's properties 
var myRuntimeId = myControl.eq(0).attr('id');