G
Guest
Hello,
When a person subits my web page, I do a simple check (validation) and if
there are any errors, I create a variable (strValidateText) and set that
value to a label on the form. What I am trying to do create an image button
along with the html. I am getting the error: Operator '&' is not defined
for types 'String' and 'System.Web.UI.WebControls.ImageButton'.
Sub Submit_Click(ByVal Src As Object, ByVal Args As CommandEventArgs)
If Trim(Me.ddlRequestType.SelectedItem.Text) = "None Selected" Then
Dim ibRequestType As ImageButton = New ImageButton
ibRequestType.OnClientClick = "txtServicesTerminationCount.focus()"
ibRequestType.ImageUrl = "../../images/art_dbflash_go.jpg"
strValidateText = _
"<tr>" & _
"<td width=200 class=sckArial_BlkB08><div align=left>Request Type
DropDown </div></td>" & _
"<td width=400 class=sckArial_BlkM08><div align=left>Please select a
Request Type." & _
ibRequestType & </div></td></tr>"
strValidateForm = "Validation Error"
End If
End Sub
If strValidateForm = "Validation Error" Then Me.lblValidateForm.Text =
strValidateText
End Sub
When a person subits my web page, I do a simple check (validation) and if
there are any errors, I create a variable (strValidateText) and set that
value to a label on the form. What I am trying to do create an image button
along with the html. I am getting the error: Operator '&' is not defined
for types 'String' and 'System.Web.UI.WebControls.ImageButton'.
Sub Submit_Click(ByVal Src As Object, ByVal Args As CommandEventArgs)
If Trim(Me.ddlRequestType.SelectedItem.Text) = "None Selected" Then
Dim ibRequestType As ImageButton = New ImageButton
ibRequestType.OnClientClick = "txtServicesTerminationCount.focus()"
ibRequestType.ImageUrl = "../../images/art_dbflash_go.jpg"
strValidateText = _
"<tr>" & _
"<td width=200 class=sckArial_BlkB08><div align=left>Request Type
DropDown </div></td>" & _
"<td width=400 class=sckArial_BlkM08><div align=left>Please select a
Request Type." & _
ibRequestType & </div></td></tr>"
strValidateForm = "Validation Error"
End If
End Sub
If strValidateForm = "Validation Error" Then Me.lblValidateForm.Text =
strValidateText
End Sub