Click here to Skip to main content
15,899,025 members

Comments by anil_kumar_bhakta (Top 22 by date)

anil_kumar_bhakta 26-Jun-22 7:22am View    
this also lost the functionality of select2.
anil_kumar_bhakta 20-Jun-22 14:05pm View    
Console responses are as below: -
....
System.ArgumentNullException: Value cannot be null. (Parameter 'items')
at Microsoft.AspNetCore.Mvc.Rendering.MultiSelectList..ctor(IEnumerable items, String dataValueField, String dataTextField, IEnumerable selectedValues, String dataGroupField)
at Microsoft.AspNetCore.Mvc.Rendering.SelectList..ctor(IEnumerable items, String dataValueField, String dataTextField, Object selectedValue)
at Microsoft.AspNetCore.Mvc.Rendering.SelectList..ctor(IEnumerable items, String dataValueField, String dataTextField)
at CallSite.Target(Closure , CallSite , Type , Object , String , String )
at IDESK.Models.CustomerMaster.Views_CustomerMaster__Customer.<executeasync>b__38_6() in D:\OCCL\IDESK\IDESK\Views\CustomerMaster\_Customer.cshtml:line 58
at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext.GetChildContentAsync(Boolean useCachedResult, HtmlEncoder encoder)
at Microsoft.AspNetCore.Mvc.TagHelpers.RenderAtEndOfFormTagHelper.ProcessAsync(TagHelperContext context, TagHelperOutput output)
at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner.<runasync>g__Awaited|0_0(Task task, TagHelperExecutionContext executionContext, Int32 i, Int32 count)
at IDESK.Models.CustomerMaster.Views_CustomerMaster__Customer.ExecuteAsync() in D:\OCCL\IDESK\IDESK\Views\CustomerMaster\_Customer.cshtml:line 32
at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context)
at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, Boolean invokeViewStarts)
at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context)
at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable`1 statusCode)
at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable`1 statusCode)
at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ActionContext actionContext, IView view, ViewDataDictionary viewData, ITempDataDictionary tempData, String contentType, Nullable`1 statusCode)
at Microsoft.AspNetCore.Mvc.ViewFeatures.PartialViewResultExecutor.ExecuteAsync(ActionContext context, PartialViewResult result)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<invokenextresultfilterasync>g__Awaited|29_0[TFilter,TFilterAsync](ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<invokenextresourcefilter>g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<invokeasync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.<invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext
anil_kumar_bhakta 20-Jun-22 13:56pm View    
The 'required' attrubute was added for testing. Without required it also behave the same.
In Model, it is already marked as required like below: -
...
[Display(Name = "CUST_GROUP")]
[Required(ErrorMessage = "Please enter Customer Group")]
[MaxLength(20)]
public string CUST_GROUP { get; set; }
...
"Also, you're removing the selected attribute from all of the list options every time the list changes. The user will never be able to select anything from the list!"
I think it is required when user select the option. If user select any of the listed item and again select the placeholder it is going to validadte. But my concern is that when user press 'save' button it must be validate. I also set the control break in my controller it goes and modelstate invalidated then it come back to partialview and validation message not displaying. However it works perfect without Select2.
anil_kumar_bhakta 2-Jan-20 6:26am View    
Thanks for your guidance. But my question is that the same code is running well before 12:00 pm. I am able to get the result after this time period which i am observing since last 15 days.
I am also able to browse the same link at anytime.
anil_kumar_bhakta 23-Dec-18 6:27am View    
you are right. but when we go for element inspect from browser data shown. I think this data is being loaded by the function "fetchPrice()". Here "fetchPrice()" how works i do not know.