well, i don't see any bug in your code. perhaps there is something wrong with 
your button definition.  

> Date: Wed, 16 May 2012 03:42:17 -0700
> Subject: [DotNetDevelopment] .net
> From: [email protected]
> To: [email protected]
> 
> i
> want to add controld dynamically with this code
> protected void add_button(Button button)
> {
>    try
>    {
>         panel1.Controls.Add(button);
>    }
>    catch (Exception ex)
>    {
>          label1.Text += ex.Message.ToString();
>    }
> }
> 
> but it is throwing error "button not recognized".
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML
> Web Services,.NET Remoting" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en
> or visit the group website at http://megasolutions.net
                                          

-- 
You received this message because you are subscribed to the Google
Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML
Web Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en
or visit the group website at http://megasolutions.net

Reply via email to