CategoryGridPage3.ascx
CategoryGridPage3.ascx
This template is throwing errors. It has not been modified at all.
I am placing it on the home page.
[[ConLib:CategoryGridPage3]]
Is anyone else getting this...
Server Error in '/' Application.
--------------------------------------------------------------------------------
Object reference not set to an instance of an object.
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.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
ConLib_CategoryGridPage3.BindPagingControls() +156
ConLib_CategoryGridPage3.BindSearchResultsPanel() +77
ConLib_CategoryGridPage3.BindPage() +124
ConLib_CategoryGridPage3.Page_PreRender(Object sender, EventArgs e) +30
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34
System.Web.UI.Control.OnPreRender(EventArgs e) +2114636
System.Web.UI.Control.PreRenderRecursiveInternal() +77
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.WebControls.WebParts.WebPart.PreRenderRecursiveInternal() +62
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360
Is there a fix for it?
I am placing it on the home page.
[[ConLib:CategoryGridPage3]]
Is anyone else getting this...
Server Error in '/' Application.
--------------------------------------------------------------------------------
Object reference not set to an instance of an object.
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.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
ConLib_CategoryGridPage3.BindPagingControls() +156
ConLib_CategoryGridPage3.BindSearchResultsPanel() +77
ConLib_CategoryGridPage3.BindPage() +124
ConLib_CategoryGridPage3.Page_PreRender(Object sender, EventArgs e) +30
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34
System.Web.UI.Control.OnPreRender(EventArgs e) +2114636
System.Web.UI.Control.PreRenderRecursiveInternal() +77
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.WebControls.WebParts.WebPart.PreRenderRecursiveInternal() +62
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360
Is there a fix for it?
Can you put a categorygrid user control on just any page?
I've never tried it, but I know the category.aspx pages have code-behind in them. It might be that the user control requires that code-behind.
I've never tried it, but I know the category.aspx pages have code-behind in them. It might be that the user control requires that code-behind.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
I think Joe has the answer- I think it needs to have a category Id passed to it:
public int CategoryId
{
get
{
if (ViewState["CategoryId"] == null)
ViewState["CategoryId"] = PageHelper.GetCategoryId();
return (int)ViewState["CategoryId"];
}
set
{
ViewState["CategoryId"] = value;
}
}
You might be able to work around it by using a category display page for your home page, using a top level category.
public int CategoryId
{
get
{
if (ViewState["CategoryId"] == null)
ViewState["CategoryId"] = PageHelper.GetCategoryId();
return (int)ViewState["CategoryId"];
}
set
{
ViewState["CategoryId"] = value;
}
}
You might be able to work around it by using a category display page for your home page, using a top level category.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
I got that code from the code behind. What I was trying to say that if you are on the home page, there is probably no category id for it to pull from.
This is all new to me also, so I'm just guessing. Try defining a category id here temporarily instead of getting it from ViewState
ViewState["CategoryId"] = value;
This is all new to me also, so I'm just guessing. Try defining a category id here temporarily instead of getting it from ViewState
ViewState["CategoryId"] = value;
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
I think no categories show up because there are no categories on the home page- it doesn't have a categoryid.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
The categorygrid control is designed to be used from a call to particular category. The home page doesn't make such a call. Therefore the control has no starting point and has nothing to render. Technically the error is legitimate as the control is not being used as it is designed.
We could probably help you much better if we knew your goal.
If you're wanting to put a particular category of products directly on your home page, that will require a customized categorygrid control hardcoded to the categoryid you want to display.
We could probably help you much better if we knew your goal.
If you're wanting to put a particular category of products directly on your home page, that will require a customized categorygrid control hardcoded to the categoryid you want to display.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
Yes, I realize that....My goal is to have a dynamic generation of top level categories with thumbnails displayed in 2 or 3 columns in the content area.
I can set it up static or use featured items at this point until I write something that will work. I just wanted to use what was already available.
No worries,
LR
I can set it up static or use featured items at this point until I write something that will work. I just wanted to use what was already available.
No worries,
LR