How to solve this? Thank You.

Discussion in 'ASP .Net' started by Shapper, Jun 8, 2005.

  1. Shapper

    Shapper Guest

    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
     
    Shapper, Jun 8, 2005
    #1
    1. Advertising

  2. Shapper

    Shapper Guest

    Please, Anyone?

    Thanks,
    Miguel

    "Shapper" <mdmoura*NOSPAM*@gmail.*DELETE2SEND*com> wrote in message
    news:mdmoura*NOSPAM*@gmail.*DELETE2SEND*com:

    > 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
     
    Shapper, Jun 8, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Miguel Dias Moura
    Replies:
    0
    Views:
    346
    Miguel Dias Moura
    Apr 9, 2004
  2. Miguel Dias Moura
    Replies:
    2
    Views:
    2,694
    mikeb
    Apr 2, 2004
  3. Miguel Dias Moura
    Replies:
    0
    Views:
    407
    Miguel Dias Moura
    Apr 2, 2004
  4. Shapper
    Replies:
    7
    Views:
    473
    Hans Kesting
    Jun 20, 2005
  5. shapper
    Replies:
    0
    Views:
    317
    shapper
    May 30, 2007
Loading...

Share This Page