Tutorial :Can you update a web user control without updating the entire site?



Question:

I have a website which uses a web user control... well, basically all over the place. It's even included in other web user controls.

So I thought I could just upload the new source and it would recompile on the fly and be fine, but instead every page or control that uses it complains about a type mismatch. Because it is used in so many places, it very quickly becomes easier to just update the entire website. (Or at least it would if I didn't need to go through our change management process for that...)

So is there something I'm missing? Isn't there any way to upload a web user control and have it recompile like when you update a single web page?


Solution:1

I think it is recompiling, it just takes a bit and you have a conflict with the mismatched .ascx and .ascx.cs files in Temporary ASP.NET Files while it recompiles. I could be wrong about this. Personally, I've had better success if I always upload both the .ascx and .ascx.cs files together.


Solution:2

I would think that if you pushed these items you should be good... any less and you might have issues:

  1. bin contents - this will include your code changes to the user control and if the assembly version changes you will want to include any .dll that use it, I have run into issues to many times by trying to push just a single .dll that is in the bin.

  2. .ascx file

I don't think you would need to push any other .aspx or .ascx files.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »