Gustavo

Gustavo

  • NA
  • 1.3k
  • 449.7k

How Do I: Setup a Control for a (String)

Jun 4 2010 3:36 PM



Hello:
 
I am trying to setup a string in a Class to set the value of a string in the calling Form.
Below is the code that I have but I get an error on the underlined. Is my syntax wrong or do I have to use a special 'using'?
Form FromForm = (Form)TheControlEvent.FindForm();
String FromString = (String)FromForm.Controls.Find("RunAs", true);
 
 
I will also need to do this for a DataTable:  
DataTable FromDataTableRecord = (DataTable)FromForm.Controls.Find("DataTableRecord", true);

 
 
So: I am trying to get the value of a string called: "RunAs" from a form that I only have the name of as: Form FromForm = (Form)TheControlEvent.FindForm();

Answers (15)