I'm sorry if my questions are really lame, but though I'm a decent programmer in multiple other languages, I'm having to learn both ASP and Webtools at the same time, so I don't always know if my problem is just simple programming misunderstandings or if it is how Netpoint implemented something.
I made a test plugin, put it in the banner slot, copied in the includes from another plugin, then pasted in your sample code (see below). It doesn't seem to be returning anything, but I can't figure out why. What am I doing wrong?
<%@ Register TagPrefix="NP" Namespace="NetPoint.WebControls" Assembly="NetPoint.WebControls" %> <%@ Control Language="c#"%> <%@ Import Namespace="netpoint.classes" %> <%@ Import Namespace="netpoint.api.catalog" %> <% { if ((Request.QueryString["ParentID"]) != null){ NPCatalogCategory pc = new NPCatalogCategory(Convert.ToInt32(Request.QueryString["ParentID"])); categoryName.Text = pc.CategoryName; categoryName.Visible = true; } else if ((Request.QueryString["CategoryID"]) == null || (Request.QueryString["CategoryID"]) == ""){ categoryName.Text = @""; } else { NPCatalogCategory c = new NPCatalogCategory(Convert.ToInt32(Request.QueryString["CategoryID"])); categoryName.Text = c.CategoryName; categoryName.Visible = true; } } %> <asp:Label ID="categoryName" CssClass="categoryHeader" runat="server" visible="false" />
Add a comment