Can anyone suggest a better way to suggest a file to upload to a SharePoint Web Part? The file will be dynamically created on demand, but I still need to display the standard page, as well as the downloaded file.
In the end, I dynamically added an iFrame to the web part during reboot after the user selects the Export option and a standard .aspx page is loaded inside it, which handles sending. This is due to the problem of sending a response.
Microsoft .
Microsoft :
private void Page_Load(object sender, System.EventArgs e) { //Set the appropriate ContentType. Response.ContentType = "Application/pdf"; //Get the physical path to the file. string FilePath = MapPath("acrobat.pdf"); //Write the file directly to the HTTP content output stream. Response.WriteFile(FilePath); Response.End(); }
.
Source: https://habr.com/ru/post/1717340/More articles:Problem with Awk & Grep - linuxC: Efficient use of macros - cIs table good practice the best way to make headings in a table? - htmllarge versus nested static machines - cIE8 error with CSS - cssHow can I make img and text link as a link to the same place, and both become active when it hangs, regardless of which one Iām soaring to? - csspreg_replace () str_replace () apostrophe is a nightmare! - The Drupal menu image is being replaced - phptouch event in a quartz circle pattern? - iphoneIs mysql_close required when connection fails? - c ++How to optimize pointer layers - c ++All Articles