我有一个包含以下内容的类curprfc:
static public string CalcRFC(string firstname, string lastname, string middlename, string date)
我在代码隐藏中调用这个方法/函数,如下所示:
CURPRFC.CalcRFC(txtfirstname.text, txtlastname.text, txtmidlename.text, txtdate.text)
其中每个值都是文本框值。但是,我收到一个错误,说明:
System.Web.UI.WebControls.TextBox' does not contain a definition for 'text' and no extension method 'text' accepting a first argument of type 'System.Web.UI.WebControls.TextBox' could be found (are you missing a using directive or an assembly reference?)
我的C有点弱。我认为我需要将文本框的文本值更改为字符串,但不确定如何执行此操作。我走对了吗?
非常感谢您的帮助!
谢谢,
希德