Try Now
More in this section

Forums / Developing with Sitefinity / Page_Load of User Controls

Page_Load of User Controls

3 posts, 0 answered
  1. Trevor
    Trevor avatar
    18 posts
    05 Oct 2010
    12 Nov 2010
    Link to this post

    The Page_Load in my code behind file for my user control isn't executing and I was wondering if this is a Sitefinity thing or if I need to explicitly call it from somewhere.

    To paint a better picture of what I need, I'm creating a custom login module and I've created strings to assign custom error messages (ie: Wrong Password) from the Edit window in Sitefinity. The thing is I want to have default values for these msgs for all languages that we plan on using. To do this I have a dictionary<string,string> where the key is the language code (en/es/fr/etc) that I get with CultureInfo.CurrentUICulture + a suffix. The thing is I need a place to initialize this data structure ( Page_Load? ).

    Is there a way to get my Page_Load working on a user control or is there an alternative I can use in this situation?

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    25 Oct 2016
    13 Nov 2010
    Link to this post
    Hello Trevor,

    There is no issue in Sitefinity that would prevent Page_Load calling. This would mean that there would not be a working control in the entire engine.

    You can use the standard ASP.NET Login control and set the value of error message properties like UserNameRequiredErrorMessage to a resource file

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Raihan
    Raihan avatar
    17 posts
    25 Mar 2011
    03 May 2011
    Link to this post
    Hey Trevor,

    I'm experiecing the exact same problem!! Were you able to find a solution?

Register for webinar
3 posts, 0 answered