Reputation: 15139
I have a user control (UserControl1.ascx) and I made changes to its .cs file. That UserControl1.ascx is being used by two or more aspx files using LoadControl.
I don't want to deploy the whole web project DLL, as this is a fix for a critical issue in one part of the web app, and doesn't affect the whole web app.
Updating changes to the single web form code behind is easily done. However I'm not sure about the single user control deployment.
Upvotes: 2
Views: 1136
Reputation: 140
It's a bit of a hack, but you could move the code from the .ascx.cs file to the .ascx file and remove the inherits
attribute. ASP.NET first checks the referenced class in the inherit
attribute. So I think this should allow you to update the web application without updating the .dll files.
I didn't test this, but I think it could be a viable option.
Upvotes: 2
Reputation: 15253
If you just deploy the updated user control (ascx) form and the relevant DLL, the only discernible delay will be the load time of the first hit after deployment, which you can do yourself with a browser refresh.
Upvotes: 0