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

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

How to delay ModalPopup content download until the popup is shown?

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


I have a modal popup extender and associated panel on a page.  The modal popup is displayed when a user clicks on a button.  The content of the popup might consist of a series of hi-res images which might take a significant time to download.   The problem is that although the modal popup is not shown its content is downloaded regardless.  I think that popup is initially assigned "display:none" and it's code and content are downloaded by the browser - which is an expected behavior.

Does anyone have a suggestion how to delay download of the content until the popup is shown?

I think that one  way of doing it would be to set the popup extender's and the associated panel's Visible to False and set it to true only when the button is clicked.  This would require 'launching' the popup on the server side.  Is this going to work?

Any other suggestions?


View Complete Post

More Related Resource Links

Custom ribbon button on content type not shown in XsltListViewWebPart


Hello all,

As a bit of background: I'm currently busy developing a content type with some kind of status (waiting / in progress / done). I want to make the users life a bit easier to complete an item so I want to add a button to the ribbon that sets the selected items status to "Done".
This works when I go to the list and click on the item (I see my button and it works perfectly). The problem is that this button is not visible when I add a view of this list on the homepage, then suddenly my button does not show.

Does anybody know what can be done to also show the button inside the ribbon of the XsltListViewWebpart? Below is my elements.xml that I use.


<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  Title="Add a Ribbon Button">
     <Button Id="Ribbon.ListItem.Actions.NewRibbonButton"

Modal PopUp Extender Dynamic Content



How can i make modal popup extender dynamic size which is populated by SqlDataSource???

Here is the code below ;

<asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="lblPopupTargetID"
                        PopupControlID="Panel1" BackgroundCssClass="modalBackground" DropShadow="true" />
                    <asp:Panel ID="Panel1" runat="server" CssClass="modalPopup" Width="450px" Height="300px">
                        <asp:UpdatePanel runat="server" ID="UpdatePanel1">
                                <asp:GridView ID="GridView1" DataSourceID="SqlDataSource2" runat="server" AutoGenerateColumns="False"
                                    Width="450px" Height="300px" AllowPaging="true" PageSize="10">
                                                <asp:Button ID="btn" runat="server" Text="Select" CausesVa

Sharepoint 3.0 - New Content Popup


I currently have E-mail alerts when content is added or moddified, but people can ignore this and then claim not to have see it. Is there a way in Sharepoint or by a third party bolt-on that I can get a small popup to appear on everyone's screen on the domain that they have to manually close to inform them of new content.

Hope you can help, thanks in advance.

How do I control the delay of the hover popup in CSS


I am trying to use the hover CSS attribute to create a simple box around a button control on a web form when I hover over it.  If I use the border or outline attribute to do this, it works fine...the box pops up when I hover over it, but if i move very quckly over the button it just does nothing.  I have to move slowly over it for the pop ups to work.  Is it possible to change this delay in CSS for just the border or outline paramater?

If I use "text-decoration: underline" for hovering instead of "outline: white solid 1px;", or "border: 1px solid white;"  there is no delay. 

If I try drawing a box around it using the border or outline attribute it still works but is delayed. 


Here is my CSS

      	background-color: transparent; 
	border: 0px none transparent;
	height: 28px;
	width: 150px;
	text-align: left;

	outline: white solid 1px;
Any ideas?




SharePoint Tutorial - Content Types

SharePoint content types provide users with a way to manage and organize content in a more meaningful way. It's a reusable of settings you want to apply to a particular type of document in a library or item in a list.

Enabling Users to Maintain SharePoint Content

When SharePoint is installed as a corporate intranet, there is a considerable amount of effort involved in maintaining the content to keep the site relevant. As we discussed in the first few parts of this series, SharePoint has many built-in features to reduce the burden on the site administrator.

Some areas of the site usually contain less-dynamic information. Internal memos and corporate policies are common examples of this information. One option for this information is to post these documents in a document library. Documents in a library are often stored in a few different formats: Word, Acrobat (PDF), or HTML. Each of these formats has its drawbacks.

Using ATLAS PopUp Control with Calendar inside the GridView Control

In this video tutorial Mohammad demonstrates how you can access the Calendar control which is displayed using the ATLAS PopUp control inside the GridView control.

Application Vs. Content Pages in SharePoint

SharePoint has two types of ASPX pages. One type is the application page, also known as a _layout page. The other type of ASPX page is a content page, also known as a site page. Each of these page types is stored in a different location in SharePoint. When developers create custom ASPX pages, they must decide on the page type.

Enabling Users to Maintain SharePoint Content

When SharePoint is installed as a corporate intranet, there is a considerable amount of effort involved in maintaining the content to keep the site relevant. As we discussed in the first few parts of this series, SharePoint has many built-in features to reduce the burden on the site administrator.

Content Types in MOSS 2007

In this article I will try to describe the one of the best feature in Microsoft office Share Point 2007 called Content Types.

Content types are simply collection of contents.Each content in a Content type can have different settings.Basically it is a reusable collection of settings which you want to apply to a particular category of contents.

Content Query Web Part missing in SharePoint 2010

If you don't see content query web part listed in the web parts list, this is because you have not enabled "Search Server Web Parts" feature in site collection features. Enable this feature and content query web part will show in the list of web parts.

Modal popup window in ASP.Net

A Masked div or modal popup window is a child window created from the parent window which prevents the user from interacting with parent window before he returns to the parent application.

Download and Share Visual Studio Color Schemes

The good news is that Visual Studio allows you to completely customize the editor background and text colors to whatever you want - allowing you to tweak them to create the experience that is "just right" for your eyes and personality. You can then optionally export/import your color scheme preferences to an XML file via the Tools->Import and Export Settings menu command.

Free e-books Download

This is the link where we have get free e-books for downloading

Unique content within master page based on conditions met


 Hi all-

I would like to present users with unique content based on certain conditions being met as they land on the home page (default.aspx).  The condition logic will be in the VB code behind Page Load event. The content will go in a content placeholder as specificed from the master page. 

However, the content change wouldn't be something small (ie making a panel or label visible or not) but rather it will be different HTML,  Divs and databound gridview content.  The HTML content will be stored in the database.

Can someone point me in the right direction for best practices on how to accomplish this?


Passing Linq Statement between master and content page


I usually work with windows forms, and am just starting to work with ASP.Net, so appologies if this is a dumb question!

I have a master page which has a search button on it. The results of this are built up using a Linq statement and if there are any results, I want to display the results in a contents page.

On the masterpage, I have the following code:

Private _res

    Public Overridable ReadOnly Property SearchRes()
            Return _res
        End Get
    End Property

 Private Sub DoSearch()
   'some code to get a linq result

    If res.Any Then
            _res = res
            Server.Transfer("SearchResults.aspx", True)
            'no results
            LabelNoRes.Visible = True
        End If
 End Sub

On the SearchResults.aspx page I have this code.

Dim m As pxSite = CType(Page.Master, MasterPage)
        If m.SearchRes IsNot Nothing Then
            Label1.Text = "Results found = " & m.SearchRes.Count
        End If

m.searchRes is always nothing. 

What am I doing wrong here?


Open ModalPopup dialog on page load


Is there a way to make a modal popup panel active on page load so that the user can't do anything until they deal with the popup dialog?

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