Page 1 of 1
Moving SearchPage.ascx to Customer Folder
Posted: Thu Mar 13, 2008 6:56 am
by trozzi
Received the following error.
[[ConLib:Custom/SearchPage]] c:\AbleCommerce70FranksSports\ConLib\Custom\SearchPage.ascx.cs(27): error CS0234: The type or namespace name 'conlib_categorysearchsidebar_ascx' does not exist in the namespace 'ASP' (are you missing an assembly reference?)
Posted: Mon Mar 17, 2008 7:44 am
by sohaib
Customer folder?
Are you talking about Custom folder?
When you move Search.ascx (and Search.ascx.cs) to ConLib/Custom folder you need to update all references to Search.ascx.... which it seems you have already done. The other thing that you need to do is to update the Search.ascx page so that if it references other controls in it the references are corrected if they are relative.
You can update
Code: Select all
<%@ Register Src="CategorySearchSidebar.ascx" TagName="CategorySearchSidebar" TagPrefix="uc" %>
to
Code: Select all
<%@ Register Src="~/ConLib/CategorySearchSidebar.ascx" TagName="CategorySearchSidebar" TagPrefix="uc" %>
I am taking a note of this. Search.ascx should have used non-relative path anyway. We will update our next build so that Search.ascx uses non-relative path for CategorySearchSidebar
Pathing
Posted: Mon Mar 17, 2008 9:49 am
by trozzi
We had the ~/ConLib/ in the path and still reveived the error in theis thread.
t
Posted: Mon Mar 17, 2008 9:59 am
by sohaib
OK...
In SearchPage.ascx.cs 'conlib_categorysearchsidebar_ascx' is directly referenced. You will have to change it to something like conlib_custom_categorysearchsidebar_ascx I guess.
Edit...
The above rename should not be needed because we are not moving the CategorySearchSideBar control anywhere.
Posted: Mon Mar 17, 2008 10:19 am
by jmestep
I had originally moved only the pages I was customizing to the conlib/custom folder. After a few problems like this, I made copies of all the files in the conlib folder and put them into the conlib/custom folder. I saw that I was probably going to be tweaking them anyway and that saved moving them one at a time and I will tell anyone who comes after me to change only the ones in the custom folder and that is where all my changes are. (Except for the pages at root level, like Product.aspx. On those pages, I changed all the references to anything in the conlib to custom/conlib.
Cant find searchBar
Posted: Mon Mar 17, 2008 10:24 am
by trozzi
Seems like part of my problem is that I can't find searchBar.
Search results pane shows all products, not just those searched for.
t