ASP.NET 2.0 Master page: Where to Set/Get session value?

Discussion in 'ASP .Net' started by Managed Code, Jul 28, 2006.

  1. Managed Code

    Managed Code Guest

    Hi all,

    I've got a DropDownList for the connection string in a master page.
    Transitioning between content pages causes it to reset to the first
    value.

    Under what conditions and where should I do the following?

    1 - Initialize the DropDownlist.
    2 - Set the default SelectedIndex value.
    2 - Save the SelectedIndex value in session variable
    3 - Retrieve the session value.

    Down below is a trace of the flow.

    Thanks...



    ------------------------------------------------------------
    TestPage::TestPage
    MyMasterPage::MyMasterPage
    MyMasterPage::MyMasterPage_Init:!IsPostBack
    MyMasterPage::MyMasterPage_Init:SelectedIndex(1)
    TestPage::TestPage_Init:!IsPostBack
    TestPage::TestPage_Load:!IsPostBack
    MyMasterPage::MyMasterPage_Load:!IsPostBack

    ------------------------------------------------------------
    TestPage::TestPage
    MyMasterPage::MyMasterPage
    MyMasterPage::MyMasterPage_Init:IsPostBack
    MyMasterPage::MyMasterPage_Init:SelectedIndex(0)
    TestPage::TestPage_Init:IsPostBack
    TestPage::TestPage_Load:IsPostBack
    MyMasterPage::MyMasterPage_Load:IsPostBack
    MyMasterPage::ConnectionStringDDL_SelectedIndexChanged FIRED
    MyMasterPage::Fireing off Index(0)
    ConnStrChangedEventArgs::ConnStrChangedEventArgs (0)
    TestPage::Master_ConnStrChanged

    ------------------------------------------------------------
    TestPage::TestPage
    MyMasterPage::MyMasterPage
    MyMasterPage::MyMasterPage_Init:!IsPostBack
    MyMasterPage::MyMasterPage_Init:SelectedIndex(1)
    TestPage::TestPage_Init:!IsPostBack
    TestPage::TestPage_Load:!IsPostBack
    MyMasterPage::MyMasterPage_Load:!IsPostBack

    ------------------------------------------------------------
    TestPage::TestPage
    MyMasterPage::MyMasterPage
    MyMasterPage::MyMasterPage_Init:IsPostBack
    MyMasterPage::MyMasterPage_Init:SelectedIndex(0)
    TestPage::TestPage_Init:IsPostBack
    TestPage::TestPage_Load:IsPostBack
    MyMasterPage::MyMasterPage_Load:IsPostBack
    MyMasterPage::ConnectionStringDDL_SelectedIndexChanged FIRED
    MyMasterPage::Fireing off Index(0)
    ConnStrChangedEventArgs::ConnStrChangedEventArgs (0)
    TestPage::Master_ConnStrChanged
     
    Managed Code, Jul 28, 2006
    #1
    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. Doug McCann
    Replies:
    1
    Views:
    1,109
    William Brogden
    Aug 5, 2004
  2. Zeba
    Replies:
    1
    Views:
    531
    Mark Rae
    Feb 22, 2007
  3. Nathan Sokalski
    Replies:
    25
    Views:
    1,481
    Nathan Sokalski
    Mar 4, 2010
  4. SerpentKiss2010
    Replies:
    0
    Views:
    2,534
    SerpentKiss2010
    Apr 6, 2011
  5. ocean
    Replies:
    2
    Views:
    453
    ocean
    Oct 18, 2005
Loading...

Share This Page