我正在建立一个用于URL缩短的网站。我想为创建的每个短链接显示不同的缩略图和描述。我当前的文本字段是:
原始网址(例如Google.com)
跟踪代码
OG图片
OG描述
新的短网址(我的域名/跟踪代码)
当我在Facebook或任何社交媒体上复制新的短URL时,它将从数据库生成自定义缩略图和描述。
我当前的实现是:
<table id="tblEmployeexx" class="table table-bordered table-striped">
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="id" DataSourceID="BindGrid">
<Columns>
<asp:BoundField DataField="id" HeaderText="id" ReadOnly="True" InsertVisible="False" SortExpression="id"></asp:BoundField>
<asp:BoundField DataField="OrignalUrl" HeaderText="OrignalUrl" SortExpression="OrignalUrl"></asp:BoundField>
<asp:TemplateField HeaderText="Test">
<ItemTemplate>
<a href='<%# Eval("OrignalUrl") %>' target="_blank"><%# Eval("NewUrl") %></a>
</ItemTemplate>
</asp:TemplateField>
<%--<asp:BoundField DataField="NewUrl" HeaderText="New Url" SortExpression="NewUrl"></asp:BoundField>--%>
<asp:BoundField DataField="TrackingCode" HeaderText="Tracking Code" SortExpression="TrackingCode"></asp:BoundField>
<asp:BoundField DataField="ThumbnailImage" HeaderText="Thumbnail Image" SortExpression="ThumbnailImage"></asp:BoundField>
<asp:BoundField DataField="ThumbnailTitle" HeaderText="ThumbnailTitle" SortExpression="ThumbnailTitle"></asp:BoundField>
<asp:BoundField DataField="ThumbnailDescription" HeaderText="ThumbnailDescription" SortExpression="ThumbnailDescription"></asp:BoundField>
<asp:BoundField DataField="Timespan" HeaderText="Timespan" SortExpression="Timespan"></asp:BoundField>
</Columns>
</asp:GridView>