Mason_vbulletin3_import15105
New Member
Hey everyone-<BR>I'm new to ASP.net. I have a form with a textbox on it that looks like this:<BR><BR> <asp:TextBox id="LargeCaption" <BR> TextMode=MultiLine <BR> Rows=5 <BR> Columns=30 runat="server"></asp:TextBox><BR> <BR>When I try to concatenate it's text into a SQL string though, I get this compile-time error:<BR><BR>Compiler Error Message: BC30452: Operator '&' is not defined for types 'String' and 'System.Web.UI.WebControls.TextBox'.<BR>Source Error:<BR><BR> strInsert &= "Filename,SmallCaption,LargeCaption,Price) "<BR> strInsert &= " VALUES ('" & c & "','" & SmallCaption.Text<BR>this line is the one that chokes----> strInsert &= "','" & LargeCaption.Text & "'," & price & ")"<BR><BR>I'm sure this is a retard-level error, could someone please help me out?<BR> <BR>try this...<BR><BR>strInsert &= "Filename,SmallCaption,LargeCaption,Price) " <BR>strInsert &= " VALUES ('" & c & "','" & SmallCaption.Text &"', "<BR>strInsert &= " '" & LargeCaption.Text & "'," & price & ")" <BR>