TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Jose Saiz
1.5k
260
103.1k
ApplicationPath only works in IDE
Dec 26 2016 6:45 PM
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
Reply
Answers (
2
)
Print qr code in windows form c#
Text Changed Event in MVC