URLs changing in Custom Module
Hi,
After 3 days trying to create a simple module to just display some information from the database and perform some post backs i am loosing patience with 4.0, a site that was supposed to take two weeks looks like it will be delayed as the more and more days i lose trying to get these things to work.
I have a custom module (whose viewstate doesnt seem to be working aswell) and i am just trying to set the url so that it goes to a page that i have setup which will deal with product details. My Page hierachy setup is:
Products (group Page)
- Products Lister
- Products Detail
i am trying to setup the link as follows:
<
li
><
asp:HyperLink
NavigateUrl='<%# "/products/product-details?
id
=
" + Eval("
id").ToString() %>' CssClass="view" Text="View Slab" runat="server" ID="hlnkDetails"></
asp:HyperLink
></
li
>
Hi,
I am still having this issue with my custom module changing the navigate url for my links. After the 4.1 upgrade the url is being remapped to: /SFPageService/2
Can someone please help me?
Line in question:
<
li
><
asp:HyperLink
NavigateUrl='<%# "/products/product-details/" + Eval("id").ToString() %>' CssClass="view" Text="View Slab" runat="server" ID="hlnkDetails"></
asp:HyperLink
></
li
>
<
asp:ListView
ID
=
"lvSlabs"
runat
=
"server"
GroupItemCount
=
"3"
>
<
LayoutTemplate
>
<
asp:PlaceHolder
runat
=
"server"
ID
=
"groupPlaceHolder"
></
asp:PlaceHolder
>
</
LayoutTemplate
>
<
GroupTemplate
>
<
div
class
=
"group"
>
<
asp:PlaceHolder
runat
=
"server"
ID
=
"itemPlaceHolder"
></
asp:PlaceHolder
>
</
div
>
</
GroupTemplate
>
<
ItemTemplate
>
<
div
class
=
"product-item"
>
<
div
class
=
"img"
>
<
img
src
=
"/"
alt
=
""
/>
</
div
>
<
h3
>Some Time <%# Eval("ID").ToString() %></
h3
>
<
ul
class
=
"details"
>
<
li
><
span
>Material:</
span
> <%# Eval("Block.BlockType.TypeName") %></
li
>
<
li
class
=
"alt"
><
span
>Thickness (mm):</
span
> <%# Eval("Thickness") %></
li
>
<
li
><
span
>Length (m):</
span
> <%# Eval("Length") %></
li
>
<
li
class
=
"alt"
><
span
>Width (m):</
span
> <%# Eval("Width") %></
li
>
<
li
><
span
>Colour:</
span
> <%# Eval("Colours") %></
li
>
<
li
class
=
"alt"
><
span
>Finish:</
span
> <%# Eval("Finish") %></
li
>
<
li
><
span
>Origin:</
span
> <%# Eval("Block.Origin") %></
li
>
<
li
class
=
"alt"
><
span
>Block No:</
span
> <%# Eval("Block.BatchNo").ToString() %></
li
>
<
li
><
span
>No of Slabs:</
span
></
li
>
<
li
class
=
"alt"
><
span
>Notes:</
span
></
li
>
<
li
><
asp:HyperLink
NavigateUrl='<%# "/products/product-details/" + Eval("id").ToString() %>' CssClass="view" Text="View Slab" runat="server" ID="hlnkDetails"></
asp:HyperLink
></
li
>
</
ul
>
</
div
>
</
ItemTemplate
>
</
asp:ListView
>
Hi,
This is becoming a real issue now, i have spent hours trying different things and i cannot get a simple link to output in the format that i specify, no matter what i do. I scheduled to do this project in two weeks and i am almost at the end of that period and i am nowhere, can an admin please see if it something i am doing or if this is a bug!
Where has the amazing Sitefinity 3.7 support gone???
Rob
Hi All,
Please ignore my last post i have found a workaround. If anyone else is having this issue then maybe this will work for them.
i change the link to a linkbutton and wired up the ItemCommand method of the list view, which then redirected via a response.redirect, an extra step which i find pointless but have to get this moving!
Item Command Setup
protected override void CreateChildControls()
base.CreateChildControls();
lvSlabs.ItemCommand += new EventHandler<
ListViewCommandEventArgs
>(lvSlabs_ItemCommand);
protected void lvSlabs_ItemCommand(object sender, ListViewCommandEventArgs e)
Page.Response.Redirect("/products/product-details/" + e.CommandArgument);