I have a stored procedure – “SP_Load_ListBox” and one parameter in this stored procedure- @Param.
This stored procedure select two fields – FieldForDataTextfield – field for data text field of my list box and FieldForDataValueField – field for data value field of my list box.
User must enter the parameter value in the textbox1, click button and list box must be populated from this stored procedure with parameter.
How can I populate my list box from this store procedure with parameter (data text field and data value field of my list box)?
the point to remember here is that it will run BEFORE the page loads - which means your user didnt have the chance to enter data yet... and therefore - set a default value (in the same step where you connect to the control) - you can set it to something that wouldnt yield any results if you want the list to be empty before the user selected anything