Error during of casting HiddenWebQuestion

Apr 2, 2008 at 12:58 PM
HI,

I've decide to use hidden controls inside my survey form, so during the assignment value my code doesn't ricognize the "HiddenWebQuestion" object. This is my code:

//explanation: the user object is a derivation of my facebook class!
___________________________________________________________________________________________________________
using using sstchur.web.survey;

//get user FirstName
HiddenWebQuestion hwquserfname = (HiddenWebQuestion)ws.Questions"user_fname";
if (user.FirstName != null)
{
hwquserfname.SetAnswer(user.FirstName);
}
else
{
hwquserfname.SetAnswer(string.Empty);
}
___________________________________________________________________________________________________________

The object HiddenWebQuestion isn't recognize from application. Can you help me?

Many thks,
rpruno
Apr 3, 2008 at 6:57 AM
UPDATE

Exscuse me for my last post, I've take the solution with a correct inizialization of HiddednWebQuestion object:

HiddenWebQuestion hwquserfname = new HiddenWebQuestion("hwquserfname");

Thanks ;-)

Coordinator
Apr 9, 2008 at 4:56 AM
Glad you got it figured out ;-)