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") %>" .../>

```
Not sure which ASP version you're working in, but I use `@Url.Content("~/relativepath")` for ASP4 using MVC3 w/Razor

or `<img src="@Url.Content("~/relativepath")" alt="" />`