M
MikeD
Ok,
How do I assign a value to a parameter? I would like to assign the text of a
web control to a parameter for addition into a database. I currently create
the parameter in the code-behind as:
Me.SqlUpdateCommand1.Parameters.Add(New
System.Data.SqlClient.SqlParameter("@strText",
System.Data.SqlDbType.VarChar, 500, "strText"))
I've tried:
Me.SqlUpdateCommand1.Parameters("@strText").Value = Me.strField.Text
.... but it keeps on coming back claiming that strField is not a member
within the class. I've had to manually create strField as it's contained
within a Repeater web data control, so do I also need to some how reference
it in the code behind?
Any thoughts appreciated,
<M>ike
How do I assign a value to a parameter? I would like to assign the text of a
web control to a parameter for addition into a database. I currently create
the parameter in the code-behind as:
Me.SqlUpdateCommand1.Parameters.Add(New
System.Data.SqlClient.SqlParameter("@strText",
System.Data.SqlDbType.VarChar, 500, "strText"))
I've tried:
Me.SqlUpdateCommand1.Parameters("@strText").Value = Me.strField.Text
.... but it keeps on coming back claiming that strField is not a member
within the class. I've had to manually create strField as it's contained
within a Repeater web data control, so do I also need to some how reference
it in the code behind?
Any thoughts appreciated,
<M>ike