How to solve this? Thank You.

S

Shapper

Hello,

I got a control which display some data from RSS feed in my page.
In my aspx.vb I need to change some Labels and Images properties, used
by the control, when the culture is changed.

For that I created a function named Build_RSS()

Private Sub Build_RSS(Dim Culture As String)
Dim img As System.Web.UI.WebControls.Image =
cnews.FindControl("_ctl0").FindControl("imgLogo")
img.AlternateText = "New Text"
End Sub

It's not working!

Then I tried this:

Private Sub Page_PreRender(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.PreRender
Dim img As System.Web.UI.WebControls.Image =
cnews.FindControl("_ctl0").FindControl("imgLogo")
img.AlternateText = "New Text"
End Sub

This works!

I got informed that the control loads RSS feed and build object model in
OnLoad event handler, which occurs exactly after Page_Load event.

Anyway, I am lost.

How can I make my Build_RSS function to work?
Can someone tell me what do I need to change or add in my code?

Thank You,
Miguel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,222
Members
46,809
Latest member
moe77

Latest Threads

Top