Lajos Arpad Lajos Arpad - 1 month ago 14
Vb.net Question

How is build event interfering with markup changes?

We are working on a vb.net WebForms project and I have the habit of building it whenever a markup change occurs involving server-side controls. For example, if I have a code like this

$("#foobar").click(function() {/*...*/});


and I change it to

$("#<%= foobar.ClientID %>").click(function() {/*...*/});


I build the project. Also, if I have something like this:

<div class="masterBreadcrumbs sub" runat="server" id="header">
<div id="container" runat="server" class="breadcrumb-container"></div>
</div>


and I change it to this:

<div id="container" runat="server" class="breadcrumb-container"></div>
<div class="masterBreadcrumbs sub" runat="server" id="header"></div>


I build the project. Finally, if I remove or create a server control or modify one of its properties, I know for sure that I need to build the project. So, my question is as follows:

Which are the types of markup changes which necessitate project build?

Answer

There is a way to know whether the project needs to be built:

Check out whether the .designer file has changed. If so, then a build is needed. If not, then all the protected or public properties can be used.

Comments