Script tag in GridView TamplateFiled.
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
1
2 <asp:DataList ID="list" runat="server" RepeatColumns="2" RepeatDirection="Horizontal" CellSpacing="3">
3 <ItemTemplate>
4 <table cellpadding="0" cellspacing="0" border="0" width="100%">
5 <tr>
6 <td valign="top">
7 <b>
8 <%# Eval("Name") %>
9 </b><br/><br/>
10 <script type="text/javascript" >
11 var mbord = '<%# Eval("MotherBoard")%>';
12 if(mbord!=null && mbord.length>0)
13 {
14 document.write(mbord);
15 document.write("<br/>");
16 }
17 else
18 {
19 document.write("Mother Board Not Available");
20 document.write("<br/>");
21 }
22
23 </script>
24 </td>
25 </tr>
26 </table>
27 </ItemTemplate>
28 </asp:DataList>