diff --git a/.vs/SummerBestWebForm2/v17/.suo b/.vs/SummerBestWebForm2/v17/.suo index 3f2663c..b83bbfd 100644 Binary files a/.vs/SummerBestWebForm2/v17/.suo and b/.vs/SummerBestWebForm2/v17/.suo differ diff --git a/.vs/SummerBestWebForm2/v17/DocumentLayout.backup.json b/.vs/SummerBestWebForm2/v17/DocumentLayout.backup.json index 3870e20..e4261d5 100644 --- a/.vs/SummerBestWebForm2/v17/DocumentLayout.backup.json +++ b/.vs/SummerBestWebForm2/v17/DocumentLayout.backup.json @@ -2,10 +2,26 @@ "Version": 1, "WorkspaceRootPath": "C:\\Repos\\SummerBestWebForm2\\", "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|c:\\repos\\summerbestwebform2\\components\\pages\\home.razor.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|solutionrelative:components\\pages\\home.razor.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|c:\\repos\\summerbestwebform2\\components\\pages\\home.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}", + "RelativeMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|solutionrelative:components\\pages\\home.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}" + }, { "AbsoluteMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|c:\\repos\\summerbestwebform2\\components\\app.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}", "RelativeMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|solutionrelative:components\\app.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}" }, + { + "AbsoluteMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|c:\\repos\\summerbestwebform2\\components\\ipaddressgrabber.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}", + "RelativeMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|solutionrelative:components\\ipaddressgrabber.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}" + }, + { + "AbsoluteMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|c:\\repos\\summerbestwebform2\\appstate\\cascadingappstate.razor.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|solutionrelative:appstate\\cascadingappstate.razor.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, { "AbsoluteMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|c:\\repos\\summerbestwebform2\\components\\pages\\weather.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}", "RelativeMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|solutionrelative:components\\pages\\weather.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}" @@ -18,7 +34,7 @@ "DocumentGroups": [ { "DockedWidth": 200, - "SelectedChildIndex": 12, + "SelectedChildIndex": 16, "Children": [ { "$type": "Bookmark", @@ -66,7 +82,7 @@ }, { "$type": "Document", - "DocumentIndex": 1, + "DocumentIndex": 5, "Title": "Weather.razor", "DocumentMoniker": "C:\\Repos\\SummerBestWebForm2\\Components\\Pages\\Weather.razor", "RelativeDocumentMoniker": "Components\\Pages\\Weather.razor", @@ -79,16 +95,68 @@ }, { "$type": "Document", - "DocumentIndex": 0, + "DocumentIndex": 2, "Title": "App.razor", "DocumentMoniker": "C:\\Repos\\SummerBestWebForm2\\Components\\App.razor", "RelativeDocumentMoniker": "Components\\App.razor", "ToolTip": "C:\\Repos\\SummerBestWebForm2\\Components\\App.razor", "RelativeToolTip": "Components\\App.razor", - "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "ViewState": "AgIAADYAAAAAAAAAAAAAAFkAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|", "WhenOpened": "2025-05-30T07:59:17.554Z", "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 4, + "Title": "CascadingAppState.razor.cs", + "DocumentMoniker": "C:\\Repos\\SummerBestWebForm2\\AppState\\CascadingAppState.razor.cs", + "RelativeDocumentMoniker": "AppState\\CascadingAppState.razor.cs", + "ToolTip": "C:\\Repos\\SummerBestWebForm2\\AppState\\CascadingAppState.razor.cs", + "RelativeToolTip": "AppState\\CascadingAppState.razor.cs", + "ViewState": "AgIAAFgAAAAAAAAAAAAAAGsAAABbAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-05-30T08:10:33.219Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 3, + "Title": "IPAddressGrabber.razor", + "DocumentMoniker": "C:\\Repos\\SummerBestWebForm2\\Components\\IPAddressGrabber.razor", + "RelativeDocumentMoniker": "Components\\IPAddressGrabber.razor", + "ToolTip": "C:\\Repos\\SummerBestWebForm2\\Components\\IPAddressGrabber.razor", + "RelativeToolTip": "Components\\IPAddressGrabber.razor", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAgAAAAgAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|", + "WhenOpened": "2025-05-30T08:17:49.625Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 1, + "Title": "Home.razor", + "DocumentMoniker": "C:\\Repos\\SummerBestWebForm2\\Components\\Pages\\Home.razor", + "RelativeDocumentMoniker": "Components\\Pages\\Home.razor", + "ToolTip": "C:\\Repos\\SummerBestWebForm2\\Components\\Pages\\Home.razor", + "RelativeToolTip": "Components\\Pages\\Home.razor", + "ViewState": "AgIAANYBAAAAAAAAAAAYwAsCAAA+AAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|", + "WhenOpened": "2025-05-30T16:43:33.514Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "Home.razor.cs", + "DocumentMoniker": "C:\\Repos\\SummerBestWebForm2\\Components\\Pages\\Home.razor.cs", + "RelativeDocumentMoniker": "Components\\Pages\\Home.razor.cs", + "ToolTip": "C:\\Repos\\SummerBestWebForm2\\Components\\Pages\\Home.razor.cs", + "RelativeToolTip": "Components\\Pages\\Home.razor.cs", + "ViewState": "AgIAAGoAAAAAAAAAAAAAAIoAAAByAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-05-30T16:43:48.828Z", + "EditorCaption": "" } ] } diff --git a/.vs/SummerBestWebForm2/v17/DocumentLayout.json b/.vs/SummerBestWebForm2/v17/DocumentLayout.json index 3870e20..e4261d5 100644 --- a/.vs/SummerBestWebForm2/v17/DocumentLayout.json +++ b/.vs/SummerBestWebForm2/v17/DocumentLayout.json @@ -2,10 +2,26 @@ "Version": 1, "WorkspaceRootPath": "C:\\Repos\\SummerBestWebForm2\\", "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|c:\\repos\\summerbestwebform2\\components\\pages\\home.razor.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|solutionrelative:components\\pages\\home.razor.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|c:\\repos\\summerbestwebform2\\components\\pages\\home.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}", + "RelativeMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|solutionrelative:components\\pages\\home.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}" + }, { "AbsoluteMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|c:\\repos\\summerbestwebform2\\components\\app.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}", "RelativeMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|solutionrelative:components\\app.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}" }, + { + "AbsoluteMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|c:\\repos\\summerbestwebform2\\components\\ipaddressgrabber.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}", + "RelativeMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|solutionrelative:components\\ipaddressgrabber.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}" + }, + { + "AbsoluteMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|c:\\repos\\summerbestwebform2\\appstate\\cascadingappstate.razor.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|solutionrelative:appstate\\cascadingappstate.razor.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, { "AbsoluteMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|c:\\repos\\summerbestwebform2\\components\\pages\\weather.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}", "RelativeMoniker": "D:0:0:{10E16044-8880-42A4-866B-B0461C450A71}|SummerBestWebForm2.csproj|solutionrelative:components\\pages\\weather.razor||{40D31677-CBC0-4297-A9EF-89D907823A98}" @@ -18,7 +34,7 @@ "DocumentGroups": [ { "DockedWidth": 200, - "SelectedChildIndex": 12, + "SelectedChildIndex": 16, "Children": [ { "$type": "Bookmark", @@ -66,7 +82,7 @@ }, { "$type": "Document", - "DocumentIndex": 1, + "DocumentIndex": 5, "Title": "Weather.razor", "DocumentMoniker": "C:\\Repos\\SummerBestWebForm2\\Components\\Pages\\Weather.razor", "RelativeDocumentMoniker": "Components\\Pages\\Weather.razor", @@ -79,16 +95,68 @@ }, { "$type": "Document", - "DocumentIndex": 0, + "DocumentIndex": 2, "Title": "App.razor", "DocumentMoniker": "C:\\Repos\\SummerBestWebForm2\\Components\\App.razor", "RelativeDocumentMoniker": "Components\\App.razor", "ToolTip": "C:\\Repos\\SummerBestWebForm2\\Components\\App.razor", "RelativeToolTip": "Components\\App.razor", - "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "ViewState": "AgIAADYAAAAAAAAAAAAAAFkAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|", "WhenOpened": "2025-05-30T07:59:17.554Z", "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 4, + "Title": "CascadingAppState.razor.cs", + "DocumentMoniker": "C:\\Repos\\SummerBestWebForm2\\AppState\\CascadingAppState.razor.cs", + "RelativeDocumentMoniker": "AppState\\CascadingAppState.razor.cs", + "ToolTip": "C:\\Repos\\SummerBestWebForm2\\AppState\\CascadingAppState.razor.cs", + "RelativeToolTip": "AppState\\CascadingAppState.razor.cs", + "ViewState": "AgIAAFgAAAAAAAAAAAAAAGsAAABbAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-05-30T08:10:33.219Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 3, + "Title": "IPAddressGrabber.razor", + "DocumentMoniker": "C:\\Repos\\SummerBestWebForm2\\Components\\IPAddressGrabber.razor", + "RelativeDocumentMoniker": "Components\\IPAddressGrabber.razor", + "ToolTip": "C:\\Repos\\SummerBestWebForm2\\Components\\IPAddressGrabber.razor", + "RelativeToolTip": "Components\\IPAddressGrabber.razor", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAgAAAAgAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|", + "WhenOpened": "2025-05-30T08:17:49.625Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 1, + "Title": "Home.razor", + "DocumentMoniker": "C:\\Repos\\SummerBestWebForm2\\Components\\Pages\\Home.razor", + "RelativeDocumentMoniker": "Components\\Pages\\Home.razor", + "ToolTip": "C:\\Repos\\SummerBestWebForm2\\Components\\Pages\\Home.razor", + "RelativeToolTip": "Components\\Pages\\Home.razor", + "ViewState": "AgIAANYBAAAAAAAAAAAYwAsCAAA+AAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|", + "WhenOpened": "2025-05-30T16:43:33.514Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "Home.razor.cs", + "DocumentMoniker": "C:\\Repos\\SummerBestWebForm2\\Components\\Pages\\Home.razor.cs", + "RelativeDocumentMoniker": "Components\\Pages\\Home.razor.cs", + "ToolTip": "C:\\Repos\\SummerBestWebForm2\\Components\\Pages\\Home.razor.cs", + "RelativeToolTip": "Components\\Pages\\Home.razor.cs", + "ViewState": "AgIAAGoAAAAAAAAAAAAAAIoAAAByAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-05-30T16:43:48.828Z", + "EditorCaption": "" } ] } diff --git a/AppState/CascadingAppState.razor.cs b/AppState/CascadingAppState.razor.cs index 4b6ae25..ff096cc 100644 --- a/AppState/CascadingAppState.razor.cs +++ b/AppState/CascadingAppState.razor.cs @@ -8,19 +8,20 @@ namespace SummerBestWebForm2.AppState; public partial class CascadingAppState : ComponentBase, IAppState { - private readonly string StorageKey = "SummerBestWebForm2-MyCarHQ"; + private readonly string StorageKey = "SummerBestEnrollment-KeyMotive"; [Parameter] public RenderFragment? ChildContent { get; set; } [Inject] - ProtectedLocalStorage? localStorage { get; set; } - [Inject] - IHttpContextAccessor? httpContextAccessor { get; set; } + ProtectedLocalStorage? localStorage { get; set; } = default!; + //[Inject] + //IHttpContextAccessor? httpContextAccessor { get; set; } = default!; + [CascadingParameter] HttpContext? httpContext { get; set; } = default!; bool isLoaded = false; - public Guid SessionId { get; set; } + public Guid SessionId { get; set; } = Guid.Empty; - public bool isInit { get; set; } + public bool isInit { get; set; } = false; //public CascadingAppState() //{ @@ -100,10 +101,11 @@ public partial class CascadingAppState : ComponentBase, IAppState public async Task LoadAsync() { - string remoteIpAddr=string.Empty; + string remoteIpAddr = string.Empty; try { - remoteIpAddr = httpContextAccessor.HttpContext?.Connection.RemoteIpAddress?.ToString() ?? ""; + //remoteIpAddr = httpContextAccessor.HttpContext?.Connection.RemoteIpAddress?.ToString() ?? string.Empty; + remoteIpAddr = this.httpContext?.Connection.RemoteIpAddress?.ToString() ?? "Not Set"; var data = await localStorage.GetAsync(StorageKey); var state = JsonSerializer.Deserialize(data.Value); diff --git a/Components/App.razor b/Components/App.razor index 67a8a85..d83f0ea 100644 --- a/Components/App.razor +++ b/Components/App.razor @@ -77,7 +77,7 @@ }
@errMsg
- @if (appState != null) +@* @if (appState != null) {
       SessionId: @appState.SessionId
@@ -85,7 +85,7 @@
       DateExpires: @appState.DateExpires
       IPAddress: @appState.myIpAddress
     
- } + } *@ @@ -98,7 +98,7 @@ [Inject] public PersistentComponentState ApplicationState { get; set; } = default!; private PersistingComponentStateSubscription? _persistingSubscription; - private bool _subsequentRender; + //private bool _subsequentRender; private string RemoteIpAddress = "Not Set"; protected override void OnInitialized() diff --git a/Components/Pages/Home.razor b/Components/Pages/Home.razor index d33c490..2d80bfc 100644 --- a/Components/Pages/Home.razor +++ b/Components/Pages/Home.razor @@ -514,7 +514,7 @@ else } -@if (appState != null) +@* @if (appState != null) {
     SessionId: @appState.SessionId
@@ -524,3 +524,4 @@ else
     IPAddress2: @(IpAddressService.RemoteIpAddress.ToString())
   
} + *@ \ No newline at end of file diff --git a/Components/Pages/Home.razor.cs b/Components/Pages/Home.razor.cs index 1e888d6..942b169 100644 --- a/Components/Pages/Home.razor.cs +++ b/Components/Pages/Home.razor.cs @@ -136,7 +136,7 @@ public partial class Home "Requested Quantity:{1}" + "Additional Comments:{2}", paymentMethod, requestedQuantity, additionalComments); var ipString = string.Format("IP Address{0}", - string.IsNullOrWhiteSpace(appState.myIpAddress) ? "NONE" : appState.myIpAddress); + string.IsNullOrWhiteSpace(IpAddressService.RemoteIpAddress.ToString()) ? "NONE" : IpAddressService.RemoteIpAddress.ToString()); em.HtmlBody = "
You have a new enrollment:

" + targetAudience + locInfoString + cardInfoString + paymentString + ipString + "
"; diff --git a/obj/Debug/net8.0/SummerBestWebForm2.AssemblyInfo.cs b/obj/Debug/net8.0/SummerBestWebForm2.AssemblyInfo.cs index 1e96ff0..fc9feff 100644 --- a/obj/Debug/net8.0/SummerBestWebForm2.AssemblyInfo.cs +++ b/obj/Debug/net8.0/SummerBestWebForm2.AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("SummerBestWebForm2")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+7e385edd94fcff636fce2d563d4e3484c3829da8")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+6fac9d70de3da7259ff65bc37b02293cfc7d3c1a")] [assembly: System.Reflection.AssemblyProductAttribute("SummerBestWebForm2")] [assembly: System.Reflection.AssemblyTitleAttribute("SummerBestWebForm2")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/obj/Debug/net8.0/SummerBestWebForm2.AssemblyInfoInputs.cache b/obj/Debug/net8.0/SummerBestWebForm2.AssemblyInfoInputs.cache index 31f45a4..c10d914 100644 --- a/obj/Debug/net8.0/SummerBestWebForm2.AssemblyInfoInputs.cache +++ b/obj/Debug/net8.0/SummerBestWebForm2.AssemblyInfoInputs.cache @@ -1 +1 @@ -dfdf0657f16c6b7685d809cc27d23f04604d3277a6614245fb1fb6278a8dd03e +debaa91146824c0e4ccad9e6dc8139595dce718542b5b38b2a15aad623e585bf