i trying assign appsetting key value + string in mvc view.
i tried @system.configuration.configurationmanager.appsettings["mykey"].tostring()+"custom/customerprofile.aspx"
, did not worked.
<a href="here..." id="donelink" class="btn btn-primary">done</a>
this how it, assuming want use string in href attribute of link:
@{ var href = system.configuration.configurationmanager.appsettings["mykey"].tostring() + "custom/customerprofile.aspx"; } <a href="@href" id="donelink" class="btn btn-primary">done</a>
but, looks not using razor, because link ends in .aspx, not .cshtml. right?
Comments
Post a Comment