Dear Velocity,
I am working on a project which involves ASP.NET, C# and ORACLE.
I've got a page which has a DropDownList, a SqlDataSource and a Repeater.
The repeater is connected with the SqlDataSource and the DropDownList has different options.
The DropDownList shows the status of a PURCHASE ORDER, which can be set to either Ordered, Canceled and Delivered. By selecting one of these options, I would like to reload the page and change the SelectCommand of the SqlDataSource so that the Repeater shows different data connected with the status that is selected.
I've already tried several things but I can't seem to fix it.
I am currently on my work, so I'll post the code that I've tried later this day.
I hope someone knows how to set this up right.
Thanks in advance,
Quindoo
Edit: I found the solution myself after trying out alot of things, I came to the conclusion that I was thinking to hard to solve it.
The solution for me was:
Attach an OnTextChanged to the dropdownlist and add an if / else if / else statement within the code in the code behind. Simular to If dropdownlist.text == 'My First Value' then SqlDataSource1.SelectCommand = ....' etc..
I am working on a project which involves ASP.NET, C# and ORACLE.
I've got a page which has a DropDownList, a SqlDataSource and a Repeater.
The repeater is connected with the SqlDataSource and the DropDownList has different options.
The DropDownList shows the status of a PURCHASE ORDER, which can be set to either Ordered, Canceled and Delivered. By selecting one of these options, I would like to reload the page and change the SelectCommand of the SqlDataSource so that the Repeater shows different data connected with the status that is selected.
I've already tried several things but I can't seem to fix it.
I am currently on my work, so I'll post the code that I've tried later this day.
I hope someone knows how to set this up right.
Thanks in advance,
Quindoo
Edit: I found the solution myself after trying out alot of things, I came to the conclusion that I was thinking to hard to solve it.
The solution for me was:
Attach an OnTextChanged to the dropdownlist and add an if / else if / else statement within the code in the code behind. Simular to If dropdownlist.text == 'My First Value' then SqlDataSource1.SelectCommand = ....' etc..
Last edited: