Passing values between URL in EP

Hi,

Below code used in C# to pass the values between EP pages.

From A button click :

Response.Redirect(“URL?EmplId=” + EmplId);

Form B init : capture the passed record in c# page init method

protected void Page_init(object sender, EventArgs e)
{
_emplId = Request.QueryString[“EmplId”];
Proxy.Info objInfoLog = new Proxy.Info(this.AxSession.AxaptaAdapter);
objInfoLog.add(Proxy.Exception.Error, Emplid);

}

Passing the captured value back to the Data set which is used by form B :

protected void Page_init(object sender, EventArgs e)
{
this.AxDataSource1.CreatingDataSetRun += new EventHandler<CreatingDataSetRunEventArgs>(AxDataSource1_CreatingDataSetRun);
}

void AxDataSource1_CreatingDataSetRun(object sender, CreatingDataSetRunEventArgs e)
{
string parm;
e.DataSetRunArgs.parm = _emplId;
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s