lulu50
asked on
Not to hard code the path to a link
Hi,
I need your help please
How can I change my code not to have a path in my code.
instead of this '/bcwa/CareAdvanceBusiness Rules/'
I want something like this but it doesn't work.
'@Url.Action("ExportToExce l", "CareAdvanceBusinessRules" )';
the problem that I have is when I upload my document to the server.
the server has a different path than my local document so I have to manual change the path every time I need to do an upload.
How can I remove the hard code path from my code and replace it with something else?
I need your help please
How can I change my code not to have a path in my code.
instead of this '/bcwa/CareAdvanceBusiness
I want something like this but it doesn't work.
'@Url.Action("ExportToExce
the problem that I have is when I upload my document to the server.
the server has a different path than my local document so I have to manual change the path every time I need to do an upload.
How can I remove the hard code path from my code and replace it with something else?
function ExportToExcel() {
$('#GetAction').val("ExportToExcel");
$('#SearchRulesForm').attr('action', '/bcwa/CareAdvanceBusinessRules/ExportToExcel');
$('#SearchRulesForm').submit();
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.