Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Meta Data and the Macro Substitution
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
00782893
Message ID:
00783129
Views:
18
Thanks. What is the using statement for Assembly? to get a clean compile?

>Hi Stephen,
>
>You need to use Reflection to dynamically create instances of a class. You use the Assembly.CreateInstance method to do this.
>
>
>try
>{
>   Assembly tempAssembly = Assembly.GetExecutingAssembly();
>   // if class is located in another DLL or EXE, use something like
>   // Assembly tempAssembly = Assembly.LoadFrom("myDLL.DLL");
>   // or
>   // Assembly tempAssembly = Assembly.LoadFrom("myEXE.exe");
>
>   // class to use;
>   MyObject obj = (MyObject)tempAssembly.CreateInstance(lcO11);
>}
>catch(Exception ex)
>{
>   MessageBox.Show("Error creating class");
>}
>
>
>>Meta data is on a MSDE table with Object, Column and Form.
>>
>>string lcurl=this.ToString().Trim() ;
>>int lncurl = lcurl.Length-9;
>>lcurl =lcurl.Substring(4,lncurl);
>>string strConnection = "SERVER=(local);Trusted_Connection=Yes ";
>>string strSQL = "SELECT * from dbo.depmeta where me_form = '"+lcurl+"' "
>>
>>I get my FORMS relationships between objects "MmDropDown1" and the column it came from "ap_open".
>>
>>I can go against the ds to define what the original data was on the form:
>>lcC1 = ds.Tables[0].Rows[i].ItemArray[3].ToString();
>>lcCurr = myDataSet.Tables[0].Rows[0][lcC1.Trim()].ToString();
>>
>>To scrape the webforms objects I am starting with :
>>lcO1 = ds.Tables[0].Rows[i].ItemArray[2].ToString();
>>lcO11 =lcO1.Substring(0,3);
>>if (lcO11 == "MmT") { // Textbox
>>
>>How do I get the string in lcO1 to act as a reference to the actual object? Like
>>lcO1.Text
>>
>>I have also tried :
>>if (lcO11 == "MmT")
>>{
>> lcS = this.[lcO1].Text ;
>>}
>>
>>Any ideas?
>>
>>Sure & would be great here.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform