I have a stored procedure in SQL server to display some data in vb.net application. can I just edit my procedure? how to pass radio button value to display data based on selected radio button without changing VB code and without add new parameter in SQL, is it possible to do? these are my parameters.
ALTER PROCEDURE [dbo].[LMS_Report]
@deptID varchar(10),
@month int,
@year int,
@startIndex int,
@pageSize int,
@generateData int,
@totalRecords int OUTPUT
sorry this is the first time I use vb.net
If a radio button is checked, its checked property is true .
Value. The value attribute is a string containing the radio button's value. The value is never shown to the user by their user agent. Instead, it's used to identify which radio button in a group is selected.
Please follow the steps
1)Get the value of radio button while clicking it and stored it in variable.
2)After that you can pass a values to stored procedure while execute a sqlcommand.
for example
1)value for radio button is 'red' this value is stored in the string "RadioButtonValue".
2)pass this RadioButtonValue to the SQL's stored procedure by using cmd.
cmd.Parameters.AddWithValue("@RadioButtonValue",RadioButtonValue).
@RadioButtonValue - variable declared in stored procedures.
else refer the following link
http://www.aspsnippets.com/Articles/Pass-Table-Valued-Parameters-to-Stored-Procedure-from-Code-Behind-using-ADONet-C-and-VBNet.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With