.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

ajax - Nested Datalist in Updatepanel

Posted By:      Posted Date: October 27, 2010    Points: 0   Category :ASP.Net


I need to input nested data (data entry) and i am using datalists for the same. The details include many details and I am managing the same using controls for each in information.

The parent datalist can have max 20 rows with 7 rows in each child datalist. I tried to bind the datalists with max rows, due to which the rendered page size was almost 12MB and it took more than 2 mins to load.

Alternative to this, I put the parent datalist in updatepanel and bound it to one row initially.  Onclick of add button, i implemented an asynchronous postback to add new row to the parent datalist datasource and update the updatepanel to display the datalist.  The new row is displayed properly in datalist, however it gets reset to original datalist after some seconds.

I have no clue about the reason for it. Please help me to resolve the above issue.


View Complete Post

More Related Resource Links

UpdatePanel is not a known element - message when upgrading to 1.0 ajax


It worked on one of my old pages.  I change the web.config, renamed all the <asp.

On some aspx page it doesn't recognize the updatepanel.  It only does on one page.  If I create a new aspx page with a different name - then it works.

Should I just create a new web project ajax - then copy all my code into there?  Or is there a way to get those old pages to recognize the new ajax controls?

How do you insert a google map into an ajax updatepanel?


I have built a site that I am using google maps on.  The default page has a google map with info windows containing links and all works great... until a user clicks on the link in the info window.  Doing so takes them to a community page that I have built.  On this community page, I have an ajax update panel that has 2 panels nested inside of it with the visibility set for one to be on and the other off.  The default panel shows community photos, and the second panel I want to show the google map and common directions to the community.  In testing, my buttons to switch the visibility of the panels works great as it should without postback, but when I try to add the map to its panel, it does not show up.  I am new to ajax as well as google maps and I'm not sure why the same code would work fine on my default page but not the community page.  The only obvious thing I can assume is because the community page map is in an update panel.  

How do you insert a google map into and ajax updatepanel and have it work correctly?  Many thanks in advance. 

Create databound nested ajax toolkit accordion programatically(In code Behind)


Can anyone guide me in the right direction or give an example of How I would accomplish this?


I have  this so far but kind of stuck on how to do it programtically if I'm using header and content templates 

I have a xmldatasource.. In a nutshell at what point in my code do I need to create a new accordion? does it need to be

in the item_databound handler?


Imports Microsoft.VisualBasic

Public Class AccordionTemplate
    Implements System.Web.UI.ITemplate

    Dim templateType As String

    Sub New(ByVal type As String)
        templateType = type
    End Sub

    Public Sub InstantiateIn(ByVal container As System.Web.UI.Control) _
          Implements System.Web.UI.ITemplate.InstantiateIn

        Dim ph As New PlaceHolder()

        Select Case (templateType)
            Case "Header"
                Dim myLabel As Label = New Label()
                myLabel.Text = "Test"
            Case "Content"
                ph.Controls.Add(New LiteralControl("<p>hello</p>"))
        End Select
    End Sub

End Class



Partial Class Accordion
    Inherits System.Web.UI.Page


Datalist and Ajax control toolkit Modal Popup window

Hi friends I have created list of thumbnail images in datalist and on clicking image i want to pass image name to Ajax control toolkit Modal Popup window which display bigger image.   Please help me.

Issue accessing textbox controls nested within a DetailsView within an UpdatePanel

I have a couple of textboxes nested with a detailsview, within an updatepanel.  When I try and access them from the code behind, it returns a null value as if they don't exist.  Can't figure out why that would be.ASPX code is: <asp:UpdatePanel ID="upSpecificShout" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true" > <ContentTemplate> <asp:DetailsView ID="dvSingleShout" DataSourceID="sdsSingleShout" runat="server" AutoGenerateRows="false" OnDataBound="SetDVIcons" HeaderStyle-CssClass="noDisplay" > <EmptyDataTemplate> <p class="Watermark"> The panel on the left shows a list of everything you've shouted. (Your replies to other shouts are highlighted in blue/green.) </p> <p class="Watermark"> This right hand panel will show specific shouts with a list of replies etc.. Just do a little click on a shout title to display more detail here. </p> <p class="Watermark">

How to use Nested Datalist For Product Listing Page .. ??

Hello Experts Kindly Help me to solve a big problem ...   Length 1700 mm x Width 700 mm   Depth 430 mm x Capacity 185 ltrs   Bath Thickness x 5 mm   £181.00 Now only £127.50http://www.penbiddle.com/phoenix_bath_range/rectangularo_bath.htm   like in this linki have to use Datalist for this ...NEsted Datalist

Refreshing datalist in updatepanel


I have a datalist. When a user clicks a button in the datalist I change some properties and then want to refresh the datalist. However, the code below doesnt seem to refresh the datalist. Once I reload the entire page (which I dont want) the changes are visible in the datalist.
I also tried setting the updatemode of the updatepanel to "Conditional" and update manually in the dlPhotos_ItemCommand, but that doesnt work either.

In bold I've marked where I want to refresh the datalist

        <asp:UpdatePanel ID="upnlPhotos" runat="server">

        <cc1:AsyncFileUpload ID="afuPhoto" runat="server" />

        <asp:DataList ID="dlPhotos" DataSourceID="dsPhotos" DataKeyField="id" RepeatColumns="5" RepeatDirection="Horizontal" GridLines="None" runat="server" >
            <asp:Button ID="btnSetThumbnail" CommandName="setthumb" CommandArgument='<%# stri

Help:JAVASCRIPT (checkAll) & (Hide/Unhide GridView1) in a Datalist with a nested Gridview


Hey guys,

 I'm at my wits end on this one looked/Searched/Played/Experimented and I need your help if you can.

This page is going to be primarily used on a mobile device using Win Mobile 5


Need to Accomplish:

  1. Prevent Postback(serverside) of Page using JavaScript (Postback's slow down the page on mobile device)


JavaScript Requests:

  1. Hide and UnHide the Nested Gridview1 by Clicking on a imagebutton1 in DataList1icon_minized_collapse.pngicon_expand_collapse.png
  2. CheckBox in DataList1 Checks All and UNChecks All, CheckBox in just the related Gridview1


Controls :

  1. Gridview1 nested inside DataList1


Note: Datalist1 and Gridview1 have datasource's in production. The Codebehind page is just appling test data to help me figure this out.


Thank you all in advance for helping me with this.

Example data below:<

problem with datalist in updatepanel


Hi! i try to make a search part. there is a textbox which will be used for search context. also, i need to list category names. i don't use dropdownlist because its styles(for example border-style)doesn't change. So i tyr to do like this:i use a label and datalist. when clicking the label, datalist is showing. when i click the category name on datalist, it will be shown on label.(label is not in datalist.)my problem starts at that point. when i click category name on datalist , page is being postback. so i put datalist into updatepanel. but this time , i click category name on datlist,nothing occurs.(category name doesn't shown on label).my code is below:

<asp:UpdatePanel ID="UpdatePanel1" runat="server">

update datalist in updatepanel after asyncfileupload has uploaded a new file


I want to update an updatepanel after the user has uploaded a photo via the asynfileupload control.

Below is my current code. I also tried setting updatemode="conditional" to "false" and then in code-behind call upnlPhotos.update, but without luck...

Upload photo: <cc1:AsyncFileUpload ID="afuPhoto" runat="server" /><br />

<asp:UpdatePanel ID="upnlPhotos" runat="server">

    <asp:DataList ID="dlPhotos" DataSourceID="dsPhotos" DataKeyField="id" RepeatColumns="5" RepeatDirection="Horizontal" GridLines="None" runat="server" >
        <img alt="" src='/images/trouwlocatiefotos/thumbs/<%# Eval("locpath")%>' /><br />            

    <asp:SqlDataSource ID="dsPhotos" SelectCommand="SELECT id,locationid,locpath from location_photos lp where locationid=@locationid" ConnectionString="<%$ConnectionStr

Nested updatepanel updating all the update panel



I have one update panel which is having tPlaceholder which is loading dynalically.

<asp:UpdatePanel ID="UpdatePanel_ForumContent" runat="server" UpdateMode="Conditional">
            <asp:PlaceHolder ID="ForumTopicPlaceHolder" runat="server" Visible="true"></asp:PlaceHolder>

in the CS file on page load, adding Placeholder dynalically

 Control ForumTopicTabControl = LoadControl("Topic.ascx");
                Assembly objAssembly = BuildManager.GetCompiledAssembly("~/Topic.ascx");
                Type objType = objAssembly.GetType("Blogs_ForumTopic");
                PropertyInfo objProperty = objType.GetProperty("TableName");
                objProperty.SetValue(ForumTopicTabControl, dr["TopicTableName"].ToString(), null);
                objProperty = objType.GetProperty("HeaderName");
                objProperty.SetValue(ForumTopicTabControl, dr["Name"].ToString(), null);
                objProperty = objType.GetProperty("HeaderDesc");
                objProperty.SetValue(ForumTopicTabControl, dr["Description

Ajax Nobot, updatePanel on firefox


Hi guys,

I encounter a very strange problem and hope someone could help me. I have a content page in which a nobot control is used to prevent any robot guessing. There is an updatepanel used to hold all the input fields, enter button and the nobot control. Whenever I finished filling out the form and pressed enter button, an invalidbadresponse will come out. This problem doesn't appear on IE, Chrome but on Firefox. I used firebug to trace the problem and then i found that 2 posts were submited. 1 is aborted and 1 is successfully sent. The most wired thing is, when i fired the webpage on debugger mode from visual web developer (http://localhost:<port> ), firefox can validate it without a problem. Once I copied the page to my website ( http://www.mySite.net/ ), such invalidbadresponse comes out. Then, I tried to remove the updatePanel and now only 1 post is sent and no more invalidbadresponse is shown. Therefore, I guess the problem is between the mechanism of nobot and updatepanel. Could anyone know what happens behind and what I could do to solve this problem ?

My challenge is from the internet:

    Protected Sub CustomChallengeResponse(ByVal sender As Object, ByVal e As AjaxControlToolkit.NoBotEventArgs)

v3.5 Ajax ToolkitScriptManager Extender Control not working in Nested Master Pages


I am using v3.0.31106.0 of the AjaxControlTookkit.dlll.  I have nested master pages.

The site Master page has the only ScriptManager & holds the oneColumn & twoColumn master pages.
The twoColumn master page holds content pages. In the content page there is a update panel.

Here is my Site Master Page:

<%@ Master Language="VB" CodeFile="SiteMasterPage.master.vb" Inherits="SiteMasterPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    <div><h2>Main Master Page</h2>
        <br /></div>
        <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">

Here is the Nested Master Page:

DataList and Ajax!



How can i make the datalist control edit button, when someone click on edit button, the page of editing the data will be (pop-up) page and edit the data without need to reload the page?

I am new to this, please give me a simple way to do it.


AJAX UpdatePanel Memory Leaks in IE.


After researching why a page I have using an UpdatePanel to perform a refresh every 15 seconds was using up piles and piles of memory over time, I discovered that this is a "well-known" issue with the UpdatePanel not cleaning up properly in IE (some issue with reference counting in COM interop or some such).  UpdatePanel does not seem to have this issue in Firefox (haven't confirmed the issue in other browsers).

If this is a "well-known" issue, two questions:

Is there a "well-known" workaround to this?  I know that a full-page refresh will cause the memory to be cleaned up, but some pages may be up for a long time and I don't want to interrupt any user interaction with the page that may be going on.  I will if it is required, but it is a sloppy, sloppy UI kluge... you know, one of those "as a self-respecting coder I hang my head in shame at what I have wrought" kind of kluges.

Is there any effort being made to fix this?  I've looked about, however, most articles on this do not make mention of even MS acknowledging bug status for this while I've seen many telling me why this is an issue, and how it's a "design" thing.  I hear IE9 is supposed to take care of this... I guess what you'd call a non-issue, but it will only be available to

refresh listbox on updatepanel ajax control tool kit


Hi all, 

i have a dropdownlist and a listbox inside an update panel. I populate the listbox with a selected value of the dropdownlist and works ok. The problem is when delete an item from the listbox because does not the refresh of the listview and still to watch me the deleted item. 

how can i do the refresh?

pd: i am using framework 2.0

thx in advance!

Javascript allert inside AJAX UpdatePanel not working


I am having problems with alert box not popup when I'm using AJAX UpdatePanel. The following is what I have and it's not working.

1    ClientScriptManager csm = Page.ClientScript;
3    if(!csm.IsStartupScriptRegistered(this.GetType(), "winPop"))
4    {
5    	csm.RegisterStartupScript(this.GetType(), "winPop", "alert('Update is successful');", true);
6    }

I have to stress that the reason why it does not work is because I'm using AJAX UpdatePanel. If I turned off the AJAX UpdatePanel then it works perfectly. So does anyone have solution to go around this AJAX UpdatePanel issue?

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend