How to make the omit working?
See the data ProductName: (every record has different numbers of characters from 0 to 50 characters )
SonyBravia - 1010987 (21 characters I'd like to see only SonyBravia)
Analog Voltage - 1007481333 (28 characters and I'd like to see Analog Voltage)
Samsung Phone Adapter – 857587 (31 characters and I’d like to see only Samsung Phone Adapter)
Jira Project Management – 1478545878903 (40 characters and I’d like to see only Jira Porject Management)
Ethernet Router 4 – 85745555 (29 characters and I’d like to see only Ethernet Router 4)
Radio 12 – 542158 (18 characters and and I’d like to see only Radio 12)
Please see code below:
<div class ="dfac">
<b><%: Html.TranslateTag("Gateway","Gateway")%>: </b>
<a style="color: #007FEB;" href="/Products/ProductHome/<%:Model.DataName.ProductID%>" title="ProductID: <%:Model.DataName.GatewayID > 0 ? Model.DataName.ProductID.ToString() : "" %>">
<%
string productName = "";
if(Model.DataName.ProductID >0)
{
Products ProductDisplay= Products.Load(Model.DataName.ProductID); //Load all products values from Dbo.Products
productName = ProductDisplay.Name;
} %>
<%: productName%> </a>
</div>
Your help is very appreciated. Thanks.