Custom Control Advice or Help

by Erik Lane 7. February 2005 05:21

Am I able to update a custom control if I don't have access to the .NET source code but only the .ascx file?  I am suppose to update the content displayed by said custom control but outside of the .ascx file I don't know what is going on behind the scenes.

I've tried just copying and pasting some basic HTML into the control but the page that loads the control doesn't reflect the changes.  It still shows the content as before.

Tags:

Comments

David Neal
David Neal on 2/7/2005 5:19:00 AM

You should be able to edit just about anything in the .ascx you need, as long as you don't remove any server controls (controls with the runat="server" attribute).  You can even change the properties of the server controls, unless those properties are being explicitly updated in the code-behind.

You may need to "recycle" the ASP.NET application to get your changes to appear.  One of the easiest ways to do this is to edit the web.config file and save it.  You can get by with just typing a space and then deleting it.  Whenever the web.config changes, it forces the ASP.NET runtime to reload the Web application and discard any cached/compiled pages.

eriklane
eriklane United States on 2/7/2005 6:30:00 AM

Thanks for the help David.  The control that I need to modify has the runat="server" tag.  So I guess I'm stuck?

David Neal
David Neal on 2/11/2005 12:59:00 AM

That depends on what you need to do with that control.  What are you trying to modify?

Comments are closed