Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
Shirley2 Trusted Contributor.
Trusted Contributor.
300 views

how to pass data across web pages

I call an .aspx page which has a Gridview with data from SQL tables. I select one record and then want to return to my original page which will be populated with the record selected.

I can do a Response::Redirect to the original page but this does not pass the information back.

How do I link the two pages or how do I tell the first page which record has been selected.

Many thanks

Shirley

 

0 Likes
5 Replies
WPita_MMSIS Super Contributor.
Super Contributor.

Re: how to pass data across web pages

Hello, I may be wrong but you can create a Hidden field in your html:
     <asp: TextBox ID = "TxSelAba" runat = "server" value = "tabPage1" Text = "AbaAtual" type = "hidden"> </ asp: TextBox>
     <asp: TextBox ID = "TxSelAbaAnt" runat = "server" value = "tabPage1" Text = "AbaAnt" type = "hidden"> </ asp: TextBox>
     <asp: TextBox ID = "TxSelNumAba" runat = "server" value = "0" Text = "NunAba" type = "hidden"> </ asp: TextBox>

or
        01 w Environment pic x (002).

try
           set wEnvironmentto Session ["wEnvironment"]
catch
           set Session ["environment"] to environment
end-try


I hope this helps

0 Likes
Shirley2 Trusted Contributor.
Trusted Contributor.

Re: how to pass data across web pages

Sorry I don't understand this at all.

Does the first bit of code go into the .aspx ?

Does the second part go into the .aspx.cbl ? They seem to tie up at all.

Sorry if I sound stupid but I actually am!!!

0 Likes
WPita_MMSIS Super Contributor.
Super Contributor.

Re: how to pass data across web pages

Desculpe, eu é que fui muito apressado, veja este Demo se te ajuda.

Sorry, I was very rushed, check out this demo if it helps you.

I made this demo with VC4.0 and VS2015

0 Likes
Highlighted
Shirley2 Trusted Contributor.
Trusted Contributor.

Re: how to pass data across web pages

Thank you so much for your prompt reply. and for going to so much trouble.

Obrigado!

However my problem is that I have data displayed in a gridview that comes from a SQL table. Once I have selected the row, I need that data to display in a totally different .aspx page. So I have EmpList.aspx and I want to display the data in WebForm110.aspx.

0 Likes
WPita_MMSIS Super Contributor.
Super Contributor.

Re: how to pass data across web pages

Misturei as respostas, mas acho que esse exemplo pode te auxiliar nas duas questões.

I mixed the answers, but I think that example can help you in both questions.

 

Acredito que deve ser possível passar via List[] mas não tenho nada feito para mostrar

I believe it should be possible to pass via List [] but I have nothing done to show

Good luck!

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.