I used some relative url in my project like `<img src="../images/portal_header.jpg" .../>`, but our consultant insist to ask me change every url to `~/images/...`, and because they are html control, I have to add `runat="server"` tag for each one, So my question is that is it necessary? I have couple master page, it makes all the js link and css link unreached. Thanks
['https://Stackoverflow.com/questions/11232845', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1202242/']
A control can live in any subfolder and be referenced by many different pages in many different subfolders. `../` will not work in every case.

For that reason, you shuold resolve the URLs:

```
ResolveUrl("~/images/myimage.jpg")

```

And, no, you don't have to add `runat="server"`, you could do it like so:

```
<img src="<% =ResolveUrl("~/images/portal_header.jpg") %>" .../>

```
It depends greatly on context. Using relative URLs works fine as long as the location of the dependent resources isn't expected to change. Turning all of your image tags into controls does give you the benefit of using "~" (App Root) but it also adds overhead to processing on the server.

Your consultant is likely trying to protect you from a common problem. All your relative links work fine in development ("http://localhost/site") but break when you move to production ("http://www.yourdomain.com/somelocation/").