I'm make a module of news.
The module this add normally, but when is clic in image Edit the URL always is addressed to Defalt.aspx.
In event of image OnMouserHouver this show http://dotnetnuke/dotnetnuke/Home/tabid/36/ctl/Edit/mid/409/ItemID/10/Default.aspx .
Into of URL the ID module this correct and the Id news also.
I have create this in Codebehind.
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
Dim NoticiasMegaWorkView As String = CType(Settings("noticiasmegaworkview"), String)
Dim objNoticiasMegaWorkController As New NoticiasMegaWorkController
lstNoticiasMegaWork.Visible = True
lstNoticiasMegaWork.DataSource = objNoticiasMegaWorkController.GetNoticiasMegaWorkAll(ModuleId)
lstNoticiasMegaWork.DataBind()
Catch exc As Exception 'Module failed to load
ProcessModuleLoadException(Me, exc)
End Try
End Sub
Public ReadOnly Property ModuleActions() As Entities.Modules.Actions.ModuleActionCollection Implements Entities.Modules.IActionable.ModuleActions
Get
Dim Actions As New Entities.Modules.Actions.ModuleActionCollection
Actions.Add(GetNextActionID, Localization.GetString(Entities.Modules.Actions.ModuleActionType.AddContent, LocalResourceFile), Entities.Modules.Actions.ModuleActionType.AddContent, "", "", EditUrl(), False, Security.SecurityAccessLevel.Edit, True, False)
'Actions.Add(GetNextActionID, Localization.GetString(Entities.Modules.Actions.ModuleActionType.EditContent, LocalResourceFile), Entities.Modules.Actions.ModuleActionType.EditContent, "", "", EditUrl(), False, Security.SecurityAccessLevel.Edit, True, False)
Return Actions
End Get
End Property
I have create this in code ascx.
<asp:HyperLink ID="editLink" NavigateUrl='<%# EditURL("ItemID",DataBinder.Eval(Container.DataItem,"ItemID").ToString()) %>' Visible="<%# IsEditable %>" runat="server">
<asp:Image ID="editLinkImage" runat="server" ImageUrl="~/images/edit.gif" AlternateText="Edit" Visible="<%# IsEditable %>" />
</asp:HyperLink>
<li>
<asp:Label ID="lblDateTime" CssClass="texto_noticia_data" runat="server" Text='<%# formatDateTime(DataBinder.Eval(Container.DataItem, "DateTime")) %>'></asp:Label>
<asp:Label ID="lblTitle" runat="server" CssClass="link_homecentral" Text='<%# DataBinder.Eval(Container.DataItem, "Title") %>'></asp:Label>
</li>
I need more something?