473,473 Members | 1,894 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Problem with updating a datagrid

Hi,
I have a Page1.aspx with a Datagrid which has a link button which spawns a
download of a file. one of the columns shows how man times the files were
downloaded.

The Datagrid is bound to a datasource.

Once the download is done the Datagrid is asked to Databind itself once more
this part does not work. when this code is executed the download is not yet
over and the downloading dialog is still on. please let me know how i can
solve this problem.

I even tried to do a Redirect to the same page. it doesnt work
Nov 18 '05 #1
1 1126
Hi,

I can suggest you the following:

Add a Literal control to the page. In the Page_Load handler set its Text
property to be an empty string - on every Page_Load, not only when
IsPostBack is false.

Separate the download in another aspx page, that does only this - let's call
it download.aspx.

In the LinkButton.Click handler rebind the DataGrid and set the Text
property of the literal to something like this:

<iframe frameborder="no" src="download.aspx"
style="position:absolute;left:-1;top:-1;width:1px;height:1px;">
</iframe>

Additionally, you can check in download.aspx whether the referer is the page
with the DataGrid.

Hope this helps
Martin
"Dharmanet" <Dh*******@discussions.microsoft.com> wrote in message
news:33**********************************@microsof t.com...
Hi,
I have a Page1.aspx with a Datagrid which has a link button which spawns a
download of a file. one of the columns shows how man times the files were
downloaded.

The Datagrid is bound to a datasource.

Once the download is done the Datagrid is asked to Databind itself once more this part does not work. when this code is executed the download is not yet over and the downloading dialog is still on. please let me know how i can
solve this problem.

I even tried to do a Redirect to the same page. it doesnt work

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: cwbp17 | last post by:
Have two tables that have a FK relationship on ID column. Have one datagrid that displays all of the columns of both tables. What's the best approach on updating a row from the datagrid back to...
5
by: junglist | last post by:
Hi guys, I've been trying to implement an editable datagrid and i have been succesful up to the point where i can update my datagrid row by row. However what used to happen was that once i updated...
1
by: marty.overdear | last post by:
>NET 2003, vb code behind. I am having a problem with the look of a page with a datagrid. I have the grid populated, and it can be a couple of hundred rows long. If the user is down toward the...
14
by: Lars Netzel | last post by:
A little background: I use three Datagrids that are in a child parent relation. I Use Negative Autoincrement on the the DataTables and that's workning nice. My problem is when I Update these...
8
by: Scott Meddows | last post by:
I have a datagrid control that I've inherited from the base datagrid control (Source below). I am applying a datatable style onto the datatable that I assign as my datasource. All of my column...
0
by: Becker | last post by:
I have a datatable that I use to display running processes. These running processes are spawned as different threads. I use the readerwriterlock class to ensure that when I write to the datatable,...
0
by: Mike P | last post by:
I'm updating a datagrid which works fine, but after updating the datagrid does not return to 'view' status, remaining in 'edit' status. Has anybody else had this problem? Thanks, Mike
1
by: Krishna | last post by:
Hi, all I have developed one form which will allow user to enter data through datagrid, that datagrid is bound with comboboxes, textboxes. in thise two textboxes are readonly property is true....
3
by: jlotmar | last post by:
I am currently experiencing a problem whereby browser caching seems to be causing my page to be invalid. I am using a standard DataGrid WebControl which is bound to a DataView object. I use a...
2
by: Carl Heller | last post by:
Working in VS2003, .Net 1.1 I'm working on a project where I compare data between two databases. This is a lengthy process, and very data intensive, so I decided to create a class, and thread...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.