Re: Create a WebControl in the CodeBehind



Yeah, no way to avoid that because of the way ASP.NET monitors files and the
bin folder. However, as a single assembly WAP project I bet it would restart
faster.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com




"jay@xxxxxxxxxxxxxxx" wrote:

My first response didn't make it through.

Anyway...

Thanks for the information, but that's not quite what I'm looking for.
Currently the class is in a separate project. Each time I recompile the
project, it is copied to the bin folder. Each time it is copied to the
bin folder, the web app restarts. There's then a huge delay as it
starts up. Once the delay is over, I log back in and go to my page.

If we can get this to work in the code behind, simply refreshing the
page works. It only recompiles the one page. This worked great when i
manually added the control and got me most of the way through.

Perhaps I should have said I want to avoid recompiles and restarts.

Thanks for your help.

Jay


Peter wrote:
Aye, that's the Catch-22 isn't it?
What I would consider doing is to switch over to the new Web Application
project model, and have your control as a project within the solution. Then,
after it's deployed, all you need to do is build the newest version of your
control and copy over it's assembly to the bin folder of your site. Presto!
No Recompilations.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com




"jay@xxxxxxxxxxxxxxx" wrote:

Greetings

ASP.NET 2.0

I'm developing a webcontrol. The class will ultimately end up in a
webcontrols DLL, but for development purposes, I want to put the class
in a code-behind. This is so that I can work on the class without
recompiling and deploying a DLL, and waiting for the website to
recompile. The website takes a long time to load after a recompile. I'm
trying to avoid that delay. Making my changes in the code behind
accomplishes that.

public partial class TestPage_aspx : Page
{
....
}

namespace howdy {
public class TestControl : WebControl
{
....
}
}

Initially, I put a place holder on the page, then created an instance
of TestControl and added it to the place holder. Now that I'm dealing
with the postbacks, etc, I'd rather do it declaratively.

<whatever:TestControl ID="tester" runat="server"/>

I'm having trouble registering the control on the page, though.

<%@ Register Namespace="howdy" Assembly="???" TagPrefix="whatever" %>

If that's the proper way to do it, what should I enter for Assembly? (I
think it would be APP_CODE if I put it in the app_code folder, but that
too causes a recompile, so I'm avoiding it).




.



Relevant Pages

  • Re: Create a WebControl in the CodeBehind
    ... Each time I recompile the ... it is copied to the bin folder. ... and have your control as a project within the solution. ... I'm developing a webcontrol. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Computer Shutsdown
    ... When I compile something big..kernel recompile, ... > Can anyone suggest me what do do, to avoid such shutdowns, Kernel ...
    (Fedora)
  • Re: [kde] Upgrade to Qt 4.5
    ... so it's worth try it to avoid possible problems:) ... And do you recompile everything in your system each time you upgrade GCC ... guidelines against inlined code, for virtual destructor even if you do not ...
    (KDE)
  • Re: [kde] Upgrade to Qt 4.5
    ... so it's worth try it to avoid possible problems:) ... And do you recompile everything in your system each time you upgrade GCC or ... _not_ need to recompile KDE because you upgraded to Qt 4.5 because it's ...
    (KDE)
  • Re: Deployment Problem
    ... > small correction it should be appname.exe.config in your bin folder ... >> and thats a bit different) ... >> like that you will have to recompile to change the values if you put a ...
    (microsoft.public.dotnet.languages.vb)