?
Solved

asp.net + Global.GetApplicationPath(Request) Error

Posted on 2005-04-28
10
Medium Priority
?
573 Views
Last Modified: 2008-01-09
I am using the following code for an iframe which work perfectly fine in a different user control in the same project but for some reason is creating an error.

src="<%= Global.GetApplicationPath(Request) & "/WebForms/ViewOrderLogs.aspx" %>"

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30451: Name 'Global' is not declared.
0
Comment
Question by:dkilby
  • 5
  • 2
8 Comments
 
LVL 33

Expert Comment

by:raterus
ID: 13889997
Try this, the ~ resolves to the application path.  You may need to put runat="server" on the tag.

src="~/WebForms/ViewOrderLogs.aspx"
0
 
LVL 15

Expert Comment

by:praneetha
ID: 13889999
src="<%= Global.GetApplicationPath(Request)  %> /WebForms/ViewOrderLogs.aspx"
0
 
LVL 15

Accepted Solution

by:
praneetha earned 2000 total points
ID: 13890024
and also use that in the html

<%@ Import Namespace="<Project Namespace or rather namespace of global.asax>" %>
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:dkilby
ID: 13890091
tried all the 3 last one worked, thanks
0
 
LVL 15

Expert Comment

by:praneetha
ID: 13890171
well thanks for the points.

and just for reference...raterus is right too...but what he said holds true for webcontrols...but that's a good point.

and instead of using import and global.getapplictaionath you can also try

 src="<%= Request.ApplicationPath%> /WebForms/ViewOrderLogs.aspx"

Good Luck

0
 
LVL 33

Expert Comment

by:raterus
ID: 13890183
Oh NOW you mention I'm right too :-)
0
 
LVL 15

Expert Comment

by:praneetha
ID: 13890195
:) well now that i have the points
0
 
LVL 15

Expert Comment

by:praneetha
ID: 13890232
:) hmm so u r an administrator too ...hey i dont mind sharing points with you...u r one of my fav expert on this site. :)
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question