Skip to main content

Passing data or values from .aspx to TA form

Article # 301952 - Page views: 440


Question / Problem

 How to pass data/values from .aspx page to TA form? 


Answer / Solution

This can be achieved in KTA7 by adding the value of control to a client side session variable in .aspx page and creating a KTA global variable with the same name as session variable name in .aspx.

Below are the steps to check this in a sample pages

    1. Take a .aspx page with a button control in a .net solution.

    2. Add below JAVA script function to this page to add client side session.

function SetSession() {

             sessionStorage.setItem("Param1", "Param1Value1")


3.  Call this method for button so that the session variable will be set when button was clicked. (Button1.Attributes.Add("onclick", "SetSession()" – add this in page_load)

4.  Take a form in TA and add a button, textbox and an EmbeddedWebPage - controls.

5.  Set the above .aspx url to EmbeddedWebPage-control. 

6.  Create a Global variable in TA with the same name as session variable name in .aspx (i.e “Param1” in this example).

7.  Add a same page event for button to set value of global variable (Param1) to the textbox.

Keywords: .aspx, .net, pass, KTA7

  • Was this article helpful?