Click to See Complete Forum and Search --> : how to convert string to Button


veerabhadra
October 10th, 2006, 05:31 AM
I know the id(string value) of button.Now i have to access the button depending on the string (id).

I know can create the Id(String) of the button from database.Now i have to access(convert that to button) the button based on the created Id.There is complesary a Button with that created Id.But iam unable match boath of them in ASP.Net with C#.net.

RobDog888
October 11th, 2006, 04:07 PM
It sounds like you want to use the .FindControl function and pass the id of the button control.

VB code, for now at least. :)
Dim btn As New Button
btn = Me.Form1.FindControl("btnID001")
btn.Enabled = False 'Or whatever