Skip to content

Commit f93ed80

Browse files
authored
dotnet: capture feedback code snippet (#13889)
similar to Unity: * https://github.com/getsentry/sentry-docs/pull/13794/files
1 parent 8039fc2 commit f93ed80

File tree

1 file changed

+3
-10
lines changed
  • docs/platforms/dotnet/common/user-feedback

1 file changed

+3
-10
lines changed

docs/platforms/dotnet/common/user-feedback/index.mdx

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,13 @@ User Feedback for **[ASP.NET](/platforms/dotnet/guides/aspnet/user-feedback/#int
1515

1616
</Alert>
1717

18-
You can create a form to collect the user input in your preferred framework, and use the SDK's API to send the information to Sentry. You can also use the widget, as described below. If you'd prefer an alternative to the widget or do not have a JavaScript frontend, you can use this API:
18+
You can create a form to collect the user input in your preferred framework, and use the SDK's API to send the information to Sentry. You can also use the widget, as described below. If you'd prefer an alternative to the widget or do not have a web frontend, you can use this API:
1919

2020
```csharp {tabTitle:C#}
2121
var eventId = SentrySdk.CaptureMessage("An event that will receive user feedback.");
2222

23-
SentrySdk.CaptureUserFeedback(eventId, "[email protected]", "It broke.", "The User");
24-
```
25-
26-
```fsharp {tabTitle:F#}
27-
open Sentry
28-
29-
let eventId = SentrySdk.CaptureMessage("An event that will receive user feedback.")
30-
31-
SentrySdk.CaptureUserFeedback(eventId, "[email protected]", "It broke.", "The User")
23+
// The associated event is optional
24+
SentrySdk.CaptureFeedback("It broke.", "[email protected]", "The User", associatedEventId: eventId);
3225
```
3326

3427
## Crash-Report Modal

0 commit comments

Comments
 (0)