getting web app assembly from composite control

If you have a composite control you've created for use in ASP.Net, and you want to use that control to display the name and version of the web application's assembly, there's something you need to know:  As far as I can tell, there's no way to get the correct assembly if you're only embedding the control in the HTML code.  In this case, GetCallingAssembly() returns System.Web rather than the app name.  But if you add the control from the codebehind, or if you add a method to the control that gets called on Page_Load() from the ASP.Net page, then you will get the app name and version you're looking for, presumably because the calling assembly returned by GetCallingAssembly() is the web app assembly.

Print | posted on Thursday, March 15, 2007 7:45 PM

Comments on this post

No comments posted yet.

Your comment:

 (will show your gravatar)
 
Please add 6 and 6 and type the answer here: