onclientclick problem
-
I am trying to get a value in response to user button selection, eg Butoon 1, button 2, button 3 selected, want sequenceObj ="1,2,3,", this part is ok but not getting anything in code behind. This is what I have and I know it's probably not right but I have not done things like this before. I am hoping some one can tell me how to go about it. in .cs file //there is probably a lot more to do in relation to this but don't know how and is probably why I am not getting values. bnSubmit.OnClientClick = Page.ClientScript.GetPostBackEventReference(this, "sequenceObj.value"); in .js file function buttonClick(s) { sequenceObj.value += s + ","; } function getSequence() //does not get here! { return sequenceObj.value; } in .aspx file <script type="text/javascript"> sequenceObj = new Object(); sequenceObj.value = ""</script> <asp:Button ID="bnSubmit" runat="server" Text="Submit" Width="100%" onclick="bnSubmit_Click" Height="38px" onclientclick="return getSequence()" UseSubmitBehavior="False"/>; Any help would be greatly appreciated.
theLizard