Hi all
I was creating one cuctom module in DNN (VS 2008). I have one heperlink which URL is generating at runtime. But when i refresh the page (f5 or reload page or enter in browser navigation) page_load event is not firing.
here is front end of VIEW page
<asp:datalist id="lstContent" datakeyfield="ItemID" runat="server" cellpadding="4">
<itemtemplate>
<table cellpadding ="4" width ="100%">
<tr>
<td valign ="top" width ="100%" align ="left">
<asp:HyperLink ID="HyperLink1" NavigateUrl='<%# EditURL("ItemID",DataBinder.Eval(Container.DataItem,"ItemID")) %>' Visible="<%# IsEditable %>" runat="server" CssClass="Normal" ><asp:Image ID="Image1" Runat=server ImageUrl="~/images/edit.gif" AlternateText="Edit" Visible="<%#IsEditable%>" resourcekey="Edit"/> Edit Text</asp:Hyperlink>
<asp:Label ID="lblContent" runat="server" CssClass="Normal" Visible ="false" />
<asp:HyperLink ID="LinkCSP" NavigateUrl="" Visible="true" runat="server" Text="" ></asp:Hyperlink>
</td>
</tr>
</table>
</itemtemplate>
</asp:datalist>
and here is the back end
Protected Sub lstContent_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataListItemEventArgs) Handles lstContent.ItemDataBound
Dim strContent As String = strTemplate
Dim strValue As String
' add content to template
Dim objProperties As ArrayList = Common.Utilities.CBO.GetPropertyInfo(GetType(CSPLoginInfo))
Dim intProperty As Integer
Dim objPropertyInfo As PropertyInfo
For intProperty = 0 To objProperties.Count - 1
objPropertyInfo = CType(objProperties(intProperty), PropertyInfo)
If strContent.IndexOf("[" & objPropertyInfo.Name.ToUpper & "]") <> -1 Then
strValue = Server.HtmlDecode(DataBinder.Eval(e.Item.DataItem, objPropertyInfo.Name).ToString())
strContent = strContent.Replace("[" & objPropertyInfo.Name.ToUpper & "]", strValue)
End If
Next intProperty
' assign the content
Dim lblContent As Label = CType(e.Item.FindControl("lblContent"), Label)
lblContent.Text = strContent
Dim LinkCSP As HyperLink = CType(e.Item.FindControl("LinkCSP"), HyperLink)
LinkCSP.Text = strContent
hLinkCSP.NavigateUrl=http://www.abc.com?u= + HttpContext.Current.User.Identity.Name
End Sub
thanks