ASPX templates
Version 5.x > ASPX templates > Unable to cast object of type 'ASP.cmsformcontrols_usphone_ascx' to type 'System.Web.UI.WebControls.TextBox'. View modes: 
User avatar
Member
Member
hotfrost-gmail - 1/8/2010 4:24:36 PM
   
Unable to cast object of type 'ASP.cmsformcontrols_usphone_ascx' to type 'System.Web.UI.WebControls.TextBox'.
Question One:
I am using BizForms as a short cut for uploading some data into Doc objects.
where as I have no problem to identify and fill the form fields of text type,
when I am trying to get the data into Phone field (bizForm Phone type), i am getting the following error:
Unable to cast object of type 'ASP.cmsformcontrols_usphone_ascx' to type 'System.Web.UI.WebControls.TextBox'. Where that type ASP.cmsformcontrols_usphone_ascx' is defined, what namespace?

Question Two:
will follow

Thanks in advance!

User avatar
Member
Member
hotfrost-gmail - 1/11/2010 12:25:34 PM
   
RE:Unable to cast object of type 'ASP.cmsformcontrols_usphone_ascx' to type 'System.Web.UI.WebControls.TextBox'.
So,

how do I populate in code the BizForm's filed of type phone/ZipCode and etc - not standard TextBox?

thanks,

Alex

User avatar
Kentico Developer
Kentico Developer
kentico_martind - 1/19/2010 2:32:53 AM
   
RE:Unable to cast object of type 'ASP.cmsformcontrols_usphone_ascx' to type 'System.Web.UI.WebControls.TextBox'.
Hi Alex,

You can re-type control to CMS.FormControls.FormEngineUserControl class which is general class for form controls which all form controls are inheriting from. You can get the value using its 'Value' property.

Best Regards,

Martin Dobsicek