How to access the dynamically created control
-
Hello Sir, I have created dynamic table which contains textboxes which counts equal to the value in the text box (for entering number of rows to show) on the page & hence appears it. Now, I want that when user click to any of the textbox, I want to have its ID so that I will work on it further OR how to know which textbox have been focused. I m not getting any idea as it is dynamic control. Please help me! Thanx. :)
-
Hello Sir, I have created dynamic table which contains textboxes which counts equal to the value in the text box (for entering number of rows to show) on the page & hence appears it. Now, I want that when user click to any of the textbox, I want to have its ID so that I will work on it further OR how to know which textbox have been focused. I m not getting any idea as it is dynamic control. Please help me! Thanx. :)
When u dynamically add control.at the same time u also add id for each of the textbox in for loop..and then access the id(i.e TextBox) which u want.....
Sharing Of Knowledge Provides Solution....
-
Hello Sir, I have created dynamic table which contains textboxes which counts equal to the value in the text box (for entering number of rows to show) on the page & hence appears it. Now, I want that when user click to any of the textbox, I want to have its ID so that I will work on it further OR how to know which textbox have been focused. I m not getting any idea as it is dynamic control. Please help me! Thanx. :)
The big issue with dynamic controls is that if you don't create them before page load, they have no viewstate.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
When u dynamically add control.at the same time u also add id for each of the textbox in for loop..and then access the id(i.e TextBox) which u want.....
Sharing Of Knowledge Provides Solution....
Rohit, I have did it otherwise, text boxes wud not appeared on the page.
-
Rohit, I have did it otherwise, text boxes wud not appeared on the page.
I suspect your question is not clear. If you want to access the controls on the client side, you need to pass the ClientID property through to javascript on the client side. This would be the same no matter how they were created.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
The big issue with dynamic controls is that if you don't create them before page load, they have no viewstate.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
Ok Sir, but I just want to track which txt box has been focused , or hovering or clicking it a msg to show or will go to the redirected page. It will also work. Your excellency. :)