473,322 Members | 1,493 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

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

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_SelectedIndexCha nged 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_SelectedIndexCha nged FIRED
MyMasterPage::Fireing off Index(0)
ConnStrChangedEventArgs::ConnStrChangedEventArgs (0)
TestPage::Master_ConnStrChanged

Jul 28 '06 #1
0 1321

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: multiformity | last post by:
So I have been working on an opensource project for a while, and decided to really try to make it look better after focusing on the functionality most of this time. Up to now, I have simply used a...
5
by: Juanjo | last post by:
I need to know how to maintain de status (nodes expanded and selected) of a treeview in a master page. I have a master page with a treeview. I have a default page, when the treeview is expanded...
8
by: William Buchanan | last post by:
Hi folks I have a "Search" text box and LinkButton in my master page. When this is submitted, I do a Server.Transfer to a page which contains a gridview. The gridview is filtered on a hidden...
1
by: LilC | last post by:
I'm creating an application that has a standard layout for all pages. The information that is displayed in the layout will be dynamic based on the user that is logged in. Thus when a page is...
9
by: ad | last post by:
Hi, How can I dynamically change the MasterPager of a web page?
4
by: Sam | last post by:
I have an asp.net 2.0 app that uses a sitemap, Master Page, and has several content pages. While this feature has simplified the process of creating a data-driven site menu, it does seem to have...
6
by: Matt | last post by:
On my master page i have build 5 link buttons. First Page I receive ID and set the ID in master page Property so i can do the work with it. How ever when i clicked to second button i lose this ID....
13
by: Kirk | last post by:
I have been reading Scott Allen's article on Master Pages (http:// odetocode.com/Articles/450.aspx) but I am having problems understanding a concept. Specifically, I have created a property...
4
by: Ganesh | last post by:
I've couple of button on master page, based on user login from default.aspx i control visibility of controls. I thought once i hide the button from default.aspx it should be same for other pages...
1
by: hemantkamb | last post by:
Hi…. I have created one website with Master and content page . I have taken TreeView Control on master page. And I wants that when I click to tree node the value of tree node is added to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.