i have a datagrid and one Columns of them is an email and i want to make the mail open like in <mailto > tag in html
mosmar
0
Newbie Poster
Recommended Answers
Jump to Postuse this for your datagrids ItemDataBound event handler
assuming that the email is in the fourth column:private void DataGrid1_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e) { if ((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType == ListItemType.AlternatingItem)) { string sLnk = "<a href='mailto:"+ e.Item.Cells[3].Text+ "'>"+ e.Item.Cells[3].Text +"</a>"; e.Item.Cells[3].Text = sLnk; } }
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.