Hi guys
I have a Grid in one of a web-page in which in the first column (which is hidden) i have the name of the control like
Dim sSelectedControl As String = GridSystemRules.DisplayLayout.SelectedRows.Item(0).GetCellValue(GridSystemRules.Columns.Item(0))
Now what i want is can i have the handle or refrence of that control from the string above so i can use that object ,the control could be textbox,listbox or any other control
In VB .Net i can instatiate any form by using this code which takes the form name and instiate the new form but here i don't know how to get handle from the string
Try
Dim tempAssembly As System.Reflection.Assembly = System.Reflection.Assembly.GetExecutingAssembly()
Dim frm1 As Form = CType(tempAssembly.CreateInstance(textBox1.Text), Form) ' as Form;
frm1.Show()
Catch ex As Exception
MessageBox.Show("Error creating: " + ex.ToString())
End Try
Regards
Nouman
Nouman Zaheer
Software Engineer
MSR
I have a Grid in one of a web-page in which in the first column (which is hidden) i have the name of the control like
Dim sSelectedControl As String = GridSystemRules.DisplayLayout.SelectedRows.Item(0).GetCellValue(GridSystemRules.Columns.Item(0))
Now what i want is can i have the handle or refrence of that control from the string above so i can use that object ,the control could be textbox,listbox or any other control
In VB .Net i can instatiate any form by using this code which takes the form name and instiate the new form but here i don't know how to get handle from the string
Try
Dim tempAssembly As System.Reflection.Assembly = System.Reflection.Assembly.GetExecutingAssembly()
Dim frm1 As Form = CType(tempAssembly.CreateInstance(textBox1.Text), Form) ' as Form;
frm1.Show()
Catch ex As Exception
MessageBox.Show("Error creating: " + ex.ToString())
End Try
Regards
Nouman
Nouman Zaheer
Software Engineer
MSR