推薦:.net SMTP發送Email實例(可帶附件)本文為大家詳細介紹下.net SMTP發送Email同時可帶附件的具體實現思路及代碼,想實現的朋友可以參考下哈,希望對大家有所幫助 復制代碼 代碼如下: public static void sendEmail(string toAddress, string emailbody) { var fromAddress = ConfigurationManager.AppSetti
根據某列的值改變其樣式最好的方法是在GridView的DataRowBound事件中想辦法。在GridView中的行綁定數據后將立即執行 DataRowBound事件。DataRowBound事件使用GridViewRowEventargs類作為事件變量。通過事件變量你能夠利用 GridViewRowEventArgs屬性操作已經綁定數據的行。
復制代碼 代碼如下:
Row將返回TableRow類中的一個GridViewRow對象。
綁 定的Row有幾種不同的類型。例如:DataRow, EmptyDataRow, Footer, Header, Pager 和 Separator。通過GridView的RowType屬性可以得到當前行的行類型。RowType是一組DataControlRow枚舉。
看下面的代碼示例,檢測GridView列出的行是否為一個標準類型的行。
可 以使用Row的Cells屬性得到其Cells,它將返回一個TableCellCollection對象。然后通過 TableCellCollection索引得到特定的Cells。TableCellcollection索引將返回一個TabelCell對象,對應 于Row中的一個Cell:
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
string value = e.Row.Cells[0].Text;
}
}
分享:js實現廣告漂浮效果的小例子這篇文章介紹了在JS中廣告漂浮效果的實現代碼,有需要的朋友可以參考一下 復制代碼 代碼如下: html head meta http-equiv=Content-Type content=text/html; charset=gb2312 / title/title style type=text/css div{ position:absolute; } /style /head body div id=floa
新聞熱點
疑難解答
圖片精選