Spontaneous Publicity
blogs are the new phone book

Using Reflection in Asp.Net 2.0 Web Applications

February 27, 2006 04:18 by Luke
I have been searching far and wide for this solution for a long time and I just sort of happened upon it...so I thought I would share it here. One of the big changes from Asp.Net 1.1 to 2.0 was the format of their web projects. I actually really like the new format alot. There was, however, one problem that I could not get past. I have written various "plug-in" type frameworks where you specify classes in an xml file which are loaded at runtime. The xml usually looks something like this: Item assembly="myAssembly" class="myClass" /> so at runtime I just have to load the given assembly and then I can create an instance of the given class. The problem with the new web project format is that you don't really have control over your web project assembly name like you used to in Asp .net 1.1. So, here ist he trick I learned: Assembly assembly = Assembly.Load("App_Code");
Tags:
Categories:
Actions: E-mail | del.icio.us | Permalink | Comments (12) | Comment RSSRSS comment feed

Comments

August 28. 2010 10:11

Malvina Yammine

do you have an rss feed? I want to add it to my reader but I can't find it...

Malvina Yammine

August 29. 2010 03:15

Caleb Gueth

are you using wp for this blog?

Caleb Gueth

August 29. 2010 13:04

seduction affiliate

hey, with so many comments you should add an affiliate program to your blog and make some money...

seduction affiliate

August 30. 2010 00:29

blonde jokes

how can I advertise on your blog?

blonde jokes

August 30. 2010 02:39

dating affiliates

you may make some money if you add an affiliate program to your blog...

dating affiliates

August 31. 2010 13:53

jokes

nice blog! keep the good work!

jokes

September 1. 2010 17:42

fitness training

don't forgot to get out and exercise...

fitness training

September 2. 2010 16:50

Wes Nouth

this was a very entertaining read.  i enjoyed it very much!

Wes Nouth

September 3. 2010 05:03

gift idea

try to change your template, there are some great ones...

gift idea

September 5. 2010 07:49

ETF

do you have a different blog where you post more often?

ETF

September 7. 2010 04:24

Carpet Cleaning Philadelphia

I value the blog.Really thank you! Keep writing.

Carpet Cleaning Philadelphia

September 9. 2010 06:13

Kardashian

are you a Kim fan?

Kardashian

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading