How do add controls from 'codebehind' ?
-
I have a table, i m adding rows in this table through the code-behind (.cs file). Is there any way to add
asp:textbox
orasp:Button
in this table through the code-behind ??? The position (row no. in the table) depends on the data present in the xml file... :) -
I have a table, i m adding rows in this table through the code-behind (.cs file). Is there any way to add
asp:textbox
orasp:Button
in this table through the code-behind ??? The position (row no. in the table) depends on the data present in the xml file... :) -
thanx Sherin Iranimose How to add event handlers to these controls >
-
thanx Sherin Iranimose How to add event handlers to these controls >
C#
control_Name.Event_Name += new EventHandler(Function_Name);
vbAddHandler control_Name.Event_Name, AddressOf Function_Name
http://support.microsoft.com/kb/317794[^]EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
-
C#
control_Name.Event_Name += new EventHandler(Function_Name);
vbAddHandler control_Name.Event_Name, AddressOf Function_Name
http://support.microsoft.com/kb/317794[^]EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
Sherin Iranimose wrote:
C# control_Name.Event_Name += new EventHandler(Function_Name);
Thanx
-
Sherin Iranimose wrote:
C# control_Name.Event_Name += new EventHandler(Function_Name);
Thanx
But, if your controls are added in page load or later, the event tree won't be built so the events will not fire.
Christian Graus Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
-
But, if your controls are added in page load or later, the event tree won't be built so the events will not fire.
Christian Graus Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
You are right. :) But I have a doubt about 'page load'....
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
-
But, if your controls are added in page load or later, the event tree won't be built so the events will not fire.
Christian Graus Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
Christian Graus wrote:
But, if your controls are added in page load or later, the event tree won't be built so the events will not fire.
Then, whats the solution ? where else in the code-behind the controls can be added ?
-
Christian Graus wrote:
But, if your controls are added in page load or later, the event tree won't be built so the events will not fire.
Then, whats the solution ? where else in the code-behind the controls can be added ?
Try it by adding on page load.
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.