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


Top 5 Contributors of the Month
david stephan
Post New Web Links

save file name

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

Hi

i have a textbox and a filename with its path is in it , but i want only to save the filename and dot and its extension, how can i divide it.

 

i dont want to use fileupload.filename.

thanks  




View Complete Post


More Related Resource Links

Insert image into Infopath form and save to SharePoint as PDF file

  

I have an InfoPath web-enabled form in MOSS 2007, that is integrated with a K2 blackpoint process for an approval workflow.

Once the form (a Purchase Order request form) has been approved in the K2 workflow process, I switch the form view to a "print-friendly" view for the requestor to view from the browser.  However, now I need to go one step further with this scenario:

1) I need to somehow insert/embed an image with the scanned-in signature of the approver (likely stored in a SP doc library) at the signature line section of my form.  Also, what are the security requirements for storing such images, but not granting all users access to these (e.g. only services accounts that need to access this for embedding into the form, etc.)?

2) Then I need to convert this final "print-friendly" view of the form (with the signature image) to a PDF document so that I can store it in SharePoint (and email it to the requestor using K2's email event capabilities).

Can anyone help me with a solution to both of these requirement, or point me to some resources for this (even 3rd party components are open-game).

thanks!


--Thiago

Error: Do you want to save this file, or find a program online to open it?

  

Hi,

I am relatively new to MVC , i am getting the following error when i try to browse to a page in which i have used usercontrol and within the usercontrol i have a simple grid.

Error: Do you want to save this file, or find a program online to open it?

I am returning the data from the controller like this

 var jsonData = new
                {
                    total = 1,
                    page = 1,
                    records = myRequests.Count,
                    rows = new[]{myRequests.ToArray()                 
                    }

how to automatically save new file into document library with a unique name or ID?

  
I've created a form using MS Word Document (2007) and lock it (protect it) so that users will be able to fill in the required fields.
then i've created a Content Type and uploaded the MS word form to be used as a template.

Then I've created a document library and enabled the content type and associate the above form for the library, so that when users click on New button the form will open.

everythings goes fine till here.

The problem is when users clicks on New and save the file back to the library, It doesn't save it with a unique name, instead it is over writting the existing one.
in other words, if employee 1 fill up the form and save it and later on employee 2 accessed the library and fill up a new form, he will overwrite what employee 1 has already saved!!

Is there a way to give every new created file a unique name? maybe (username+time)??


Word save file on SharePoint via mapped drive

  

Hi, I have a Document Library mapped to a drive letter. I am able to browse the drive through Windows Explorer. However when I try to save a document to the drive Word returns, 'Unable to connect to the Web server.' .  I have been unable to find any information regarding this error message. If I try to create a document in the Document Library through Windows Explorer and the mapped drive, I get a different error message: 'Unable to create the file 'New Microsoft Office Word Document.docx' There is no user session key for the specified logon session.' After I click OKand refresh the directory, a 0 KB New Microsoft Word Document.docx file has been created. When that file is opened, it is in Read-Only mode.

Environment:

Windows Server 2003 R2
Webclient service started
Signed into the Microsoft Online Services Sign in Application
IE configured through the sign in application
site added to the trusted sites in IE

Thank you again for your input.


attempting to restore to a new DB and it keeps trying to save the mdf file as the original mdf file

  
This is using SQL Server 2005. I've had several problems and this is where I've ended up. 1. Despite the claim that this will create a new DB it doesn't.  I was getting errors about the new DB not having the specified logical file name (despite the new DB not existing).  At the time I was specifying the logical file name as it appeared in the backup. 2. if I manually create the DB I still get the error as above unless I manually change the logical file name via sql management studio.  This is meant to be an automated solution so that is not accceptable. 3. I am now giving it the logical file name of the DB that I want to restore onto (if it doesn't exist I create it), but now it's trying to save the file with the old physical file name, which is absolutely *not* what I want. My instincts tell me I need to change the logical file name in the database I'm wanting to restore onto, but I don't know how to do this via SMO.  All of the explanations I've seen are through the SQL Management Studio and that is not acceptable as this needs to be an automated solution. I have copy/pasted the code from the msdn examples verbatim changing only the dbName and the .bak file location and it has consistently failed. Here is the code in it's current incarnation. var serverName = @"myServer"; var dbName = "MIQDesignTest3"; var backupFileN

Download a file from web and save dialog box for path

  
Hi I need to download a exe file from a web site. I need to prompt a savedialog box for the user to select a path to save it. This the code i have. How can i show a save dialog box here?         Private Sub downloadfile()         Dim client As New Net.WebClient         client.DownloadFile("www.mysite.com/Information/Myexe.exe", "Sr.exe")     End Sub Thanks

How to save form data to delimited file?

  
I tried searching, but maybe I was putting in bad keywords =\How do I go about saving form data into a delimited file?

Can't save SQL Server Management Studio sql file back into Sharepoint Document Library

  
I created an sql query file in SQL Server Management Studio and saved it onto my hard drive.  I then moved that file into a Sharepoint Document Library so others on my team could use that query.I opened the file from within sharepoint, it launched SSMS.I made a change to the file and pressed save.here is the error message that comes up."The operation could not be completed.  The process cannot access the file because it is being used by another process"Am I doing something wrong?

Event handler that will take an e-mail sent to a doc library and save it as an .MSG file within the

  
Hi All, I have a requirement to create an event handler that will take an e-mail sent to a doc library and save it as an .MSG file within the library? Any help/inputs on getting this done is much appreciated.  Hanif

Would like to use an Excel file on the net then save changes

  
I have an excel sheet that i would like to use on the net. I can convert it using spreadsheetconverter but it will not save the changes as it converts it to an htm file.  But works (limited functions though, it wont convert sliders) Can I use VWD somehow so it reads the excel file and then if I make changes, to save them to the file. So when I view it again no the net it sees the changes?? Goal is the use the excel file on the net without having to have it on someones computer I just started VWD  

Getting error that the converter failed to save the file

  
From a document library I click on "Edit in Microsoft Excel (or Word) and the application is not open I get the error "The converter failed to to save the file".  It never opens the application and I'm returned to the document library.  If I already have the application it doesn't generate the error.  I'm running Office 2007

How to show a message box on an invalid filename entered while saving a file using save file dialog

  
Hi all i have written a code to display a message box if invalid characters are entered while saving the file but my message box is not displaying. Actually i will have a save file dialog option to save a file if the filename starts or consists of the following    \\/:*?<>|"  I would like to display a message box as invalid or illegalcharacters in file My code is as follows    Stream myStream;                          SaveFileDialog saveFileDialog1 = new SaveFileDialog();                            saveFileDialog1.InitialDirectory = @"C:\";                          saveFileDialog1.DefaultExt = "txt";                          saveFileDialog1.Filter = "(*.txt)|*.txt";                          saveFileDialog1.FilterIndex = 2;                          saveFileDialog1.RestoreDirectory = true;                            if (saveFileDialog1.ShowDialog() == DialogR

How to save file Attachements of email of outlook express

  
Hi please try guide me,,i have a requirement to read mails from the outlook express and  save the file attachments in perticuler system folder.Please try to help how to read mails and save attachments  from outlook by Using Asp.net ,C#.netplease if any body had sample cade try to give me,Thanks,santhosh.Ssalugusanthosh@gmail.com

DataView upload save file goes nowhere. How do you set a folder to upload to? Dynamically?

  
I have a Dataview bound to Document Library with the New Document button enabled. It apears to upload but can't find the files anywhere. I don't have a Shared Document folder. How and where do you set where to upload the file? A specific folder would be nice and If I could make it dynamic tied to QueryString Ideal. Going a bit further, the library I'm bound to has many 3 digit numeric folders that are dynamically created when entries are added to another list. The page that is calling my dataview has a querystring that will tie into the folder I want to drop files into. Just wondering how I can dynamically set the upload destination. Currently this is the generated code: <input type="button" value="Save" name="btnSave" onclick="javascript: {ddwrt:GenFireServerEvent('__commit')}" /> <a href="javascript: {ddwrt:GenFireServerEvent('__cancel;dvt_1_form_insertmode={1}')}">Upload File</a> I have some other code that calls the classic file upload page that is working perfectly, but I'd really prefer the clean and simple UI of the DataView control if I could make it work. Thanks!

Save file automatically from server

  
I need to know the best way to have a user click a link that will download a file that is out on the server and save it to a specific location on their computer.  The file is a custom template for Microsoft Outlook signature.  Thus, it has to be in a certain folder and this folder will have a different location if the user has Windows 7 vs Windows XP. I wrote a ASP.NET page that captures the user that is logged in and use WebClient.DownloadFile to download the file.  However, I am getting an access is denied error.  Apparently my server doesn't have access to write to the user's folder.  My questions are. 1. How do I solve this and make it so that my server can write to the user's PC? 2. Is there a better way to roll out a custom Outlook template that the entire company should use?  Thank you,

MS Ajax web page Save As file

  

I have several pages in my site that are using an UpdatePanel to allow partial postbacks to step through the process of selecting options for a dynamic report.  An internal user just came to me and said "I ran this report and then clicked 'File -> Save As .mht' to save it to my desktop, and when I opened the resulting file, it was the first selection option rather than the result.

I have verified myself that this is the case.  If this particular page has for example, 4 states: 1st option, 2nd option, 3rd option, Resulting Report..  All coming from the same page, just different panels being shown for each step.  When the user is viewing the resulting report and clicks File -> Save As, the file that is saved is of the 1st option, not the results.

I know one way around this would be to add a link to the page to "Save as PDF" or whatever, and then I'd have to write the code to generate that file...  and I can do that if I need to.  I just thought that the user should also be able to Save their current page at any point by clicking Save As.

Is this possible with MS Ajax?  Maybe this is an Ajax thing, and not a MS thing? 

Anybody know how to save the web page's current view (ie: what is currently visible)?

Thanks!


Opening a MS Word File and setting the save location

  

Hi,

I have an ASP intranet site which opens word documents from a shared network drive (link is stored in a DB).  When the user then goes to save the document, it points the user to their default location - say C:\myprofile\my documents.  How can i get it so that the user can just click on save and it saves it in the location it got the file from?  I am using the following code to grab the document:

Response.AddHeader("Content-disposition", "attachment; filename=" & docfilename)
Response.ContentType = "application/vnd.ms-word"
Response.BinaryWrite(fileData)
Response.[End]()

If i navigate through the network share manually through windows, open the document and click save - it will save it to the right location.

Thanks


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