.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Kaviya Balasubramanian
Sgraph Infotech
Imran Ghani
Post New Web Links

Get local drive path using javascript.

Posted By:      Posted Date: October 26, 2010    Points: 0   Category :ASP.Net
 

HI all,

I am downloading a file from server and want to get its path directly in my javascript code.

How can i get the path where the file is downloaded??

Like instead of saving it first at static location like C drive or any other location, I want to get its direct path.

Urgent plz

Reply asap

Thanks

Rajnish kaur.












View Complete Post


More Related Resource Links

uploading a file with wcf works fine with local drive, but only 4096 kb uploaded when I use unc stor

  
Hello I'm writing a wcf service for uploading files to a server. It works fine when I try to upload the file to the servers local c:/ drive, but if I use a UNC path only 4096 kb is stored. It actually looks like part of the file is lost while storing it with writeStream.Write(buffer, 0, bytesRead);, because I wrote the bytesread to an sql table and the number of elements are always the same no matter how many times I upload the file, but the stored file is always different sizes, ranging from 1996 kb to 4092 kb.   I'm using IIS 7.5 on a windows 7 enterprise machine. My IIS is using a administrator account for the application pool, so it should not be a problem with permissions.   My wcf method uses Stream to upload the file in chunks    public void UploadFile(RemoteFileInfo request)         { //some methods to set the filepath                                   int chunkSize = 4096;                                 byte[] buffer = new byte[chunkSize];                                 Stream writeStream = new FileStream(filePath, FileMode.CreateNew, FileAccess.Write);  &

Getting UNC Path from Mapped drive

  
Hi All,

I am developing a ASP.NET application using VB.NET in 2.0 framework.

I need help in finding a solution to get UNC path from a mapped drive path.

Example: 

1.)  \\DaytonServer  network server is mapped to a drive(Z:) 

2.)  if the user selects a file from a mapped drive (Z:)   then its appearing as Z:\FileName.txt  .  Once I retrieve this, I would like to get the UNC path for the mapped drive ( eg:  \\DaytonServer\FileName.txt   )   and store it in the database.  


Please help, I need to implement this immediately.

How to know if a local drive is an USB drive

  

Hello, I must search for all drives that are an USB drive, my code was looking for removable devices and works without problem. But now I need also to detect USB that are indentified as LocalDrive, I can't find anywhere how to obtain this information.

I have tried with WMI searching for Win32_DiskDrive where InterfaceType = 'USB' with no result.

Can someone show me some code or point me in the right direction?

Thank you in advance

Move folder from file share to local C:/ drive on same box

  

Hello,

I need to copy a folder from a file share to my local C: drive. Is there an easy way to do this in SSIS, or do I have to write a DOS batch file and execute it from SSIS.

Any help would be appreciated

Dave


Dave SQL Developer

copy a folder and subfolders + files from remote location to local drive

  

Hi,

i am making a windows application( C#.Net) in which there is a folder placed at remote location( on other computer). this folder contains files + subfolders inside it. i need to copy all the files and subfolders present inside this main folder to my local drive. How can i do this. 

Thanks in advance


Save a file to local drive

  

I tried to save a file to local drive using the code below but got "access denied" error. How to save file to local drive?
 Dim file As String = "c:\myfile"
 Dim stream As New System.IO.FileStream(file, System.IO.FileMode.Create)

I tried to save a file to local drive using the code below but got "access denied" error. How to save file to local drive?

 Dim file As String = "c:\myfile"

 Dim stream As New System.IO.FileStream(file, System.IO.FileMode.Create)


Move SharePoint Document Library Files to Local Drive

  
How can I move files uploaded into a MOSS 2007 Document library to a local drive? I need to automate this as a job, not a one-time process. Can I use SSIS for it? File Systems Task works fine so long as I create a map drive to the portal. I have tried both the http address and the UNC path to the portal.

Get file path in javascript

  

Hello friends,

          In one application I want to pass image file path to image control through JavaScript. Its working fine by manually passing file path to that control. But it's not possible to give manual path every time. So is there any property in JavaScript so that I can give only file name and path should get generated. (i.e. like server.mappath (filename) in asp.net ).Or is  there any other solution?

      


   


save images on database or local drive

  

hello , I'll be having a website to upload images and am creating the database now , I'll have one original image and about 6 to 7 thumbnails , I just want it to be in the best possible way so I thought I'll save the original image in database and I'll be saving it's thumbnails on hard drive as they're going to be accessed alot so I dont want the httphandlers to be bringing like 20 images from the database while they can be brought easily from the harddrive...can someone guide me?? I read advantages and disadvantages of both but I really need guidance. 


Store a certificate in a local path

  

hi.. I have Installed a self signed certificate for a device in the device itself. When i tried to access the device using HTTPs Request , that installed a certificate in my local machine.. I know that has installed in Personal certificates location or in the trusted root authorities location. But I need the Exact physical path (disk location) of the certificate what i have installed. Is there a  way to find out the answer?

 


E.Susindar

Using Microsoft.SqlServer.Management.Smo to backup from remote SQL Server to local drive.

  

I'm trying to use the Microsoft.SqlServer.Management.Smo class to connect to a remote SQL Server, perform a backup and save it to my local drive.

I currently can only connect to a remote SQL Server and backup and save the backup file to the remote SQL Server drives. The same happens when I connect to a local instance of SQL Server and backup a file, I can only save it to my local drive.

Is there a way to specify to the Microsoft.SqlServer.Management.Smo to save to the [local] or [remote] machines?

Patrick Miron

For more about Microsoft.SqlServer.Management.Smo, check out my other thread at http://social.msdn.microsoft.com/Forums/en-CA/sqlgetstarted/thread/656d522a-06a6-4475-8070-93df75ef83a5


ASP.NET, HTML, JavaScript Snippet Support (VS 2010 and .NET 4.0 Series)

  
This post covers another useful improvement in VS 2010 - HTML/ASP.NET/JavaScript snippet support. Snippets allow you to be more productive within source view by allowing you to create chunks of code and markup that you can quickly apply and use in your application with a minimum of character typing.

Visual Studio has supported the concept of "snippets" for VB and C# in previous releases - but not for HTML, ASP.NET markup and JavaScript. With VS 2010 we now support snippets for these content types as well.

call JavaScript - jQuery code from ASP.NET Server-Side

  
jQuery got so close to me lately that I can see myself adding the scripts to my project almost unconsciously. The thing is, jQuery is very useful for me, in almost all situations and it has been a do or die enhancement for all my project since I first put my hands on it.

Of course while using it, you encounter few situations which need a bit of research to solve, mostly when you are trying to combine it with some other technologies like: UpdatePanels and ASP.NET Ajax. For instance there are many situations when I would like to run some jQuery magic based on some decision that I make on the server side.

call JavaScript - jQuery code from ASP.NET Server-Side

  
jQuery got so close to me lately that I can see myself adding the scripts to my project almost unconsciously. The thing is, jQuery is very useful for me, in almost all situations and it has been a do or die enhancement for all my project since I first put my hands on it.

Of course while using it, you encounter few situations which need a bit of research to solve, mostly when you are trying to combine it with some other technologies like: UpdatePanels and ASP.NET Ajax. For instance there are many situations when I would like to run some jQuery magic based on some decision that I make on the server side

Ajax Enabled Gridview using JavaScript in ASP.NET

  
Before explaining the article, I would like to thank all readers who read my article and voted for it. Your appreciation for my article gives me strength to write more good articles. Hope in future I will get your valuable comments and suggestions. Now I won't waste your time and come back to the topic. I have written this article on 'Ajax Enabled Gridview Using JavaScript in ASP.NET'. In this article, I will show you how to make a Gridview using a simple HTML table, JavaScript and XML HTTP for Ajax call without using any ASP.NET control.

Using Code

GridView Javascript Click Row and Ajax

  
This article shows 2 common tasks with the ASP.NET GridView: Binding a List (generic) of objects as DataSource and on clicking a row, getting the values of the selected row by a javascript function. In the example a List with User-objects is displayed. On clicking a row containing the data of a User-object, the Id of the object is used to get the address of the user by an Ajax-call and display it in a details-field.

Local variable scoping in C#

  
In my previous post, Compiler-generated scopes for local variable declarations, I briefly touched on the issue of multiple meanings applied to the same name. In this post, I'll aim to flush out the compiler's rules with regards to binding names in their local scopes.
Categories: 
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