find HTML button from Usercontrol dynamically in c#

Last Reply 8 days ago By pandeyism

Posted 8 days ago

Usercontrol Design:

img  id='ST02' runat="server" alt='Unbooked' onclick="seat('02')" src='images/chair/G_chair.png' style='cursor:pointer;'/>

(there are so many predifend control like this)

usercontroll code behind :

word is control id coming from dyanamic.

HtmlButton mybtn = (HtmlButton)this.Page.FindControl(word);
// mybtn .Attributes["src"] = ResolveUrl("~/UserControls/foo.png");

//mybtn.Attributes["Visible"] = "false";
mybtn.Attributes.Remove("onclick");

i want to find only those control behind userconntorl page control id is word. (word is control id )

You are viewing reply posted by: pandeyism 8 days ago.
Posted 8 days ago
dilipsharm says:
word is control id coming from dyanamic.

 Will you please explain how you are assigning the control id ?

Please share your code.