I don't think calling ToString() directly on the view is what you're looking
to do. I don't know what view types attType and attVal are, if they were
EditTexts, for example, you could some something like:

intent.PutExtra("attType",
FindViewById<EditText>(Resource.Id.attType).Text);

On Wed, Jun 22, 2011 at 11:18 AM, david.chhang <david.chh...@gmail.com>wrote:

> thanks. But, I want to adapt to use with text field and button. So I want
> to
> keep value of the texts field and pass to another activity when I click on
> the button OK.
>
> I try it but it doesn't work :
>
> public class Activity0 : Activity
>    {
>        protected override void OnCreate(Bundle bundle)
>        {
>            base.OnCreate(bundle);
>
>            SetContentView(Resource.Layout.FiltreCreation);
>
>            //On récupere le bouton souhaité et on lui affecte le Listener
>            Button bouton = (Button) FindViewById(Resource.Id.ok);
>            bouton.Click += new EventHandler(bouton_Click);
>        }
>
>        private void bouton_Click(object sender, ItemEventArgs e)
>        {
>            var intent = new Intent();
>            intent.SetClass(this, typeof(Activity1));
>            intent.PutExtra("attType",
> FindViewById(Resource.Id.attType).ToString();
>            intent.PutExtra("attValue",
> FindViewById(Resource.Id.attVal).ToString());
>            StartActivity(intent);
>        }
>    }
>
> --
> View this message in context:
> http://mono-for-android.1047100.n5.nabble.com/A-new-activity-with-parameters-of-old-activity-tp4514263p4514384.html
> Sent from the Mono for Android mailing list archive at Nabble.com.
> _______________________________________________
> Monodroid mailing list
> Monodroid@lists.ximian.com
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
>
_______________________________________________
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to