I am trying to Invoke action result from an anchor tag,
I am building html into C# , its not in view and injecting it into view using html helper @Html.Raw(Model.HTML)
like this.
HTML is
html.AppendLine("<td><a href='Home/DeleteFile?ID="+ dt.Rows[i]["ID"].ToString() + "'><i style='color:#e90029' class='fa fa-times fa-lg' aria-hidden='true'></i></a></td>");
The Problem is when i click first time on this anchor tag to delete the record it works by invoking address
http://WebsiteAlias/Home/DeleteFile?ID=2
But after that when i hover to another record to delete them it show URL to
http://WebsiteAlias/Home/Home/DeleteFile?ID=2
It add Another /Home in url ,
Why it is happening ?
I cant use @Url.Action("Action","Controller")
cause HTML is coming from c#