CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!



Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > windows_hosting.hosting_open_forum Tags:
Item Type: NewsGroup Date Entered: 9/19/2003 12:51:49 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 0 Views: 101 Favorited: 0 Favorite
1 Items, 1 Pages 1 |< << Go >> >|
Manitcor
Asp.Net User
Virtual Path Error with User Control9/19/2003 12:51:49 AM

0/0

Hello everyone,

I'm fairly new to .NET though I come from a strong OOP background. Im having a little trouble with a simple user controll.

I have a page with a codebehind. In this codebehind there are 2 classes (both in the same namespace). First the class for the page itself then a class to handle dynamic generation of this user control based on a passed counter.

Here is the class:

public class TextBoxControls : System.Web.UI.Page
{
public int Draw(bool increment, int Counter, System.Web.UI.WebControls.PlaceHolder PlaceHolder1)
{
if (increment == true)
Counter++;

Control objControl = null;
for (int FormCounter = 0; FormCounter <= Counter; FormCounter++)
{
objControl = Page.LoadControl("ListEditBox.ascx");
PlaceHolder1.Controls.Add(objControl);
}

return Counter;
}
}

Ths user control ListEditBox.ascx is in the same directory as the code behind and the web form.

When trying to run this I get the following excpetion:

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: The virtual path '/ListEditBox.ascx' maps to another application, which is not allowed.

This happens on the line where I try to load the control.

Originally I had this code inside the main page class and it worked like a charm, for some reason when I moved it outside of the main page class and into its own class this error started happening.

If I pre-fix the path with the Application name like so:

<WEBAPPNAME>/ListEditBox.ascx

Then it works fine, obviously this is less than optimal as I would like the class and the page to be independant of any directory structure or application name.

Any ideas?

What am I missing?
I am a meat popsicle
1 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Fundamentals of Cellular Network Planning and Optimisation: 2G/2.5G/3G... Evolution to 4G Authors: Ajay R. Mishra, Pages: 304, Published: 2004
Network Communications Technology Authors: Ata Elahi, Pages: 351, Published: 2000
Computer Telephony Encyclopedia: Practical, In-depth, and Accessible Explanations of Essential Topics in Computer Telephony Authors: Richard Grigonis, Pages: 563, Published: 2000
Next Generation Wireless Networks Authors: Sirin Tekinay, Pages: 266, Published: 2000
CCIE: Cisco Certified Internetwork Expert : Study Guide Authors: Rob Payne, Kevin Manweiler, John Swartz, Pages: 1068, Published: 2003
Distributed Storage Networks: Architecture, Protocols and Management Authors: Thomas C. Jepsen, Pages: 314, Published: 2003
Data and Computer Communications Authors: William Stallings, Pages: 878, Published: 2007
Optical Fiber Telecommunications III Authors: Ivan P. Kaminow, Thomas L. Koch, Pages: 608, Published: 1997
Wiley Encyclopedia of Electrical and Electronics Engineering Authors: John G. Webster, Pages: 0, Published: 1999

Web:
LoadControl() method throws virtual path error when attempting to ... Talk about LoadControl() method throws virtual path error when attempting to load user control from subfolder.
Virtual Path Error with User Control - ASP.NET Forums Virtual Path Error with User Control. Last post 09-18-2003 8:59 PM by manitcor. 0 replies. Sort Posts:. Oldest to newest, Newest to oldest ...
EPiServer: ‘The virtual path could not be loaded’ error when ... Jul 9, 2008 ... Test your user controls from dummy aspx-file. ... EPiServer: ‘The virtual path could not be loaded’ error when registering Web Parts in ...
The relative virtual path MyUserControl.ascx is not allowed here ... The relative virtual path MyUserControl.ascx is not allowed here error in Web. Config. ... I am trying to add a user control in Web.Config file as below, ...
Parser Error Message: The virtual path '/common/footer.ascx' maps ... Parser Error Message: The virtual path '/common/footer.ascx' maps to another application, ... User controls cannot be used across app domain boundaries, ...
Parser Error Message: The virtual path '/common/footer.ascx' maps ... Parser Error Message: The virtual path '/common/footer.ascx' maps to another ... the User Control to maintain. Or - Create a custom server control with the ...
Generation of Designer Failed - Relative Virtual Path Error Mar 9, 2007 ... Generation of Designer Failed - Relative Virtual Path Error. Don't you hate it when things like this happen? All I did was add a UserControl ...
?"The virtual path maps to another application" starting the app, the login page maps to a user control in the relative ... Parser Error Message: The virtual path ...
p2p.wrox.com Forums - The virtual path maps to another application Parser Error Message: The virtual path '/UserControl/Header.ascx' maps to another application, which is not allowed. Source Error: ...
ASP.NEt file path bombing : virtual, path, valid HttpException: '~/includes/test.ascx?info=dtlOfferPage' is not a valid virtual path. Source Error: Line 12: ContentPlaceHolder1.Controls.Add(uc) ...

Videos:
BUGS / KÄFER - bugs, errors and weird behaviors BUGS /// KÄFER - bugs, errors and weird behaviors - The idea: "Bugs" are errors in softwares. They occur unexpectedly and get eliminated with deb...
BUGS / KÄFER BUGS /// KÄFER - bugs, errors, and weird behaviors - The idea: "Bugs" are errors in softwares. They occur unexpectedly and get eliminated with debu...
(888)FITN.Org_Forensic_IT_Information_Technology_Video_11_-_20_Feb_08-15h40.AVI (888)FITN.Org_Forensic_IT_Information_Technology_Networks_MS_Office_Accounting_Backup_Data_Utilities_General_Ledger Prof1 http://www2.bus.miami.edu/i...
(888)FITN.Org_Microsoft_Office_Accounting_MOAX.Org_ACC306_Mar03_1530_part3.MP4 (888)FITN.Org_Microsoft_Office_Accounting_MOAX.Org_Backup_Data_Utilities_General_Ledger Customer Inventory Pricing Receipts & Adjustments Financial R...
(888)FITN.Org_Forensic_IT_Information_Technology_Video_15_-_20_Feb_08-17h49.AVI (888)FITN.Org_Forensic_IT_Information_Technology_Networks_MS_Office_Accounting_Backup_Data_Utilities_General_Ledger Prof1 http://www2.bus.miami.edu/i...
(888)FITN.Org_Forensic_IT_Information_Technology_Video_18_-_25_Feb_08-16h09.AVI (888)FITN.Org_Forensic_IT_Information_Technology_Networks_MS_Office_Accounting_Backup_Data_Utilities_General_Ledger Prof1 http://www2.bus.miami.edu/i...
(888)FITN.Org_Forensic_IT_Information_Technology_Video_20_-_25_Feb_08-17h14.AVI (888)FITN.Org_Forensic_IT_Information_Technology_Networks_MS_Office_Accounting_Backup_Data_Utilities_General_Ledger Prof1 http://www2.bus.miami.edu/i...
(888)FITN.Org_Forensic_IT_Information_Technology_Video_19_-_25_Feb_08-16h27.AVI (888)FITN.Org_Forensic_IT_Information_Technology_Networks_MS_Office_Accounting_Backup_Data_Utilities_General_Ledger Prof1 http://www2.bus.miami.edu/i...
(888)FITN.Org_Forensic_IT_Information_Technology_Video_12_-_20_Feb_08-16h00.AVI (888)FITN.Org_Forensic_IT_Information_Technology_Networks_MS_Office_Accounting_Backup_Data_Utilities_General_Ledger Prof1 http://www2.bus.miami.edu/i...
(888)FITN.Org_Forensic_IT_Information_Technology_Video_09_-_18_Feb_08-20h37.AVI (888)FITN.Org_Forensic_IT_Information_Technology_Networks_MS_Office_Accounting_Backup_Data_Utilities_General_Ledger Prof1 http://www2.bus.miami.edu/i...




Search This Site:










mail authentication

how to modify namespace and .dll name of pulish in asp.net2.0?

crystal report logon failed

gettings the correct paths

what's the right control for making a forum?

javascript, html, and vb.net

accessing a value from javascript to codebehind

ii need help to see how to view the detail of this server error in asp.net

capture carriage returns and display them

is adobe flex 2 builder similar to ms visual studio .net?

how to use button and querystring to link to another form?

web user control load last.

how do you set the width and heigth of an image in asp.net? i have a trash can thats too big.

user control

how to display data in my asp.net form

validation in asp.net

regarding css

seria port communication with asp.net (rs232 and usb)

tableadapter insert (primary key)

converting string to int?

usercontrol problem

load handling while using ffmpeg.exe

direct interface into a dll through browser

adapter.update() not working

isclientscriptblockregistered question

deployment question

how to check the time format

personalised url's

redirect to login page

new asp.net 2.0 website http://www.webjots.com

  Privacy | Contact Us
All Times Are GMT