Tag Archives: UpdateProgress

[RESOLVED]Using CSS to hide DIVS

Hi, I have an update progress to show a loading screen while my page runs a long SQL query.

It works great, but the CSS which hides the background and page text doesnt hide the DIVS. This is my ProgressUpdate which works.

#progressBackgroundFilter {
    position:fixed;
    top:0px;
    bottom:0px;
    left:0px;
    right:0px;
    overflow:hidden;
    padding:0;
    margin:0;
    background-color:#000;
    filter:alpha(opacity=50);
    opacity:0.5;
    z-index:1000;
}


#processMessage {
    position:fixed;
    top:40%;
    left:43%;
    padding:10px;
    width:14%;
    z-index:1001;
    background-color:#fff;
    border:solid 1px #000;
}

This is my CSS which works hiding the background and text but not the DIVS

                <asp:updateprogress associatedupdatepanelid="UpdatePanel1" id="UpdateProgress1" runat="server">
 
                    <progresstemplate>
 
                        <div id="progressBackgroundFilter"></div>
 
                        <div id="processMessage"><img alt="Loading" src="Images/ajax-loader.gif" /></div>

                    </progresstemplate>
 
                </asp:updateprogress>    

This is how my page looks when its updating

https://skydrive.live.com/redir.aspx?cid=9c2775bd3b48974e&resid=9C2775BD3B48974E!117&parid=9C2775BD3B48974E!113

Thanks

Hi,

For hide div in CSS use display = none

http://www.acham.com.br

Hi, please make sure the background of update progress is big enough to hide the DIVS.

danieldunn10

background and text but not the DIVS

You can use attribute 

display:none for div in your css class.

[RESOLVED]Clear textboxes with gridview display

Hello,

I am using update panels to display some textboxes. The textboxes are filled in and a button click event is fired that inserts the textbox data into the sql database that is bound to a gridview.

I am able to insert the values into the database and gridview just fine but am unable to clear the textboxes without it stopping the gridview from appearing.

I have tried setting the textbox values to "" and string.empty but think it must be something else causing the problem, any ideas?

.CS

protected void MyButtonSave_Click(object sender, EventArgs e)
        {
            SqlDataSourceNwd.Insert();
            GridView1.DataBind();
            System.Threading.Thread.Sleep(2000);
            MyTextBoxCity.Text = "";
            MyTextBoxCompany.Text = "";
            MyTextBoxContact.Text = "";
            MyTextBoxPhone.Text = "";
        }

Default

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                <ContentTemplate>
                    <div style="margin: 20px 0px 20px 40px">
                        Company<br />
                        <asp:TextBox ID="MyTextBoxCompany" runat="server" Width="200"></asp:TextBox>
                        <br />
                        Contact Name<br />
                        <asp:TextBox ID="MyTextBoxContact" runat="server" Width="200"></asp:TextBox>
                        <br />
                        City<br />
                        <asp:TextBox ID="MyTextBoxCity" runat="server" Width="200"></asp:TextBox>
                        <br />
                        Phone<br />
                        <asp:TextBox ID="MyTextBoxPhone" runat="server" Width="200"></asp:TextBox>
                        <br />
                        <asp:Button ID="MyButtonSave" runat="server" Text="add" Style="margin-top: 15px"
                            OnClick="MyButtonSave_Click" />
                    </div>
                </ContentTemplate>
                <Triggers>
                    <asp:AsyncPostBackTrigger EventName="Click" ControlID="MyButtonSave" />
                </Triggers>
            </asp:UpdatePanel>
            <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                DataKeyNames="SupplierID" DataSourceID="SqlDataSourceNwd" Visible="true">
                <Columns>
                    <asp:BoundField DataField="SupplierID" HeaderText="SupplierID" InsertVisible="False"
                        ReadOnly="True" SortExpression="SupplierID" />
                    <asp:BoundField DataField="CompanyName" HeaderText="CompanyName" SortExpression="CompanyName" />
                    <asp:BoundField DataField="ContactName" HeaderText="ContactName" SortExpression="ContactName" />
                    <asp:BoundField DataField="City" HeaderText="City" SortExpression="City" />
                    <asp:BoundField DataField="Phone" HeaderText="Phone" SortExpression="Phone" />
                </Columns>
            </asp:GridView>
            <asp:SqlDataSource ID="SqlDataSourceNwd" runat="server" ConnectionString="<%$ ConnectionStrings:NwdConnectionString %>"
                SelectCommand="SELECT [SupplierID], [CompanyName], [ContactName], [City], [Phone] FROM [Suppliers] ORDER BY [CompanyName]"
                InsertCommand="INSERT INTO Suppliers(CompanyName, ContactName, City, Phone) VALUES (@Company,@Contact,@City,@Phone)">
                <InsertParameters>
                    <asp:ControlParameter ControlID="MyTextBoxCompany" Name="Company" PropertyName="Text" />
                    <asp:ControlParameter ControlID="MyTextBoxCity" Name="City" PropertyName="Text" />
                    <asp:ControlParameter ControlID="MyTextBoxContact" Name="Contact" PropertyName="Text" />
                    <asp:ControlParameter ControlID="MyTextBoxPhone" Name="Phone" PropertyName="Text" />
                </InsertParameters>
                <SelectParameters>
                    <asp:ControlParameter ControlID="MyTextBoxCompany" Name="Company" PropertyName="Text" />
                    <asp:ControlParameter ControlID="MyTextBoxCity" Name="City" PropertyName="Text" />
                    <asp:ControlParameter ControlID="MyTextBoxContact" Name="Contact" PropertyName="Text" />
                    <asp:ControlParameter ControlID="MyTextBoxPhone" Name="Phone" PropertyName="Text" />
                </SelectParameters>
            </asp:SqlDataSource>
            <asp:UpdateProgress ID="UpdateProgress1" runat="server">
                <ProgressTemplate>
                    <div style="margin-top: 20px; font-size: larger; color: Green">
                        Processing, please wait ...
                    </div>
                </ProgressTemplate>
            </asp:UpdateProgress>
        </ContentTemplate>
    </asp:UpdatePanel>

helpdevelop

<SelectParameters>                     
<asp:ControlParameter ControlID="MyTextBoxCompany"
Name="Company"
PropertyName="Text"
/>                     
<asp:ControlParameter ControlID="MyTextBoxCity"
Name="City"
PropertyName="Text"
/>                     
<asp:ControlParameter ControlID="MyTextBoxContact"
Name="Contact"
PropertyName="Text"
/>                     
<asp:ControlParameter ControlID="MyTextBoxPhone"
Name="Phone"
PropertyName="Text"
/>                  </SelectParameters> 

Hi,

have you Bind the Gridview on Page_load event check it maybe thats the problem bcoz when you are calling binding on Gridview at that time they got filled or Post your all page code aspx. with .Cs file code

 

 

 

No, I bind the gridview in the MyButtonSave_Click as shown in my code. Do you have anything else I might check?

You define SelectParameters in your SqlDataSource but the SelectCommand does not require any parameters.  I would suggest that you remove the SelectParameters and see if there is a difference.

Thank you that worked great. I changed my sql datasource to comment out the select parameters as below.

<asp:SqlDataSource ID="SqlDataSourceNwd" runat="server" ConnectionString="<%$ ConnectionStrings:NwdConnectionString %>"
                SelectCommand="SELECT [SupplierID], [CompanyName], [ContactName], [City], [Phone] FROM [Suppliers] ORDER BY [CompanyName]"
                InsertCommand="INSERT INTO Suppliers(CompanyName, ContactName, City, Phone) VALUES (@Company,@Contact,@City,@Phone)">
                <InsertParameters>
                    <asp:ControlParameter ControlID="MyTextBoxCompany" Name="Company" PropertyName="Text" />
                    <asp:ControlParameter ControlID="MyTextBoxCity" Name="City" PropertyName="Text" />
                    <asp:ControlParameter ControlID="MyTextBoxContact" Name="Contact" PropertyName="Text" />
                    <asp:ControlParameter ControlID="MyTextBoxPhone" Name="Phone" PropertyName="Text" />
                </InsertParameters>
                <%--<SelectParameters>
                    <asp:ControlParameter ControlID="MyTextBoxCompany" Name="Company" PropertyName="Text" />
                    <asp:ControlParameter ControlID="MyTextBoxCity" Name="City" PropertyName="Text" />
                    <asp:ControlParameter ControlID="MyTextBoxContact" Name="Contact" PropertyName="Text" />
                    <asp:ControlParameter ControlID="MyTextBoxPhone" Name="Phone" PropertyName="Text" />
                </SelectParameters>--%>
            </asp:SqlDataSource>

Button Save Click Event

protected void MyButtonSave_Click(object sender, EventArgs e)
        {
            
            SqlDataSourceNwd.Insert();                      
            MyTextBoxCity.Text = "";
            MyTextBoxCompany.Text = "";
            MyTextBoxContact.Text = "";
            MyTextBoxPhone.Text = "";
            GridView1.DataBind();
            

        }

[RESOLVED]updateprogress only shows when when there's a delay

Now this is strange, it seems that my last question (http://forums.asp.net/p/1845153/5154340.aspx) about udateprogress panel not showing was a little strange one…

This morning i opened the page from my iPad and the progresswindow well the spinner and a little message showed up briefly.

Now this was showing when working on local version, yet it wasnt when it was deployed… 

Perhaps this is because i implemented cashing and the data were cached already. The stranger thing was when I was doing another page with the same principle update panel inside which was formview and once updated the updateprogress was supposed to
show… well it didn’t at first. When I put the thread to sleep for about 1500ms the message did appear

Now i wonder if this is because of the delay or something is built into the control that tells it if it has data to hand and doesn’t have to wait to display it straight away and ignoring the updateprogress altogether?

I wondered if anyone else had come across this

I’m happy to share the code, in case in doing something completely wrong :)

[RESOLVED]Updateprogress doesnt run, when deployed to production server

strange thing happened, when i was testing the application the spinner loaded and so did the two animations. when i deployed to my server animations continue to work, yet the spinner isnt…  here is the link to the website in question… (http://shop.jlauda.co.uk/ViewProduct.aspx?ProductID=4)

i should ponint out that it works when run as preview in VS and it even did flash once whilst deployed online …

Hi,

Please check the asp.net version whether right in the deploy server. And you may also make a very simple demo to test that.

[RESOLVED]Getting Sys._Application error on page with AJAX

We had been using ATLAS without any issues .. UpdatePanels and UpdateProgress panels… no problems at all.

Just had a release of our web based application, and before we begin the next sprint, thought it would be a good time to upgrade to AJAX 1.0. We went through the migration document and I’ve had 2 different programmers look at the changes and everything seems
to work fine. A new AJAX web project works fine, but trying to implement AJAX in our existing app does not.

Even on a simple page, with just the
<asp:ScriptManager ID="ScriptManager1" runat="server" />
at the top, immediately after the <form> tag

and a single UpdatePanel
<asp:UpdatePanel id="FAQUpdatePanel1" runat="server">
around a single datalist control

will create a problem. The page loads and displays, and the page functions properly, however when you click on any link on the page that would take you to another page on the same site, a javascript error is thrown…

Microsoft JScript runtime error: Sys.ArgumentTypeException: Object of type ‘Sys._Application’ cannot be converted to type ‘Sys._Application’. Parameter name: instance

any ideas on why leaving the page would always throw this error? The error itself doesn’t seem to make much sense since it seems that the object is of the type it is trying to convert to

Thanks for any suggestions on how to solve this issue

Please some one reply. even im facing the same problem

I am also faced with this issue. It seems like an old issue so there’s got to be a solution.

I’ve been struggling with this for hours now. First I thought it was the ScriptControl that I createed so I changed it to an ExtenderControl and the error still appeared. So I took the extender off completely and it is still doing this.

I’ve scoured the web.config and it all looks correct so I am at a loss. I must have changed something else when I started adding the ScriptControl. 

When I find a solution I promise to post the answer.

Unless someone already knows, then it would be greatly appreciated.

Set Scriptmode of Scriptmanager to release.

It’s been three plus years, have you found the solution?

EDIT: The above post was the solution. Apparently no one marked it as the anwser. Allow me to mark it since it fixed my problem. Thank you.

 

[RESOLVED]how to use loading time datagrid

Hi,

When I bind in my datagrid takes 2-3 secund. Depends of my data.

How to use Loading time?

Regards,

You need to provide some more detail on what your doing. Do you mean binding on the server side? Have you already tried paging?

Is the 2 – 3 seconds the time it takes for the grid to load and the page to display? Or is that the time it takes since you call the grid to databind and it takes that long to bind before moving onto the rest of the page’s activities? In other words, is
that 2 -3 seconds the load time within the browser or is that actual load time for the operation on the server-side?

Can you clarify what you mean by how to use loading time? Are you referring to an Ajax Loading icon to display while the grid is loading?

Also, have you optimized your query and database to minimize time for data access? If you don’t have the proper indices created the performance of join queries especially will be slower.

Can you clarify what you mean by how to use loading time? Are you referring to an Ajax Loading icon to display while the grid is loading?

Yes I need Loading icon.

Please help

If your using the UpdatePanel to load the contents, you can try the
UpdateProgress
control.

Here’s another method using jQuery - How to create a Loading Animation / Spinner using jQuery

[RESOLVED]how to avoid page refresh on selecting the dropdownlist

how to avoid page refresh on selecting the dropdownlist.

iam using update panel for ddlcity, when i select the city the page is getting refreshed.. even i have update panel for it.

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

                                    <contenttemplate>
<asp:DropDownList id="ddlCity" tabIndex=15 runat="server" CssClass="DropDownStyle" AppendDataBoundItems="True" AutoPostBack="True" DataTextField="Name" DataValueField="CityId" OnSelectedIndexChanged="ddlCity_SelectedIndexChanged"></asp:DropDownList>*<BR /><BR
/><asp:DropDownList id="ddlLocation" tabIndex=16 runat="server" CssClass="DropDownStyle" AppendDataBoundItems="True"  DataTextField="Name" DataValueField="LocationId"><asp:ListItem Value="0">Select</asp:ListItem>
</asp:DropDownList>*
<asp:UpdateProgress id="UpdateProgress2" runat="server" AssociatedUpdatePanelID="UpdatePanel1" DisplayAfter="50">
<ProgressTemplate>
  <img src="Images/preloader1.gif" style="width: 27px; height: 24px"/>                                             
</ProgressTemplate>
</asp:UpdateProgress>
</contenttemplate>
                                </asp:UpdatePanel>

on selectedindexchange the whole page is getting refreshed.

How to avoid it.

Thanks in advance

Is there scriptmanager . If not, add it

Change AutoPostBack="True" to AutoPostBack="False" in <asp:DropDownList>

put scriptManager on page

<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:DropDownList ID="DropDownList1" runat="server"
onselectedindexchanged="DropDownList1_SelectedIndexChanged">
</asp:DropDownList>
 </ContentTemplate>
</asp:UpdatePanel>

if i change to false autopostback while selecting ddl it will not change Output ??

ValidatorCalloutExtender and Modal popup

Hi guys

Well this is doing my nut in.

I have a Modal popup that has a text box (for time) and 2 buttons (OK, Cancel)

I have some validation on the text box but when my ValidatorCalloutExtender pops it displays behind the popup window. 

I have tried the following

1) Chaning the z-axis;

modalPopupBehavior._backgroundElement.style.zIndex = 20000;
modalPopupBehavior._foregroundElement.style.zIndex = 30000;

2) Putting style=’position: relative;’ in a panel

I’d pull my hair out if there was any left

Hi,

Please descirbe more details, and post some related code.

Panel is called from

<asp:Label ID="lblinsertpopup" runat="server"></asp:Label>
<cc1:ModalPopupExtender ID="lateModalAbs" runat="server" TargetControlID="lblinsertpopup"
                                PopupControlID="pnlMarkLate" BackgroundCssClass="modalBackground" CancelControlID="btnLateCancel"
                                DynamicServicePath="" Enabled="True">
</cc1:ModalPopupExtender>

This is the panal

<asp:Panel ID="pnlMarkLate" CssClass="panelPopUp" runat="server" Width="200px" Height="140px" style='position: relative;' >
        <div id="Div9" class="layer" runat="server">
            <span id="Span2" class="msgheader" style="margin-top: 10px">Confirm?</span><hr />
            <br />
            <asp:UpdatePanel ID="UpdatePanel5" runat="server">
                <ContentTemplate>

                        <span id="lateMsg" class="msg" runat="server"></span>
                        <br />
                        <div style="display: inline; padding-left: 30px" id="LateTime" style="position:relative">
                            <asp:Label ID="lblTime" runat="server" Text='Late Time' Width="70px"></asp:Label>
                            <asp:TextBox ID="txtTime" runat="server" CssClass="Gridview_Textbox"
                                Width="120px"></asp:TextBox>

                            <asp:RequiredFieldValidator ID="reqTime" runat="server" ErrorMessage="*"
                                Text="*" ControlToValidate="txtTime" Width="0"  >
                            </asp:RequiredFieldValidator>
                            <cc1:ValidatorCalloutExtender ID="reqTimeCallout" runat="server"
                                Enabled="True" TargetControlID="reqTime" PopupPosition="BottomLeft">
                            </cc1:ValidatorCalloutExtender>
                            
                            <asp:RegularExpressionValidator ID="regValTime" runat="server" ControlToValidate="txtTime"
                                ErrorMessage="Invalid Time Format" Text="*" Width="0"
                                ValidationExpression="^(([0-2][0-3]|[0-1][0-9])(:)[0-5][0-9](:)[0-5][0-9])$">
                            </asp:RegularExpressionValidator>
                            <cc1:ValidatorCalloutExtender ID="regValTime_ValidatorCalloutExtender" runat="server"
                                Enabled="True" TargetControlID="regValTime">
                            </cc1:ValidatorCalloutExtender>
                        </div>
                    <asp:UpdateProgress ID="UpdateProgress2" runat="server" AssociatedUpdatePanelID="UpdatePanel3"
                        DisplayAfter="100">
                        <ProgressTemplate>
                            <img id="gif" class="gif" src="Images/loader.gif" alt="Processing" /><span id="progressTitle"
                                class="progressTitle">Processing Requested Action. Please Wait...</span>
                        </ProgressTemplate>
                    </asp:UpdateProgress>
                    <div style="margin-left: 5%; margin-top: 25%; width: 90%">
                        <asp:Button ID="btnLateOk" runat="server" Text="OK" OnClick="btnLateOk_Click" CausesValidation="true"/>
                        <asp:Button ID="btnLateCancel" runat="server" Text="Cancel" />
                    </div>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
    </asp:Panel>

If I add "" as the txtTime or an invalid date then the error pops up but it is behind the modal popup.

Here is what the error looks like.

http://www.flickr.com/photos/76052669@N06/6828890349/in/photostream

Hi,

Could you make a simple demo page? So I may reproduct your scenario on my side.

Did you have any luck with this?

As I have also a problem with the validatorcallout extender displaying below textboxes and buttons

thanks

Glen

[RESOLVED]Ajax UpdateProgress on page load

Hi Guys,

I have an query how to use Ajax updateprogress bar when page is loaded for first time, Below is user control which takes time to load the page is there any when we load the page it display the progress bar.

<uc:ClickableMap ID="map" runat="server" AllowSelectRegion="True" AllowSelectNation="True" NationAutoPostBack="True"  />

Thanks in Advance

Shabbir