Reputation: 53
Hello i have a question how to pass data from one view to other in mono-touch, for example i have a project with two views (view1, view2). Both views has Textfields and i want to write something to textfield1 of view1 and when i navigate to view2 the textfield2 of view2 has to take the value of textfield1.
Upvotes: 1
Views: 407
Reputation: 89169
Create a public property on View2 and call it MyTextValue. When View1 instantiates View2, it can pass the value in by setting that property (you could also do it through an overloaded constructor).
Upvotes: 1