I believe a webpage loading sequence process is...
1. code-behind code
2. webpage scripts, html, etc
Is there a way to run a "code-behind sub" as the very last thing before a webpage is displayed
Something like....
1. code-behind code
2. webpage scripts, html, etc
3. code-behind code (special)
The probelm I am encountering is:
I use code-behind to set a session variable, Session("myVariable")
It appears that this value is set during code-behind and before the webpage scripts are loaded. I need to grab a value of a dropdown list <asp:DropDownList and use it in my code-behind sub.
I posted a corollary question entitled:
>>>>>>>>>>>>>>>>>>>>>>>>>>
Is this possible? Calling a sub in a Child webpage from the Master webpage
ID = 27976154
I am using a MasterPage & a default.aspx page
The MasterPage contains a <asp:DropDownList control.
When this ddl changes, it fires this sub:
Protected Sub DropDownList1_SelectedInde
I have a sub in Default.aspx code-behind that uses the value set in the <asp:DropDownList control DropDownList1. The sub name is doStuff_default()
Is there a way to call the sub doStuff_default() from the MasterPage code-behind DropDownList1_SelectedInde
>>>>>>>>>>>>>>>>>>>>>>>>>>
Here's what I am trying to do.
1. Populate a DataTable, using the value of a DropDownList as a filter.
2. Display the data on the webpage.
Display on the webpage occurs this way:
<div id="div1" class="div1_Position" runat="server"><%=Session(
Note: Session("dt_myList") is set in the code-behind code.
When I embedded the DataTable code in the html, it worked ok (at first).
When I moved the "Populate a DataTable" to code-behind, I lost the immediate reference to the DropDownList
The reason I moved the "Populate a DataTable" to code-behind was because...
when it was in embedded html, I started to get "duplicate" entries into the DataTable. Instead of getting something like: 1,2,3,4,5 ..... I would get: 1,1,2, 1,2,3, 1,2,3,4, 1,2,3,4,5
I thought I might have some cross-code interfering with the "Populate a DataTable" so I moved it to code-behind. It solved the "duplicate" issue, but presented the "delay" issue on reposting from changes in the DropDownList.