.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

Update progress within a datalist

Posted By:      Posted Date: September 01, 2010    Points: 0   Category :ASP.Net
I have an update panel and then a datalist and then a nested datalist...it looks like this:   <update panel>      <datalist1>            <datalist2>            </datalist2>      </datalist> </updatepanel>   Problem is, within datalist 2, I have some linkbutton's and I'd like to show a progress "gif" (update progress) when the button is clicked.  I can create the update progress, but when you click the button, you get the "gif" shown for every item in the nested datalist.  Anyone know how I can identify where I am in the datalist (which linkbutton) and only show the progress "gif" for that button? Thanks in advance for any help! Mike    

View Complete Post

More Related Resource Links

Problem with list controls and update progress template



I have an update panel that surrounds a wizard control which I use in conjunction with a update progress control. Now my update progress control works perfectly, with my animated gif and div tag that lays over my wizard control when the user goes from step to step. However, there is a problem that I am struggling to solve. A number of my steps use controls like list boxes, and when the update progress control fires, the list control is not laying underneath my div an animated gif no matter how high a make my css z-index on the div.

Does anyone have a way of solving this?


AJAX update panel and update progress controls

I have writtena Crystal reports web application, that prompts ths user for parameters and then apply them and exports the report to a folder as .rpt and then display the report. I prompt the parameters on one screen and then display the report on another page. I have the AJAX update panel and update progress controls in the parameter page. When the user enters the parameters and click on ok, I export the report and then loads the report to a session report document and transfer the user to the second page where the report is displayed. I use the following code to do transfer to the seconds page. I have excluded the report load and parameter assign code here.rpt.ExportToDisk(ExportFormatType.CrystalReport, "c:\reports\testrep.rpt") Session("rpt") = New ReportDocument Session("rpt").load("c:\reports\testrep.rpt") Response.Redirect("show.aspx") In the second page I have the following: rptViewer.reportsource = Session("rpt") My problem is this works one time and then stops working the second. What I found out was it comes to the statement: Response.Redirect("show.aspx") But it does not even load the show.aspx page. It stays on the parameter page. There are no errors displayed. I could not see any errors when I debug the application also. And out of the blue it works

Use update progress control to change image control imageurl

UPDATE: Apologies for the previous formatting error - hopefully the post is now more readable... Hi I have a button with an image control next to it. Before the button is clicked, the image control "ConfirmedStatusImage" shows a "cancel.png" image. When the button has been clicked (and some other code successfully executed), then I change the imageurl for the "theConfirmedStatusImage" to show a "ok.png" image. Quite a bit of time can often pass between clicking the button and the associated code executing, so I have an ajax update progress control that shows a "bluespinner.gif" image while the page is updating after the button click. At the moment, the update progress updating image appears next to the "ConfirmedStatusImage" control. However, I would like to change things so that when the update progress starts, the imageurl of "ConfirmedStatusImage" changes from "cancel.png" to the update progress image (i.e., the "bluespinner.gif"). Then, when the update is complete, then the image should change to the "ok.png" image. My question is: how can I achieve this? As far as I can tell, the update progress control does not have any events that I can hook into. Also, placing the "ConfirmedStatusImage" inside the ProgressTemplate would not work either, as this only displays

Update progress animation

I have an update progress control that I use to overlay an updatepanel. It has an animated gif that is displayed. The animated gif doesn't not work though unless I add system.threading.thread.sleep([seconds]) . Obviously I don't want to do that. Is there something I need to do to get the gif to work or is it just the nature of the beast? Here is the code for the update progress. It is triggered by an update panel that has a control that updates another update panel. <asp:UpdateProgress id="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel2" DisplayAfter="1"> <progresstemplate> <DIV class="LoadingOverlay"></DIV> <DIV class="LoadingMessage">Loading...<BR /><IMG src="../../../helpdesk/img/progress.gif" /> </DIV> </progresstemplate> </asp:UpdateProgress>  

Unable to write anything when Update Progress Close

Hi,Acctually I have done lots of coding on Page_Load of a page which comming from other page. So for that i tried to use ModalPopupExtender. but problem is that its working fine for button but how can i use it for Page_Load.My scenario is:protected void Page_Load(object sender, EventArgs e)    {        PleaseWaitPopup.Show();        //Lots of code and queries;       PleaseWaitPopup.Close();          }  After too much googling i found one solution. which works but still problem is after closing ModalPopupExtender I am unable to write anything on page even i have removed StyleSheet:Current Code is as Follow:<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %><%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %><!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">    <title></title> <link href="StyleSheet.css" rel="styles

Update Item in datalist wont work

Hi All,   I have a datalist which is filled by a LinqToSQL query. I have put a edititemtemplate in it, whith a update button, Everything works fine, but when i ask the value of the textbox in update mode it still has the old value and not the new value typed from the textbox, anyone got a clue?   Here's the code:  <EditItemTemplate> <table> <tr> <td><asp:Label ID="lblOmschTekst" runat="server" Text='<%#eval("MediaOmschrijving") %>'></asp:Label></td> <td><asp:textbox ID="tbPrijs" runat="server" Text='<%#eval("Prijs") %>'></asp:textbox></td> <td><asp:LinkButton ID="cancel" runat="server" Text="Annuleren" CommandName="cancel"></asp:LinkButton></td> <td><asp:LinkButton ID="lbOpslaan" runat="server" Text="Bijwerken" CommandName="update"></asp:LinkButton></td> </tr> </table> </EditItemTemplate>   Protected dlPrijzen.EditItemIndex = -1 bindall()  Sub dlPrijzen_CancelCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataListCommandEv

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

Update Progress Only displays once since upgrading to November release (CTP)


Hi All.

  I just upgraded (yesterday) to the November release. I uninstalled previous versions of extensions and ctp and installed the latest. After working through most minor issues that came up I still have yet to resolve this one. I have an update progress that worked fine using the previous ctp (I think it was the July version) but doesn't work so well since the upgrade. 

Problem Description: 

I get to my page, invoke an asynch postback, the updateprogress gets displayed and the update panel is updated with the correct information... Great. I then do another asynch postback (the same exact way) and although the updatepanel is updated with the correct information, the updateprogress fails to display... BAD. This did work fine in the previous version, but hasn't since the upgrade. I have no clue why. 

 Why is the updateprogress only displaying the very first time it's invoked but not displaying in all subsequent invokations? As I said, this worked fine in the previous (July) CTP.

I deleted the dll references in my bin and replaced them, rebooted, uninstalled/reinstalled but still no luck. The latest release notes doesn't seem to have any mention other than this control being moved to the ajax core package. If anyone could help I would greatly appreciate it.

Thanks in advance for any help that c

On datalist update, error object not set.....



I get the error:

Object reference not set to an instance of an object

when i perform an update on my datalist.....??? thanks if you can help!

protected void DataList1_EditCommand(object source, DataListCommandEventArgs e)
        DataList1.EditItemIndex = e.Item.ItemIndex;

    protected void DataList1_UpdateCommand(object source, DataListCommandEventArgs e)


        String number = DataList1.DataKeys[e.Item.ItemIndex].ToString();

      = number;

        String UserId = Membership.GetUser().ProviderUserKey.ToString();

        SqlDataSource1.UpdateParameters["[User Id]"].DefaultVal

can't get my datalist to update



I cant get my datalist to update. There are no errors, but the data just stays the same when i click update.

Also, can anyone help me with code to make the delete button work too? Thanks!

ASP.Net Gridview Edit Update Cancel Commands

In ASP.Net 2.0, GridView Control also provides the functionality to edit and update the data retrieved from the database using CommandField template. You can cancel the action using Cancel Command of the CommandField. GridView consists of events that can be used to perform the actions like edit, update and cancel upon the Data items displayed in the ASP.Net GridView Data Control.

How to format and update GridView and DataGrid rows using JQuery

The behavior described in this question is as expected. When you set text of a cell in grid, it directly affects HTML that is going to be rendered. When you set text value of a cell, it means that you are setting innerText of the cell. The column that GridView creates for command fields (Edit, Delete and Select) are a (anchor) or button elements. So you can see what will happen if you set text value in that cell. It will wipe out those link or button controls and replace them with simple text string.

Update Vs SystemUpdate

Many of you might noticed that share point ListItem has Update() method as well as SystemUpdate().

What is the difference between these two methods and why MOSS has two different APIs for updating an ListItem

SqlCommand.ExecuteNonQuery() returns -1 when doing Insert / Update / Delete

Sometimes you end up with a return value of -1 when using the SqlClient.SqlCommand.ExecuteNonQuery method.

Why is that?

Well, the ExecuteNonQuery method is there for statements for changing data, ie. DELETE / UPDATE /INSERT, and the returned value are the number of rows affected by that statement.

When checking the documentation we can see that there are some conditions that return -1.

For UPDATE, INSERT, and DELETE statements, the return value is the number of rows affected by the command.

When a trigger exists on a table being inserted or updated, the return value includes the number of rows affected by both the insert or update operation and the number of

rows affected by the trigger or triggers. For all other types of statements, the return value is -1. If a rollback occurs, the return value is also -1.

>>>How to update multiple rows of gidview by one click



I want to add multiple rows of a gridview if the data for multiple fields are same.

Idea for this is that a user may search a record with some parameter e.g. Sector, plot.

For example 15 records being displayed in gridview.

There should be checkbox before every row and if user wants to update Plot and Flat No that is same for 10 rows out of 15 so he will check the rows and update.

For this a dialog box should appear asking for the parameter i.e. Plot and Flat or something else next time may be it will be City or country. Moreover, there is already an Edit button to update records, when user click it another page open for the record to be updated and whatever he wants to update, it updates.

Hope everone understand the scenario.

I don't want to disturb the already provided Edit functionality and want to provide same record to be updated.

Any idea in this regard would be appreciated.

datalist image slide show problem


hi friends

i am binding  images dynamically(back end)for a datalist .iam applying a slideshow for it .I am getting a problem to apply slideshow for dyanmically binded images.If the define in a div statically it working perfectly

for example pls go through my code below:

<script type="text/javascript">
$(document).ready(function() {
        fx: 'scrollLeft' // choose your transition type, ex: fade, scrollUp, shuffle, etc...

<div class="slideshow">
        <img src="images/30_dummy.jpg" width="200" height="200" />
        <img src="images/aquarius.gif" width="200" height="200" />
        <img src="images/star.gif" width="200" height="200" />
        <img src="images/the-proud-indian-flag-1.jpg" width="200" height="200" />

I above code works perfectly and the slide show e

Visual Studio closes itself by opening aspx-Page designer after Windows Update


Hey Guys,

I've a problem with my Visual Studio.

On the 13th of August 2010 i installed a Windows update on my vista sp2 pc. For this date my Visual Studio 2008 sp 1 always has closed itself by opening an aspx-page in designer view. There is no error message just closing the window. I restored a backup of my windows from the time before updating it and it helped, i could open aspx pages in the design view till the update has been installed again automatically after rebooting the pc. I can't disable windows updates, cause it's my pc at work and safety is very important. I hope you could help me out of this disaster.



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