J
John Kotuby
Hi all,
Usining VS2008 and VB I have a usercontrol that serves as an advanced search
tool. It is comprised of a bunch if HTML input fields including Selects
along with some aspnet input controls. It also has a Grid that is populated
with the results of the search.
The Grid is contained in an update panel and the asp "Submit Search" button
is defined as its AsynchPostback trigger.
<asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server"
EnableViewState="true"></asp:ScriptManagerProxy>
<asp:UpdatePanel ID="updKeywordSearch" runat="server"
UpdateMode="Conditional" EnableViewState="true"
ChildrenAsTriggers="false">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnSearch" />
</Triggers>
As you notice I use a ScriptManagerProxy as the parent page also contains
update panels. I have not nested any update panels.
Here is the code that retieves the value form the Select element upon
postback:
filterCons = UCase(Request.Form("filterCons"))
Where "filterCons" is the name of one of the Select elements.
Even though the HTML source of the page clearly shows a Selected option, the
value at the postpack is an empty string.
This is true for all of the Select elements in that user control.
What bothers me is that I have a very similar control that just lacks the
Grid inside of an update panel, and so the btnSearch is not defined as an
AsyncPostBackTrigger but rather does a standard postback and saves the
retieved values back to a database.
In this case the exact same code:
filterCons = UCase(Request.Form("filterCons"))
....returns the expected value.
In fact the code for both controls is nearly identical except for the grid
in the Update Panel.
I don't understand why there should be a difference?
Can anyone explain? Thanks for any help.
Usining VS2008 and VB I have a usercontrol that serves as an advanced search
tool. It is comprised of a bunch if HTML input fields including Selects
along with some aspnet input controls. It also has a Grid that is populated
with the results of the search.
The Grid is contained in an update panel and the asp "Submit Search" button
is defined as its AsynchPostback trigger.
<asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server"
EnableViewState="true"></asp:ScriptManagerProxy>
<asp:UpdatePanel ID="updKeywordSearch" runat="server"
UpdateMode="Conditional" EnableViewState="true"
ChildrenAsTriggers="false">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnSearch" />
</Triggers>
As you notice I use a ScriptManagerProxy as the parent page also contains
update panels. I have not nested any update panels.
Here is the code that retieves the value form the Select element upon
postback:
filterCons = UCase(Request.Form("filterCons"))
Where "filterCons" is the name of one of the Select elements.
Even though the HTML source of the page clearly shows a Selected option, the
value at the postpack is an empty string.
This is true for all of the Select elements in that user control.
What bothers me is that I have a very similar control that just lacks the
Grid inside of an update panel, and so the btnSearch is not defined as an
AsyncPostBackTrigger but rather does a standard postback and saves the
retieved values back to a database.
In this case the exact same code:
filterCons = UCase(Request.Form("filterCons"))
....returns the expected value.
In fact the code for both controls is nearly identical except for the grid
in the Update Panel.
I don't understand why there should be a difference?
Can anyone explain? Thanks for any help.