.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

Show Loading Message during Loop

Posted By:      Posted Date: September 22, 2010    Points: 0   Category :ASP.Net

Hi all

I'm trying so show a message while i am doing some processing. I already tried to show/hide a gif image but it not works :S

Can anyone help me ???



var currentIndex = 0;
ShowImageLoader(); // Here trying to show a gif saying loading
while(currentIndex < newIndex)


    process(currentIndex); // long task here


HideImageLoader(); // Here hide the Gif


Thanks in advance

View Complete Post

More Related Resource Links

How to Show Loading Message while delay in Page Opening

Hy My web application is make time to open First page due to various data control on the page and values are coming to that control from database so i want to show the loading message of gif image during page loading delay. I have written this code in my master page but that image is not showing the application so please give solution on that problem<html xmlns="http://www.w3.org/1999/xhtml" > <head id="Head1" runat="server">   <title>Load Wait Message Demo</title> </head> <script type="text/javascript" language="javascript">   if(document.getElementById) { // IE 5 and up, FF     var upLevel = true;   } else if(document.layers) { // Netscape 4     var ns4 = true;   }   else if(document.all) { //IE 4      var ie4 = true;   }   function showObject(obj) {   if(ns4) {      obj.visibility = "show";   }   else if (ie4 || upLevel) {      drawMessageBox(); obj.style.visibility = "visible";            } }        showObject('splashScreen');   function hideObject(obj) {   if(ns4) {     

Show Please Wait... message on loading GridView.

Hi All. I wants to show Please Wait... message on loading GridView. I am not using ajax. The Please Wait... should come above the GridView. On combobox value change the gridview binds with new value. On every binding i wants to show the Please Wait... above the gridview.   Thanks.

create user wizard login error message dont show in a message box?




i am using create user wizard and capturing other information within content template when a new user

registers. Some of the textboxes are binded to required field validators.


there is a validation control on the page and ShowMessage box is True.

If they dont complete some of the text boxes then the message box pops Up with the error message.

It does not however include information errors like "User already exists" or Email address already exists

from the create user wizard membership  UserName and Password Textboxes


is it possilbe to hook all of these up so I get one message box with all errors including membership ones?




How to show a message box on an invalid filename entered while saving a file using save file dialog

Hi all i have written a code to display a message box if invalid characters are entered while saving the file but my message box is not displaying. Actually i will have a save file dialog option to save a file if the filename starts or consists of the following    \\/:*?<>|"  I would like to display a message box as invalid or illegalcharacters in file My code is as follows    Stream myStream;                          SaveFileDialog saveFileDialog1 = new SaveFileDialog();                            saveFileDialog1.InitialDirectory = @"C:\";                          saveFileDialog1.DefaultExt = "txt";                          saveFileDialog1.Filter = "(*.txt)|*.txt";                          saveFileDialog1.FilterIndex = 2;                          saveFileDialog1.RestoreDirectory = true;                            if (saveFileDialog1.ShowDialog() == DialogR

show a "no results" message if a db query returns nothing

I inherited some C# code behind that queries a database table and need to add something that displays a "No results" message (using a Label web control, perhaps) if the query doesn't return any records. I'm just learning C# but am coming up short on how to do this. Would anyone be kind enough to point me to an example, or demonstrate? Thanks a lot. Here's the code I inherited (the programmer who wrote this is no longer available). This is the code behind from the search results page:using System; using System.Text; using System.Data; using System.Data.Common; using System.Data.SqlClient; using System.Collections; using System.Collections.Generic; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace Maine_Innkeeper_Site_2010 { public partial class lodging_search_output : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { string sql = Session["logdingSearchSql"].ToString(); SqlCommand cmd = common.openDatabase(); cmd.CommandText = sql; string PreviousTown = ""; try { StringBuilder sb = new StringBuilder(); SqlDataReader rdr = cmd.ExecuteReader(); sb.Append("<ul class=lodging-search-initial-results>"); while (rdr.Read()) {

Show custom message in CreateUserWizard ErrorMessage control



How can I show a custom error message in CreateUserWizard ErrorMessage Control?

I check some custom rules in CreateUserWizard CreatingUser event and if not passed I want to show an error message in CreateUserWizard ErrorMessage control. I tried to set Text property of ErrorMessage control and set the Visible property to true but didn't work. I use template in CreateUserWizard.

Thank you,

JQuery: is there a way to show status message - from code behind?


i am trying to figure out how to display message box after it done executing the server side code

 here is the code which works from the client side but still looking for a way to make it work from code-behind


<div id="status"></div>


$("#status").fadeTo(500, 1, function() { $(this).html("You are now registered!").fadeTo(7000, 0); })

Loading please wait image show hide



I am trying to implement the loading please wait image funtionality while controls refersh on the page. Here are steps I have taken:

1. Added the image to the .net solution file in the image folder.
2. Added a div with the hidden class that holds the image source on the webform.

Image loads hidden by default and I am trying to show it when any postback or partial post back occurs. There are several controls like dropdowns, checboxes, gridview etc and links in the gridview that could take a few moments to load so I want to display the loading please wait while they reload after selections are made. All Controls exist in the update panel. I can't figure out how to show the image and hide it again when controls are reloaded. I am trying to add to this existing jQuery, my challenge is events occur after the document has been loaded so I need to add Ajax events to this query to show hide the loading please wait image. Here is what I have so far

//Dialog box settings

$(document).ready(function() {

    // $("mytest").dialog({
        title: "   Test",
        resizable: false,
        modal: true,

want to show animated loading gi in modal popup on buttton click??



I am using a  5 file upload controls on my page within a Create User Wizard.

In a modal pop up extender, I have a animated ajax gif with a message


When I submit the button (see code below )to send the form, the modal pop up shows up

but the image is not animated. If I put the button below in an update panel it

works with animation. But if I add a twigger for the button as the file upload controls needs a postbackthe image is static again. Is there anywhere I can display an animated image in the modal pop up and still keep my existing code.??



How to show message if the gridview row is highlighted


Currently on the gridview i display a list medicine stock and if the medicine quantity less then certain quantity, it will be highlighted on the row. After that, i want to display a message said that the medicine need to be restock ? I have try using  string builder however message does not come out..Any suggestion? Thank you

    protected void GridView_RowDataBound(object sender, GridViewRowEventArgs e)
        if (e.Row.RowType == DataControlRowType.DataRow)

            int Mquantity= (int)DataBinder.Eval(e.Row.DataItem, "Mquantity");
            if (Mquantity< 450)
                e.Row.BackColor = System.Drawing.Color.SkyBlue;
                e.Row.ForeColor = System.Drawing.Color.Black;
                e.Row.Font.Bold = true;

How to  implement the message to show that the medicine quantity is below 450 ?

How can show a message in SSRS?



I want to show the user a message in the SSRS page saying "No records found." when the stored does not return any values. Currently my reports shows the report headers. How do I do it? Please help. Thank you.

Loading message - with BackGround Process


I have a usercontrol in which I have a textbox and a Submit button. A 'Window' which actually holds the usercontrol handles the code on clicking the Submit button. (see code block) below. Issue: On clicking the submit button on usercontrol I wanted to show a 'Loading...' message but for some reason its not showing. can any on help me ? see code below.


  AllowDrop="True" Height="450" Focusable="True">
   <Grid Margin=

Show status message on popup



I am trying to display a status message after saving the data. I have a DIV tag with image and a message saying "Data Saved". I would like to show this DIV in popup after Saving this data. Please let me know.




Show wait form while loading another heavy form


Dear All,

I have a situation in my project that is a small and nice popup with loading animated gif should show while loading heavy forms in the application. For that to implement I have used threading concept. I am opening loading splash form in a separate thread and ending it when the main thread notifies that its task is completed. Every thing is working fine but my problem is when the user clicks on the application's forms while splash screen is doing its business the application is hanging.

Please help me on this.The code is as follows

class PleaseWait : IDisposable
        private FrmSplashWait mSplash;
        private Point mLocation;
        private string ttlTxt;

        public PleaseWait(Point location,string ttl)
            mLocation = location;
            ttlTxt = ttl;
            Thread popupthread= new Thread(new ThreadStart(workerThread));

iframe Loading Image show problem


i am  loading a ifrmae when we click a button .i am require a loadimage.show when i frame laoding time and disapper when i frame loaded

Loading multiple flat files files- MultipleFlatFile Connection Manager vs For each loop approach


Hi Folks

I need to load multiple  files from a folder into a package. Can someone explain the pros and cons of using the "Multiple Flat file connection manager" vs using a" For each loop" type approach (e.g http://bi-polar23.blogspot.com/2007/08/loading-multiple-excel-files-with-ssis.html).


Many thanks 



Error message "Infinite recursion detected. The loop of dependencies is: ." but I have no recursion?



I have a query like

   MEMBER [Product].[AttribE].[grp6] AS
      Aggregate( { [Product].[AttribE].&[a], [Product].[AttribE].&[b], [Product].[AttribE].&[c], [Product].[AttribE].&[d], [Product].[AttribE].&[e] } )
      ,Caption = 'Some text'
   MEMBER [Product].[AttribE].[grp0] AS
      Aggregate(( [Product].[AttribE].[AttribE].Members - { [Product].[AttribE].&[a], [Product].[AttribE].&[b], [Product].[AttribE].&[c], [Product].[AttribE].&[d], [Product].[AttribE].&[e] } ))
      ,Caption = 'All Others'
    ([Measures].[m], [Period].[Year-Six-Qtr].[Qtr].&[200903], [Statistic].[Statistic].&[none]),
    ([Measures].[m], [Period].[Year-Six-Qtr].[Qtr].&[200906], [Statistic].[Statistic].&[none]),
    ([Measures].[m], [Period].[Year-Six-Qtr].[Qtr].&[200909], [Statistic].[Statistic].&[none]),
    ([Measures].[m], [Period].[Year-Six-Qtr].[Qtr].&[200912], [Statistic].[Statistic].&[none]),
    ([Measures].[m], [Period].[Year-Six-Qtr].[Qtr].&[201003], [Statistic].[Statistic].&[none]),
    ([Measures].[m], [Period].[Year-Six-Qtr].[Qtr].&[201006], [Statistic].[Statistic].&[none])
    ({ ([Product].[AttribA].&[A], [Product].[AttribB].&[B1], [Product].[AttribC].&[C], [Product].[AttribD].&[D1]) } * ( { [Product]
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