Logo 
Search:

Asp.net Answers

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds
  Question Asked By: Francisca Perez   on Jun 30 In Asp.net Category.

  
Question Answered By: Isabella Campbell   on Jun 30

In your "Register" server statement correct the scr element:
<%@ Register TagPrefix="userControl" TagName="NameOfTheControl"
src="subdirectory/usercontrol.ascx" %>
it should work wahtever the folder...

if you have to go up one folder start with ../subdirectory/usercontrol.ascx

Maybe your usercontrol uses some elements with src (like IMG). For use like this
it's best to make a public string property like imageFolder, to link to the
right folder. user  controls (when linked to an aspx  file) search for such
elements as if they would me in the folder of the ASPX file. Not as they would
be in the folder of the ASCX.

Share: 

 
 
Didn't find what you were looking for? Find more on Src Problem for User Controls in SubDirectories Or get search suggestion and latest updates.


Tagged: