Murray Brown
asked on
ASP.net VB.net wrap butto link in table cell
Hi
I am trying to build an html button for an email where the button is wrapped in a table cell using the following code. It isn't working properly as shown in the attached image
Dim oLinkAccept As String = "http://SteelYard.azurewebsites.net/offers_to_me?oOfferID=" & oNewOfferID & "&oOfferAcceptDecline=Acce pt"
oHBody = oHBody & TableCellWrapper("<a href=" & oLinkAccept & " style='padding: 8px 12px; border: 1px solid #006400;border-radius: 2px;font-family: Helvetica, Arial, sans - serif;font-size: 14px; color: #006400;text-decoration: none;font-weight:bold;disp lay: inline-block;' >ACCEPT</a>")
Function TableCellWrapper(ByVal X As String) As String
Dim S As String
S = "<table width = '100%' cellspacing='0' cellpadding='0'>"
S &= S & "<tr>"
S &= S & "<td>"
S &= S & "<table cellspacing = '0' cellpadding='0'>"
S &= S & "<tr>"
S &= S & "<td style = 'border-radius: 2px;' bgcolor='#ED2939'>"
'<a Class=”link” href="https://www.copernica.com" target="_blank">
'Click
'</a>
S &= S & X
S &= S & "</td>"
S &= S & "</tr>"
S &= S & "</table>"
S &= S & "</td>"
S &= S & "</tr>"
S &= S & "</table>"
TableCellWrapper = S
End Function
I am trying to build an html button for an email where the button is wrapped in a table cell using the following code. It isn't working properly as shown in the attached image
Dim oLinkAccept As String = "http://SteelYard.azurewebsites.net/offers_to_me?oOfferID=" & oNewOfferID & "&oOfferAcceptDecline=Acce
oHBody = oHBody & TableCellWrapper("<a href=" & oLinkAccept & " style='padding: 8px 12px; border: 1px solid #006400;border-radius: 2px;font-family: Helvetica, Arial, sans - serif;font-size: 14px; color: #006400;text-decoration: none;font-weight:bold;disp
Function TableCellWrapper(ByVal X As String) As String
Dim S As String
S = "<table width = '100%' cellspacing='0' cellpadding='0'>"
S &= S & "<tr>"
S &= S & "<td>"
S &= S & "<table cellspacing = '0' cellpadding='0'>"
S &= S & "<tr>"
S &= S & "<td style = 'border-radius: 2px;' bgcolor='#ED2939'>"
'<a Class=”link” href="https://www.copernica.com" target="_blank">
'Click
'</a>
S &= S & X
S &= S & "</td>"
S &= S & "</tr>"
S &= S & "</table>"
S &= S & "</td>"
S &= S & "</tr>"
S &= S & "</table>"
TableCellWrapper = S
End Function
ASKER
Thanks but that doesn't work. It causes the buttons to repeat as shown in the image. So nothing has changed
Image1.jpg
Image1.jpg
You must have a result similar to the attached image. Verify.
20190913_212213.jpg
20190913_212213.jpg
ASKER
No I am looking for just one button
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
Open in new window