Skip to content

Commit 1b39b7a

Browse files
committed
Updated the corrections
1 parent 21fc671 commit 1b39b7a

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

Document-Processing/Word/Word-Library/NET/Create-Word-Document-in-ASP-NET-Core-WEB-API.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Step 1: Create a new C# ASP.NET Core Web API project.
2525

2626
Step 2: Add a name for the project.
2727

28-
![Name the project](ASP-NET-Core-Web-API-images/ASP-NET-Core-Web-API-Project-name.png)
28+
![Name the project](ASP-NET-Core-WEB-API-images/ASP-NET-Core-Web-API-Project-name.png)
2929

3030
Step 3: Install the [Syncfusion.DocIO.Net.Core](https://www.nuget.org/packages/Syncfusion.DocIO.Net.Core) NuGet package as a reference to your project from [NuGet.org](https://www.nuget.org).
3131

@@ -35,7 +35,7 @@ N> Starting with v16.2.0.x, if you reference Syncfusion<sup>&reg;</sup> assembli
3535

3636
Step 4: Add a new API controller empty file in the project.
3737

38-
![Add empty API controller to the project](ASP-NET-Core-Web-API-images/Empty-API-Controller.png)
38+
![Add empty API controller to the project](ASP-NET-Core-WEB-API-images/Empty-API-Controller.png)
3939

4040
Step 5: Include the following namespaces in the **ValuesController.cs** file.
4141

@@ -63,7 +63,7 @@ Step 6: Add a new action method CreateDocument in **ValuesController.cs** and in
6363
{
6464
try
6565
{
66-
var fileDownloadName = $"Output.docx";
66+
var fileDownloadName = "Output.docx";
6767
const string contentType = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
6868
var stream = GenerateWordDocument();
6969
stream.Position = 0;
@@ -72,7 +72,7 @@ Step 6: Add a new action method CreateDocument in **ValuesController.cs** and in
7272
catch (Exception ex)
7373
{
7474
// Log or handle the exception
75-
return BadRequest($"Error occurred while creating Excel file: {ex.Message}");
75+
return BadRequest("Error occurred while creating Excel file: " + ex.Message);
7676
}
7777
}
7878

@@ -175,11 +175,12 @@ Step 1: Create a console application.
175175
![Create a Console application in Visual Studio](ASP-NET-Core-WEB-API-images/Console-Template-Net-Core.png)
176176

177177
Step 2: Add a name for the application.
178-
![Name the project](ASP-NET-Core-Web-API-images/Client-Application-Project-Name.png)
178+
![Name the project](ASP-NET-Core-WEB-API-images/Client-Application-Project-Name.png)
179179

180180
N> Ensure your ASP.NET Core Web API is running on the specified port before running this client. Adjust the port number if your Web API runs on a different port (check the ASP.NET Core app's launch settings).
181181

182182
Step 3: Add the below code snippet in the **Program.cs** file for accessing the Web API using HTTP requests.
183+
183184
This method sends a GET request to the Web API endpoint to retrieve and save the generated Word document.
184185

185186
{% tabs %}
@@ -229,4 +230,4 @@ A complete working sample is available on [GitHub](https://github.com/Syncfusion
229230

230231
Upon executing the program, the **Word document** will be generated as follows.
231232

232-
![ASP .NET Core WEB API output Word document](ASP-NET-Core-Web-API-images/ASP-NET-Core-Web-API-Output.png)
233+
![ASP .NET Core WEB API output Word document](ASP-NET-Core-WEB-API-images/ASP-NET-Core-Web-API-Output.png)

0 commit comments

Comments
 (0)