Last post Jan 25, 2017 03:18 AM by Jean Sun
Jan 24, 2017 02:57 PM|arran1983|LINK
so I have what I hope is a simple problem.
I have a dynamic radio select on my site which pulls from a SQL database the code for this is below:
Dim thisvisa As Integer = 0
Dim n = 1
For n = 1 To 10
If AccountReader(thisvisaprice) > 0 Then
rbprocessingfees.Items.Insert(thisvisa, New ListItem(AccountReader(thisvisastr) & " £" & AccountReader(thisvisaprice), AccountReader(thisvisaprice)))
rbprocessingfees.Items.Insert(thisvisa, New ListItem(AccountReader(thisvisastr), AccountReader(thisvisastr)))
thisvisa = thisvisa + 1
now heres where I am stuck.
say for example the user clicks the 2nd option down I need it to set a page variable to something to say essentially the 2nd option down is set. I need this to be for example
Context.Session("VisaSwift_setoption") = option2
this is so that I can pull an additional field from the SQL database to tie up with this and increase a charge.
as the above is dynamic and can have any number of options (up to 10) I cant set all the variables initially?
I am scratching my head here, please help!
Jan 25, 2017 03:18 AM|Jean Sun|LINK
Do you mean that you are stuck with pass dynamic variables on a form to some backed method?
I think you can use Optional parameter in your backend method to receive these dynamic variables on the form.
The following link shows how to use optional parameter, please take it as reference.