HomeHome Product Discus... Product Discus...SmithCartSmithCartReplace LinkButtons with ImageButtons?Replace LinkButtons with ImageButtons?
Previous
 
Next
New Post
3/12/2010 7:58 PM
 

Can I change the Navigation LinkButtons (First, Prev, Next, Last) on the ProductList.aspx page with image buttons? User want a more prominent appearance for these links when there is more than one page of products, and replacing with bigger, more bold images would meet this requirements.

 
New Post
3/12/2010 10:58 PM
 

Navigate to your /desktopmodules/smith.buynow folder and open up productlist.ascx. On line 145 you can change the asp:LinkButton to an imagebutton just make sure that you maintain the same "ID" name and "OnClick" event name. If you don't feel comfortable changing the control to an image button then you can just add a cssclass to to the linkbutton and then add the styling you want in the module.css file in the /desktopmodules/smith.buynow folder. The following is the code snippet in the productlist.ascx page that you will be changing starting on line 145:

<td align="center" colspan="3">
<asp:LinkButton ID="LBFirst" runat="server" OnClick="LBFirst_Click">First</asp:LinkButton>&nbsp;
<asp:LinkButton ID="LBPrev" runat="server" OnClick="LBPrev_Click">Prev</asp:LinkButton>&nbsp;
<asp:Label ID="lblResult" runat="server"></asp:Label>&nbsp;
<asp:LinkButton ID="LBNext" runat="server" OnClick="LBNext_Click">Next</asp:LinkButton>&nbsp;
<asp:LinkButton ID="LBLast" runat="server" OnClick="LBLast_Click">Last</asp:LinkButton>
</td>


At your service,
Dave Smith
DotNetNuke Consulting, DotNetNuke Store and DNN Ecommerce
 
New Post
3/15/2010 5:33 PM
 

Unfortunately, this doesn't work. I followed instructions (see code below), and got an empty module on the web page. I think this is because the code-behind .vb file is still looking at these controls being linkbuttons, and hence a mismatch occurs and throws an error. I don't think this can be done without modifying the source code (which is obviously out of the question without the correct license type from Smith Consulting). Just to double-check my work, here's the source code:

<td align="center" colspan="3">

<asp:ImageButton ID="LBFirst" runat="server" OnClick="LBFirst_Click" ImageUrl="first_button.gif" />&nbsp;

<asp:ImageButton ID="LBPrev" runat="server" OnClick="LBPrev_Click" ImageUrl="previous_button.gif" />&nbsp;

<asp:Label ID="lblResult" runat="server"></asp:Label>&nbsp;

<asp:ImageButton ID="LBNext" runat="server" OnClick="LBNext_Click" ImageUrl="next_button.gif" />&nbsp;

<asp:ImageButton ID="LBLast" runat="server" OnClick="LBLast_Click" ImageUrl="last_button.gif" />

</td>

 
New Post
3/15/2010 7:08 PM
 

Your code looks correct so the Linkbuttons must have different parameters then image buttons or maybe there is a property that is being used thats different. You can always default back to the link buttons and use a cssclass to make them larger and bolder.


At your service,
Dave Smith
DotNetNuke Consulting, DotNetNuke Store and DNN Ecommerce
 
Previous
 
Next
HomeHome Product Discus... Product Discus...SmithCartSmithCartReplace LinkButtons with ImageButtons?Replace LinkButtons with ImageButtons?