views:

53

answers:

1

... i ask this mainly because when i try to use the update panel, it does not work, i've tried placing it in itemTemplate and editTemplate and both (even tho doing this would mean having to call the whole page), however i was running out of options because when i tried to place it inside the LayoutTemplate (where it makes sense to place it) it did not work once again, the updatePanel & listViiew begins like this...

{arrow}asp:UpdatePanel ID="upComments" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true"{arrow}

{arrow}ContentTemplate{arrow}

{arrow}asp:ListView ID="lvComments" runat="server" DataSourceID="dsComments"{arrow}

any ideas? this is now happening on two different aspx pages with different listviews and different datasources. idealy, i would prefer to minimize the ajax updated area as much as possible, preferably to itemTemplate level, but i'd even settle for the entire listView at the moment. thanks guys.

also, insertTemplate shows by default when page is loaded, and when i insert a new item, the entire page doesn't reload (like in other cases), the item is just added, not sure if this is a listView feature or the updatePanel in the works. when i press {edit} it reloads the page, and when i press update to update the item being edited, it also reloads the entire page. anyone?

+1  A: 

Hey,

Why not just try UpdateMode="Always" to see if it works? If your insert includes controsl that would postback, that would be the update panel at work because listview contains nothing to do that automatically.

I would wrap the entire control with the updatepanel; when one update panel refreshes its contents, they all do, and because of that at the itemtemplate level doesn't give you anything above and beyond what the global level gives you.

UpdatePanel's don't really help minimize the AJAX footprint because again it posts back the entire viewstate and all areas get refreshed; using JQuery to do AJAX is better in that regard, or using another product like Telerik (which their product only that one panel updates unless you link them together).

HTH.

Brian
Erx_VB.NExT.Coder
I'm not sure exactly what it does; it does refresh the single panel instead of all, though it does trigger page postback, so I'm not sure all the in-detail particulars. You can post a question on www.telerik.com/community/forums.aspx and get the detailed information there. Sorry for not knowing more about TelerikJQuery to do AJAX could minimize your AJAX trail because it can post back just JSON or XML, or an HTTP response...The thing is, with web forms, AJAX update panels and telerik's radpanel make it so much easier to do AJAX and work with server-controls. That is a big benefit.
Brian
thanks brian, do you have a preference between ajax update panel vs telerik radUpdate
Erx_VB.NExT.Coder
I love Telerik's products; they do perform well and they have a lot of useful controls. You can tell they put time into their products. They even spent time to ensure their web UI framework works in MVC, along with their separate MVC framework. SO I think they are a great company... but of course there is a price for that product. Unfortunately it isn't free... in most cases update panel works, just doesn't necessarily minimize its footprint. So it depends what you want.
Brian