Hi,I am no an experienced coder, but I managed to make a few good simple apps with ASP.NET MAKER. however, in my most recent project, I need to display results of a table valued function or a stored procedure that takes a parameter to construct the list. I tried to have a view with a default parameter value to return 0 records so that ASP.NET can build the page. But how can I run my procedure and fill in the list with the resulting rows?Any help would be much appreciated.
To use stored procedure, please read:
https://discourse.hkvstore.com/t/custom-menu-and-custom-page/4442/1
Hi,This somehow explains how to make it in a Custom Page. What I did is as follows:
- Created a view that results in 0 records
- Synched ASP.NET MAKER to generate all the code for it (My concern is the LIST PAGE)
- I don’t need ADD, EDIT, VIEW, just need LIST
What I am trying to achieve is to run SQL in any form:
1- sql = “SELECT * FROM dbo.myfunction(@Parameter)”
2- Stored Procedure that has the sql from (1)
and before the page is loaded with 0 records from the original Recordset I want to load the records from the SQL I ran.I think I need to do something like
// Get the value of @parameter from Session Variable or anyother means
if CurrentPageID = "list" && CurrentPageName = "myPageName"
{
CurrentPage.sqlSelect = "SELECT * FROM dbo.myfunction(@Parameter)"
}
and let ASP.NET MAKER do the rest as I want to add some ListOptions etc…Can you provide some guidance how to do this?
Your advice is highly appreciated.
R.S
You can probably make use of the server events in the list page to do this.
I tried many times with no luck. and shed of light would be valuable.
Show your database schema for the stored procedure and your codes in the server events.
Any one could shed some light on how can this be done?