Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Page_Load event is not firing (Custom module)Page_Load event is not firing (Custom module)
Previous
 
Next
New Post
9/5/2008 11:10 AM
 

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

 
New Post
9/5/2008 12:24 PM
 

Is your pageload not firing, or your itemdatabound event not firing?

do you have caching turned on for the module (module definition level, or module setting)?


Chris Hammond
Former DNN Corp Employee, MVP, Core Team Member, Trustee
Christoc.com Software Solutions DotNetNuke Module Development, Upgrades and consulting.
dnnCHAT.com a chat room for DotNetNuke discussions
 
New Post
9/5/2008 12:53 PM
 

Hi Chris

Thanks for your reply.

Both events are not firing (Page load and itemdatabound).

When I logoff/login this events have to fire. But it's not.

(do you have caching turned on for the module (module definition level, or module setting)?) - I don't know how to do that

thanks

 

 
New Post
9/5/2008 2:04 PM
 

if you go to the host/module definitions page, you can edit the definition for you module and change the default cache value.

You can also edit the module settings for the module on the page and change any cache values. For most custom modules you would set that to be 0


Chris Hammond
Former DNN Corp Employee, MVP, Core Team Member, Trustee
Christoc.com Software Solutions DotNetNuke Module Development, Upgrades and consulting.
dnnCHAT.com a chat room for DotNetNuke discussions
 
New Post
9/5/2008 2:25 PM
 

Thanks Chris

It's working now.

 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Page_Load event is not firing (Custom module)Page_Load event is not firing (Custom module)


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out