Code: Select all
<a href='ProductsByManufacturPage.aspx?ManufacturerId=<%#Eval("ManufacturerId") %>'>
Code: Select all
<a href='abc.aspx?ManufacturerId=<%#Eval("ManufacturerId") %>'>
Code: Select all
<a href='ProductsByManufacturPage.aspx?ManufacturerId=<%#Eval("ManufacturerId") %>'>
Code: Select all
<a href='abc.aspx?ManufacturerId=<%#Eval("ManufacturerId") %>'>
Explain the problem in detail?I have spent some time working with this and I cannot get the page to load. Has anyone else had the same experience?
Code: Select all
<a href='~/ShopbyBrand.aspx?ManufacturerId=<%#Eval("ManufacturerId") %>'>
That is due to a small missing piece of information. Please edit the ProductsByManufacturer.ascx control file and locate following codedivers-supply wrote:Hello,
We installed the code and it works great until you click on a heading to sort the data then it gives the below error.
http://www.divers-supply.com/ProductsBy ... turerId=50
For Instance if you go to the above page and then click on "SKU" or "Name" or any heading then you get an error. See below.
Server Error in '/' Application.
--------------------------------------------------------------------------------
The data source 'ProductDS' does not support sorting with IEnumerable data. Automatic sorting is only supported with DataView, DataTable, and DataSet.
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.NotSupportedException: The data source 'ProductDS' does not support sorting with IEnumerable data. Automatic sorting is only supported with DataView, DataTable, and DataSet.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[NotSupportedException: The data source 'ProductDS' does not support sorting with IEnumerable data. Automatic sorting is only supported with DataView, DataTable, and DataSet.]
System.Web.UI.WebControls.ObjectDataSourceView.CreateEnumerableData(Object dataObject, DataSourceSelectArguments arguments) +1267391
System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +2891
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +17
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
System.Web.UI.WebControls.GridView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
System.Web.UI.WebControls.GridView.OnPreRender(EventArgs e) +24
System.Web.UI.Control.PreRenderRecursiveInternal() +77
System.Web.UI.Control.PreRenderRecursiveInternal() +161
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
Any help would be appreciated.
Thank you
Debbie
Code: Select all
<asp:ObjectDataSource ID="ProductDS" runat="server" OldValuesParameterFormatString="original_{0}"
SelectMethod="AdvancedSearch" TypeName="CommerceBuilder.Products.ProductDataSource">
Code: Select all
<asp:ObjectDataSource ID="ProductDS" runat="server" OldValuesParameterFormatString="original_{0}"
SelectMethod="AdvancedSearch" TypeName="CommerceBuilder.Products.ProductDataSource" SortParameterName="sortExpression">
Edit the ascx file and then add following code to columns listmfreeze wrote:This is a great control; I had a similar function in 5.5 which my customers wanted to retain and this works great as a replacement.
Some of my customers have requested the display of a product image be added.
I looked up the asp:gridcontrol and found there is a way to do this using <asp:ImageField DataImageUrlField="PictureURL"></asp:ImageField> but I haven't been able to figure out how to incorporate the product thumbnail or icon into this.
Is there a way to pull the product's thumbnail and add it to the display?
Code: Select all
<asp:TemplateField>
<ItemTemplate>
<asp:Image ID="ProductImage" runat="server" ImageUrl='<% #Eval("ThumbnailUrl")%>' />
</ItemTemplate>
</asp:TemplateField>
Code: Select all
<asp:BoundField DataField="Sku" HeaderText="SKU" SortExpression="Sku">
<HeaderStyle HorizontalAlign="Left" />
</asp:BoundField>
Code: Select all
<asp:TemplateField>
<ItemTemplate>
<asp:Image ID="ProductImage" runat="server" ImageUrl='<% #Eval("ThumbnailUrl")%>' />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="Sku" HeaderText="SKU" SortExpression="Sku">
<HeaderStyle HorizontalAlign="Left" />
</asp:BoundField>
In ProductsByManufacturer.ascx file locate following linekens wrote:This is a great mod, thanks Mazhar.
Is there a way to get the manufacturer name to appear in the page title for productbymanufacturer.aspx?
Thanks
Ken
Code: Select all
<div class="section">
Code: Select all
<div class="pageHeader">
<h1 class="heading"><asp:Localize ID="ManufacturerName" runat="server" EnableViewState="false"></asp:Localize></h1>
</div>
<div class="section">
Code: Select all
protected void Page_Load(object sender, EventArgs e)
{
BindProductsGrid();
}
Code: Select all
protected void Page_Load(object sender, EventArgs e)
{
int manufacturerId = CommerceBuilder.Utility.AlwaysConvert.ToInt(Request.QueryString["ManufacturerId"]);
CommerceBuilder.Products.Manufacturer manufacturer = CommerceBuilder.Products.ManufacturerDataSource.Load(manufacturerId);
ManufacturerName.Text = manufacturer.Name;
BindProductsGrid();
}
Code: Select all
protected void Page_Load(object sender, EventArgs e)
{
int manufacturerId = CommerceBuilder.Utility.AlwaysConvert.ToInt(Request.QueryString["ManufacturerId"]);
CommerceBuilder.Products.Manufacturer manufacturer = CommerceBuilder.Products.ManufacturerDataSource.Load(manufacturerId);
Page.Title = manufacturer.Name;
BindProductsGrid();
}