Click here to Skip to main content
15,887,442 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everyone,

In asp.net 4.7.1. I am trying to use VNext capabilities to load a GridView.
ItemType is set, SelectMethod is set.
In code behind the public IQueryable<itemtype> GetData() is set.
It loads data from a stored procedure. The datatable rows are converted to a List<model> object. That data is called in het GetData() method and casted to IQueryable


When I load the page I see the method is called.

It will not give data because I need to add the value of a DropDownList.SelectedValue.

When selecting an item from the DropDownlist the GetData() method is not called again.


What do I have to do to get that working?

What I have tried:

See 'describe the problem'section.

For DropDownList loading in the same way I do not have this problem
Posted
Updated 31-Jan-24 22:30pm
v2
Comments
Dave Kreskowiak 26-Jan-24 13:14pm    
Ummm, what is this VNext you speak of?
Dave Kreskowiak 30-Jan-24 10:02am    
Sigh. "vNext" refers to the "next version" of a product, not a product itself. So, you're not using "VNext capabilities".
Herman<T>.Instance 31-Jan-24 9:20am    
read this than: vnext in asp.net. It is about a way to load the data
Dave Kreskowiak 31-Jan-24 11:57am    
You seem to have a comprehension problem. From the article you linked:
The vNext releases of .NET and Visual Studio include a ton of great new features and capabilities.
Whever you see "vNext", it is ONLY ever referring to the next version of a product, be it ASP.NET, MVC, Visual Studio, SQL Server, Access, Word, Excel, Mahjong, Solitaire, ...

1 solution

In the OnSelectedIndexChanged all you have to do is call DropDownList.DataBind() and the SelectMethod will be executed and the data will be loaded in the DropDownList
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900