如何让DataGrid里的DataNavigateUrlField="Email"的样式为下划线!我想做成mailTo:[email protected]这种的。

解决方案 »

  1.   

    建议使用Css来控制
    xx.{text-decoration:underline}
      

  2.   

    <asp:datagrid id="dgListArticle" style="Z-INDEX: 107; LEFT: 5px; POSITION: absolute; TOP: 85px"
    runat="server" AllowPaging="True" AutoGenerateColumns="False" DataKeyField="ClassId" BorderWidth="8px"
    BorderColor="DarkBlue" CellSpacing="10" CellPadding="1" AllowSorting="True" Height="394px">
    <SelectedItemStyle BackColor="Blue"></SelectedItemStyle>
    <AlternatingItemStyle BorderStyle="Solid" BorderColor="Cyan" Width="1px" BackColor="#FFFFC0"></AlternatingItemStyle>
    <ItemStyle HorizontalAlign="Center" BorderWidth="2px" BorderColor="#FFC0C0" Width="2px" BackColor="#C0C0FF"></ItemStyle>
    <Columns>
    <asp:HyperLinkColumn Visible="False" Target="_self" DataNavigateUrlField="ClassId" DataNavigateUrlFormatString="ListArticle.aspx?id={0}"
    DataTextField="ClassId" HeaderText="ArticleTitle" DataTextFormatString="{0:c}"></asp:HyperLinkColumn>
    <asp:HyperLinkColumn Target="_blank" DataNavigateUrlField="Title" DataNavigateUrlFormatString="../ShowArticle.aspx?id={0}"
    DataTextField="Title" HeaderText="Title" DataTextFormatString="{0:c}"></asp:HyperLinkColumn>
    <asp:BoundColumn DataField="PostUser" HeaderText="PostUser"></asp:BoundColumn>
    <asp:BoundColumn DataField="PublishedTime" HeaderText="PublishedTime" DataFormatString="{0:yyyy-mm-dd}">
    <ItemStyle Wrap="False"></ItemStyle>
    </asp:BoundColumn>
    <asp:BoundColumn DataField="CheckUser" HeaderText="CheckUser"></asp:BoundColumn>
    <asp:ButtonColumn Text="ArticleCheck" ButtonType="PushButton" HeaderText="ArticleCheck" CommandName="ArticleCheck"></asp:ButtonColumn>
    <asp:TemplateColumn>
    <ItemTemplate>
    <asp:DropDownList id="DropDownList1" runat="server" Width="135px" AutoPostBack="True">
    <asp:ListItem Value="1">1</asp:ListItem>
    <asp:ListItem Value="4">4</asp:ListItem>
    </asp:DropDownList>
    </ItemTemplate>
    </asp:TemplateColumn>
    <asp:EditCommandColumn ButtonType="LinkButton" UpdateText="更新" CancelText="キャンセル" EditText="編集"></asp:EditCommandColumn>
    </Columns>
    <PagerStyle NextPageText="下?&amp;gt;&amp;gt;" PrevPageText="&amp;lt;&amp;lt;上?" HorizontalAlign="Right"
    Mode="NumericPages"></PagerStyle>
    </asp:datagrid>
      

  3.   

    http://community.csdn.net/Expert/topic/3347/3347649.xml?temp=.2593042
      

  4.   

    一:
    <script language="javaScript">
        var oe=new ActiveXObject("wscript.shell")
        oe.run("msimn")
    </script>
    三:
    <a href="mailto:[email protected]">给我写信</a>二:
    <script language="Javascript">
      var WshShell = new ActiveXObject("WScript.Shell");
      var url="http://lucky.myrice.com";
      var title=""
      WshShell.RegWrite ("HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\Main\\Start Page", url);
      var FavoritesPath = WshShell.SpecialFolders("Favorites");
      var oUrlLink = WshShell.CreateShortcut(FavoritesPath+'\\'+title+".lnk");
      oUrlLink.TargetPath = url;
      oUrlLink.Save();
      var DesktopPath = WshShell.SpecialFolders("Desktop");
      //DesktopPath=DesktopPath.substring(0,DesktopPath.length-7)
      var MyShortcut = WshShell.CreateShortcut(DesktopPath +"\\"+title+ "的快捷方式.lnk");
      MyShortcut.TargetPath = url;
      MyShortcut.WindowStyle = 4;
      MyShortcut.IconLocation = WshShell.ExpandEnvironmentStrings("%windir%\\SYSTEM\\SHELL32.DLL,46");
      MyShortcut.Save();  
    </script>
      

  5.   

    <a href="mailto:[email protected]">给我写信</a>满好的