Wednesday, March 21, 2012

PassingValues

I want to make sure that all the values of my controls on my form are available in my submit button's click handler. Currently, all my controls are yielding empty values. I tried making my controls a class level object, but that does not solve it. I am having trouble figuring out how to get these values using the eventargs object. Is there a good way of sending the controls current values as parameters to the handler method?To access properties and methods in User Controls, you need to add a line declaring the control in the CodeBehind.

C#
protected {Control Class Name} {Control Name on Form};

VB.NET
Protected {Control Name on Form} As {Control Class Name}

0 comments:

Post a Comment