Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
2
Answers
ApplicationPath only works in IDE
Jose Saiz
8y
236
1
Reply
Can anyone please tell me what am I missing here?
I have the following function
public
string
GetHostedPageUrl(
string
pPageName)
{
string
_sHostedPageUrl = HttpContext.Current.Request.ApplicationPath.Trim();
_sHostedPageUrl += HttpContext.Current.Request.PhysicalApplicationPath.Substring(ncGlobal.WebApplicationPath.Length).Replace(
'\\', '
/').Insert(0,
"/"
) + pPageName;
return
_sHostedPageUrl;
}
I use it on plain client-side html <a href="<%=GetHostedPageUrl("Home.aspx")%>">Home</a>
in the Visual Studio 2010 IDE works 100% fine, but once I publish-compile the project and deploy it does not work.
Any Idea
TIA
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
Print qr code in windows form c#
Text Changed Event in MVC