Web Forms :: Give Unique Names For Uploaded Files In Folder?
Dec 20, 2012I'd like give unique name for uploaded files in a folder.
I know we can a uniqueidentifier to file name but I think it isn't a good way.
I'd like give unique name for uploaded files in a folder.
I know we can a uniqueidentifier to file name but I think it isn't a good way.
How can i upload a image in specific folder of server using jquery .... i have many folder under image directory and i want to choose the folder at the time of uploading.
View 1 RepliesI have a site that allow the user to request a secret report in a pdf format. My idea is to put the generated pdf files in a public folder with disabled directory browsing. Each file name consists of 128 characters that are uniquely and cryptographically generated. The legitimate user will be given the link of his/her own report.
View 2 RepliesI have a question about URLS, I am creating a little app and using GUIDs from the primary key and identity and LINQ2SQL - So wondering how I would go about creating nice URLS? I don't want the guid in the URL which is what it tries to do by default.And I can't use a Name field as there may be duplicate names? I'm considering just creating another auto incrementing field in the table just for the URLs? Just wondering how everyone else handles this
View 3 RepliesI have a user control, which is added dynamically, but I have noticed that when it is on the page and viewing the source that none of the controls within have been given unique ids. How do I give my user control and the controls within unique ids in order that I can use them in my events?
View 5 RepliesI have the following code i found online and it works fine as long as the sheet names are simple names it seems..
If i have a excel file with a sheet name of (sheet1) the code works.. but if i have a file with a sheet name like (FileName2011_03_03_15_01_43) it fails and causes the rest of my code not work..
[Code]....
I've got a gridview with a few textboxes in each row which I want to insert into a database, after a user clicks a submit button (thats outside of the gridview)
This is my code for the gridview
[Code]....
And this is my code for the button
[Code]....
But when I click the button it gives me this error
"Multiple controls with the same ID 'Label12' were found. FindControl requires that controls have unique IDs."
How do I give the controls unique IDs if they are in a gridview and the rows are database driven?
Am building a Form for out intranet that runs on ASP.NET and C#, it is to be a survey from a SQL database. I have the connections setup can pull informations/Questions from the database. I am having a problem with setting up radio buttons within a datalist, ive never done this and i know they require unque names.
It is to be 4 radio buttons per question where only one can be select, i know how to group just not via a datalist with unique names
I need to Keep track of folder names as linksactually this is not site navigation.we r displaying the folders/subdirectory names as links on the webpage.the task is -(a) on pageload I need to display the main folder - this is fixed(b) the subfolders and files r displayed in a grid.if I click on a folder link the breadcrumb need to be updated.(c) if I click on a link in the breadcrumb the grid should be updated as well as the breadcrumb has to be updated.need breadcrumb examples suitable to my above requirement.
View 1 RepliesI'm with C# ASP.net , Please help me ... how to delete folder images in an application.
View 5 RepliesI'm populating a generic list from an excel file that contains names of pdf files. Now I want to take each item in the list and create a file from it. Here's what I have so far:
[Code]....
So now, the list called lines contains names of 900 pdf files. How would I take those names out of the list and create files from them?
hw can i give write permission to folder for changing the image at runtime.i have tried so many times but still confused and free hand. can some one pls give me the solution in details.
View 4 RepliesI have a task to upload multiple images to server path of the application folder . I have used the File Upload control in order to Upload the Images to server path but some images of about 778 kb are not supposed to be uploaded correctly. And while displaying the Images I am using Datalist control.
While I have tried to upload from Application in my system all files got uploaded but while acessing the link some files are not getting uploaded.
I create a new class FileUpload for my web page. In onload method of page, i create a new object of that class and after file uploaded, i fill some information of file to that object(name, size, extention,type). I create a method in class to delete that file. But When i use it, the error "The process cannot access the file 'D: emp25.jpg' because it is being used by another process." is appear. I thinks the object is using the file uploaded and i can't delete file.What's the problem and how can i solve it? I need to delete file.
View 5 RepliesIn my website I have upload control that I use to upload files and all the links of uploaded files saved to sql database on the server of hosting company.then I have a grid view filled from database with the links of the uploaded files, how to delete some files that I uploaded to the server by code from the gridview
View 2 RepliesI have deployed my website in ftp server.now i need to upload image to my database and place images in upload folder. while uploading images i'm getting the below error.
Access to the path 'd:hostingmystieproductImagesvaara.jpg' is denied.
Description:
An unhandled exception occurred during the execution of the current web request. review the stack trace for more information about the error and where it originated in the code.
Exception Details:
System.UnauthorizedAccessException: Access to the path 'd:hostingmysiteproductImagesvaara.jpg' is denied.
ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.
To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.
I'm building an app that allows multiple file upload (trying to use the script from here: [URL] This upload will be a pop up from an html page. My question is how to pass the file name(s) to the parent page? I want to submit those names as hidden inputs from the html page.
View 8 RepliesShowing thumbnail of uploaded media files (pictures, videos etc..) I tried to extract thumbnails from thumbnails.db using Microsoft Shell Controls And Automation (Interop.Shell32.dll). I followed [URL] PROBLEM: I tried it in WPF application and it worked. Then i used the same code in ASP.NET WebForms website and it works for pictures but doest not work for videos. I also tried the same in clean console application but it doesn't work as well. But in wpf it works! the same assembly. Assembly is from Window 7, but neither WinXp's Interop.Shell32.dll works for videos in websites. It throws an exception NotImplementedException whenn I call IExtractImage.Extract(ref IntPtr phBmpThumbnail); Can you explain this behaviour? [URL]
View 1 Repliesi am using telerik editor for uploading images which are getting stored in images folder.now i want to fetch all images and paths from that image folder and save only image name and path in to seperate database table.
View 1 Replieshow to get the names of excel files opened on the Client machine and populate it in a ListBox? If somebody did it please reply to this or give some pointers / web site links to me, so that i will read and try to use for building my code.
View 1 RepliesI have a page that loads a two different files that the user uploaded during page_load. The code is an example I used from the aspsnippets site. The files are stored in a server folder while the location is saved in the database. The code below gets all files in the folder and binds them to a gridview.
Dim filePaths() As String = Directory.GetFiles(Server.MapPath("~/Uploads/2012/emp/"))
Dim files As List(Of ListItem) = New List(Of ListItem)
For Each filePath2 As String In filePaths
files.Add(New ListItem(Path.GetFileName(filePath), filePath))
Next
gvEmp.DataSource = files
gvEmp.DataBind()
What I want to do is to get only one file per user as the fileID along with the location is saved in for every user. I ran a query to get the fileLocation and pass that location stored in the database instead of the current server path but I can't figure out how I would do it.
How can I give my ASP.net website permission to see this folder on the server? C:PVSWin. The website is actually running on a virtual path D:WebSitesAdco.We are running IIS ver 6.The website uses a table from Pervasive to locate Vendors. The SqlDataSource works from the VS2008 IDE which is running on the server, but if a user logs into the website remotely they get this error:ERROR [IM003] Specified driver could not be loaded due to system error 1114 (Pervasive ODBC Client Interface). This error generally indicates that the path to the DB components is not found, or is not available to the calling program, so I guess that the website does not have permissions.
View 5 RepliesI have a folder with 200+ pictures. I want to get the names of each of the pictures to the database. would it be easier to import and export the images into the database (I want my webpage to be able to show the images once they are in the database)?
View 12 RepliesI've a classified ads system on ASP.NET/c#/MS SQL, and I'm trying to figure out where to store the images that people upload when placing an ad. The ad itself is being stored in a SQL server database.
The images are now being stored in a subfolder of my webapp. It seems to work fine, however I only recently discovered a big problem. Everytime a user deletes an ad, the attached images are to be deleted as well including the folder they reside in. This leads to a restart of the asp.net application. I searched internet and found that restarting the web-app is actually intended behaviour when a subfolder is being deleted.
I can remove these images including the folders they are stored in?
I can acces them using a URL (the images need to be shown in the webpages) Without getting the web-app being restarted?
I am trying to put together a page where files uploaded by a specific users would be listed in a bulletedlist and I am stuck. Here's the rundown:
Users login, they upload files which are saved to disk in the user's own directory. All the file's information, including the path, is stored in a SQL database.
The user has also its own page, where there is a bulletedlist (set as a hyperlink) that gets the filename from the SQL. However, the path to the file is incomplete.
The file is saved to the site's directory structure: C:WebsitesSiteUploadsUserFile.pdf. However, the hyperlink shows[URL]
Can anyone point me to the right direction? Below is a snippet of the upload method and the retrieval to build the bulletedlist.
[Code]....
[Code]....