Created
March 19, 2017 18:41
-
-
Save patkleef/f78d19262337e6e6033e5bad30b3523b to your computer and use it in GitHub Desktop.
Application Insights Blog - ApplicationInsightsRegisterActionMethod.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [System.Web.Mvc.HttpPost] | |
| public ActionResult Register([FromBody]RegisterModel model) | |
| { | |
| var dic = new Dictionary<string, string>(); | |
| dic.Add("email", model.Email); | |
| dic.Add("name", model.Name); | |
| dic.Add("category", Session["selectedCategory"]?.ToString()); | |
| _telemetryClient.TrackEvent("Registration form entered event", dic); | |
| var key = _dataService.GetKeyByCategory(Session["selectedCategory"]?.ToString()); | |
| _dataService.Save(key, model); | |
| return View("Registered"); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment