Making objects retrieved inside an event global to the class

A

Andy B.

I have the following code inside a DataList.Item_Created event:

If (e.Item.ItemType = ListItemType.Header) Then
Dim TitleTextBox As TextBox =
directCast(e.Item.FindControl("TitleTextBox"), TextBox)
Dim DescriptionTextBox As TextBox =
DirectCast(e.Item.FindControl("DescriptionTextBox"), TextBox)
Dim BodyTextBox As TextBox =
DirectCast(e.Item.FindControl("BodyTextBox"), TextBox)
End If

Then later want to send the values from the event above to another page
with a custom class:

protected sub PreviewButton_Click(...)
dim SessionValues as new
SessionParameterPasser("~/Admin/Previews/News.aspx")
SessionValues("Title") = '*** The question is how to get the TextBox
values from the Item_Created event above here.
end sub

Any ideas how to do this?
 

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,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top