I'd like to know how VB.NET handles cookies
I maintain an old VB.NET WebForms app. I'm converting it to C# and updating it. However, when it comes to converting how the old app handled browser cookies and how to make the same thing work in a C# Blazor app, I am not sure how to proceed. Here's a snippet that illustrates what I mean. It sets two subparts and assigns an expiration date:
Protected Sub StoreStaffInfoInCookie()
Response.Cookies("StaffInfoCookie")("ClinicID") = ddlClinic.SelectedValue
Response.Cookies("StaffInfoCookie")("JobID") = ddlJob.SelectedValue
Response.Cookies("StaffInfoCookie").Expires = DateTime.Now.AddDays(366)
End Sub
The way I think of it is it is an array. At least that's the way VB.NET is handling here. However, in the Blazor/C# code it looks to me like it separates "StaffInfoCookie" from "ClinicID" using a semicolon. Under the hood, is that what VB.NET is doing?