Click here to Skip to main content
11,644,151 members (74,078 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: ASP.NET
EDIT: OK, I think I have my solution, but maybe someone else can explain why. I am not doing any AJAX on the content or master page, but if I add AJAX's ToolkitScriptManager to my page, it seems to work fine. An AJAX requirement where there is no AJAX? Is there AJAX hidden in the master/content interaction?


I've got a master page, and a content page with 2 listboxes that works fine. Another content page has 2 listboxes as well, but sometimes (2-3 times out of 10) the listboxes show as collapsed, either on postback or on initial load. The notable difference between the two pages is that the one that works is taking a lot longer to fetch and load its data into the listboxes.

I've broken this out to a simpler test app, and I find that I can repeat the same result when I include the master page's image logos. If I exclude the images, the listboxes load correctly every time; same back in the original app. I tried copying the images to my app's subfolders, but no change. Any ideas what's happening?

EDIT: some additional information. The presence of a script tag in the content page is also important, even if nothing is calling the script. Try it for yourself (hopefully this isn't limited to my machine) ...

1. Start a new ASP.NET web application.
2. Add a couple images above the navigation menu:
            <div class="logos">
                <img alt="icon 1" src="images/image1.png" height="50" />
                <img alt="icon 2" src="images/image2.png" height="50" />
3. In the default page, add this to the body content:
                listbox 1
                <asp:ListBox ID="lstMyTask" runat="server" Height="30%" Width="100%">
    <div style="width:100%;margin-removed5px;">
        <asp:Button ID="btnPostback" runat="server" Text="Postback"/>
    <script type="text/javascript">
        function someFunction() {
            alert('something running this?');
4. In the code behind for the default page, add this (this is VB):
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            For i As Integer = 0 To 9
                lstMyTask.Items.Add(New ListItem(i + 1 & ": item " & i))
        End If
    End Sub
5. Configure and run your web app
6. Click the Home tab and/or the Postback button 20 times or so, and you should see it glitch at least once.
Posted 23-Apr-12 7:04am
Edited 24-Apr-12 4:08am
Sandeep Mewara at 23-Apr-12 13:09pm
Interesting. Strange behavior. I will follow the question and see how the discussion goes. My 5.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 610
1 484
2 DamithSL 318
3 Afzaal Ahmad Zeeshan 308
4 Sergey Alexandrovich Kryukov 246
0 OriginalGriff 795
1 DamithSL 611
2 Mika Wendelius 494
3 484
4 Afzaal Ahmad Zeeshan 404

Advertise | Privacy | Mobile
Web04 | 2.8.150731.1 | Last Updated 24 Apr 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100