1

I have a javascript script like this below which the 'args' contain a string that I want to pass it to my 'btnLoadGridFrTrans_VouHist' button click. Can someone please advice. Thanks.

function frmIframeChild_VouHist(args)

{            

 var btn = document.getElementById('<%=btnLoadGridFrTrans_VouHist.ClientID%>');            

 if (btn) btn.click();       

 }

  Protected Sub btnLoadGridFrTrans_VouHist_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnLoadGridFrTrans_VouHist.Click
        LoadGrid()
        ScriptManager.RegisterStartupScript(Me.Page, Me.GetType(), "Test", "$('#uidivCardInfo').css('display','inline');$('#divNewMembershipTypeIssuance').css('display','none');$('#divCard_Process').css('display','inline');ShowHide('Voucher_History','" + URLEncryption(CardNo) + "','success#tabs_Used');", True)
  End Sub
1
  • Could you provide your HTML or ASPX button control code? Commented Feb 14, 2012 at 2:56

1 Answer 1

2

You could add a hidden field (containing the value of args) to the document just before submitting it. The click event could read the value of the hidden field via Request.Form["fieldName"].

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, I thought of hiddenfield but was wondering if there's a way to do without it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.