Calling inline (ascx) methods from codebehind file using partial classes
I am using .net 2.0. I would like to place one of my C # methods in an embedded server script inside my ascx file because I need to update it a lot when I design. This way I don't have to compile my big project every time.
I would like to call a method from my code behind a file. I use this by inserting a virtual stub method in the codebehind file and overriding it in the ascx file. Now, since I started using partial classes, I expected to be able to just call the method directly. It's impossible?
thanks
a source to share
Unfortunately, I don't think this is possible. At design time, the partial class (* .designer.cs) basically only contains your controls. The class that actually contains the code from the script block is also generated by ASP.NET, but inherits from your main class.
Cm. http://msdn.microsoft.com/en-us/library/ms178138.aspx for more information.
a source to share