473,722 Members | 2,459 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Deleting files on web server via browser - a specific problem

Hello,

this is a problem I came upon while building a site based on MCMS 2002 but
it's not strictly MCMS-oriented:
I have a page that displays a certain content in presentation mode but when
an editor clicks "Switch To Edit Site" in MCMS console on the page, the page
displays a different content, an interface that editor use for upload and
deleting files on the web server. There are no problems with the upload but
there is a problem with file deleting.

I built a DataGrid control that displays the file list and has a column with
checkboxes. Editor then marks the files for deletion with clicks on
checkboxes, clicks on a button and File.Delete() should do the job. Except
for the one thing: even the first rendering of the page (after clicking
"Switch To Edit Site") is a postback. Therefore, I cannot put DataGrid
binding event inside "If Not IsPostBack" because in that case nothing gets
displayed. If I put the binding event outside "If Not IsPostBack" clause,
then the DataGrid gets re-created each time the page is loaded and checked
checkboxes are annulated (emptied) and the informations about what boxes are
checked never go through to Button OnClick event. Therefore, there's no
program error but the effect is as if no checkboxes were being checked and
no files are deleted.

What to do?
Maybe some viewstate could preserve the informations?

Thank you,
Hrvoje
Nov 18 '05 #1
0 1408

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

Similar topics

1
10209
by: phpninja | last post by:
Greetings, I was wondering if it is possible to delete someone's temporary internet files with javascript? Basically I'm am using a PDF module called HTML_ToPDF. The pdf module takes some output based on queries and creates a pdf, and it works great. My problem is, if i make a change to the data in the database, then rerun that exact pdf routine (done by clicking a form button that reposts the data), the pdf that is refreshed in the...
8
2403
by: John K. | last post by:
Hi I was wondering if it's possible to use the WebRequest class to access a file on windows shared folder with authentication? If yes, what would the syntax be? I've tried to look this up in the references available but to no avail Also, is it safer (better practise) in an LAN environment to use HTTP requests to access shared files (via ASP.NET) rather than UNC file shares TIA Regards John
6
4559
by: Martin Bischoff | last post by:
Hi, I'm creating temporary directories in my web app (e.g. ~/data/temp/temp123) to allow users to upload files. When I later delete these directories (from the code behind), the application restarts and all active sessions are terminated. This error is also described in detail here:...
4
1804
by: osh.sean | last post by:
I'm having a problem and I can't find anything about this anywhere else out there. I'm working on a solution that allows the end user to create folders / upload files to the web server. Some pertinent information is being stored in a session variable. If a user deletes the folder from the application, it clears any session variables as if deleting a folder made a call to Session.Abandon(). This also occurs if I delete the folder through...
3
1932
by: Smokey Grindle | last post by:
Is there any way in asp.net 2.0 to say if this specific browser views my site give them a CSS sheet that is specific for that browser? like IE6 get its own, FF get its own, IE7 gets the one FF uses... something like that... this is of course... for browser compatability btw I am using ASP.NET 2.0's theme system for all my CSS right now...
3
2492
by: Michael | last post by:
Hi, is there a way for me to delete an image file that gets loaded into the cache? I want to prevent people from saving it. I already have the browser problem fixed. My site is written using C#, but I have not found a way to delete the file from the cache. I have deleted the cookie. Thanks, Michael
7
1851
by: John Morgan | last post by:
I have done a fair amount of programming of ASP.NET 1.1 without poroblem I am now involved in my first project with ASP.NET 2.0 and I am having difficulties with understanding the compilation or 'build' arrangement or perhaps I am overlooking something else. I am developing a project using the IIS local host configuration. My actual problem is :
1
1440
by: =?Utf-8?B?TWFyZWs=?= | last post by:
Hi Sorry for the newbie question, but is it possible to stop the publish operation from Visual Studio 2005 deleting files in a specific folder on the web server? I have an uploads folder on the server where users upload files and this will get wiped out every time I publish a new version of my web site. If not, what is the best way of publishing an ASP.NET 2 web site not using the VS2005 publish option. Is it using a good old FTP...
221
367575
Atli
by: Atli | last post by:
You may be wondering why you would want to put your files “into” the database, rather than just onto the file-system. Well, most of the time, you wouldn’t. In situations where your PHP application needs to store entire files, the preferred method is to save the file onto the server’s file-system, and store the physical location of the file in your database. This is generally considered to be the easiest and fastest way to store files. ...
0
8867
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8740
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9386
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9239
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9158
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9090
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6685
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5996
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
2606
muto222
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.