Last post Mar 25, 2020 01:29 PM by immayankmodi
Mar 23, 2020 01:59 PM|martinwang1985|LINK
in my aspx there is
<% var disPlayItems= ListDisplay(0,0); %>
ListDisplay is in C# code to read db, according to the input parameters.
and the paramters , although when page was load, is 0 , but in fact it depends on values of dropdown.
the displayed itesm are in <li></li>
My problem is , when the users change value of dropdown, the ListDisplay is called, but the layout in<% %> is not changed.
how to reload the aspx to let it execute ListDisplay? thank you very much
Mar 23, 2020 02:37 PM|mgebhard|LINK
Set the DropDownList's attribute AutoPostBack=true to cause a post back when the dropdown changes.
Mar 23, 2020 02:37 PM|Rion Williams|LINK
If you are looking to update a specific area of a Web Form, you might consider leveraging an
UpdatePanel, which would cause essentially a full page refresh to only be applied to a single area of your page. Basically, configure your DropDown control to trigger a postback via the
AutoPostBack=true property, which would cause a full page reload (or if you configure your UpdatePanel, only the panel itself to be rerendered).
This related question covers a few examples that rely on an UpdatePanel being driven by a DropDownList that might be worth exploring.
Mar 25, 2020 01:29 PM|immayankmodi|LINK
This is not clear exactly what you're looking for. It would be great if you could provide some sample code that you've done. It'll help us to reply proper answers and suggessions.