2
votes

I have a fix done for my user control.
The changes are there both in the .ascx file and the .ascx.cs file.

Now, post-build...is there any way I can deploy just my...assembly for this control container...and avoid the deployment of the .ascx file?

3

3 Answers

2
votes

Although the assembly contains some pre-compiled methods, the .ascx page is still "interpreted" (technically it's compiled, but IMO it's easier to think of it as interpreted) every time the page is requested (well, not every time, since it's often cached, but certainly the first time changes are made). Try it for yourself -- make a change to some of the markup in a .ascx file and then request the page -- you'll see that your changes are reflected in the response (you may have to restart the site if it's cached).

So, following from this, you will need to deploy both of the files, as both are used by IIS to service a request.

On another note, you can sometimes run into strange problems when just deploying a single assembly (or maybe it's just me being paranoid because I thought this happened to me once) to a live site -- it's safer to deploy the entire site at once. Unrelated to the question itself, but I thought I'd note it.

0
votes

no .. if you have done change in the .ascx file you should upload that too..

0
votes

Because the ascx file has changed and as it's markup code does not go into the compiled assembly of the control, for reflecting the changes, you'd need to deploy both the assembly (which contains the ascx.cs code) and the ascx file.