Passing data/code from code-behind to aspx

A

aratienza

I have the following code in my code-behind file:

DataGrid MAPPsDataGrid =
(DataGrid)((((((Repeater)sender).Parent).Parent).Parent).Parent);

int DocumentID = MAPPsDataGrid.DataKeys[MAPPsDataGrid.Items.Count] ;

However, I want the value of the DocumentID passed to my ASPX code. How can
this be achieved? Is it possible?

Thank you for your help.

Best regards,
Arlynn
 
H

haile

Just declare it as a public property in the page class:

public int iDocumentID = 0;

Then your ASPX code should be able to access it with ASP tags:

<%= iDocumentID %><br>

Does this help, or is there more to the question?

haile
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top