Last post Jan 24, 2017 11:58 PM by mgebhard
Jan 24, 2017 11:45 PM|Gleeming|LINK
I am creating two Hyperlink controls and am adding them to a GridView row as shown below. It works good, however I need to place a break between the links
so that when they are displayed, they appear on different rows in the GridView cell as opposed to side by side. I have tried adding an html break after my first hyperlnk
is set, but that does not work. Hyperlink link_1.NavigateUrl .Text ="<br>"; So how can I place a new line or break between the two hyperlinks?
protected void grdView_RowDataBound(Object sender, GridVIewRowEventsArgs e)
Hyperlink link_1 = new HyperLink();
Hyperlink link_1.NavigateUrl = "http://Microsoft.com";
Hyperlink link_2 = new HyperLink();
Hyperlink link_2.NavigateUrl = "http://Google.com";
// Add a space
Jan 24, 2017 11:58 PM|mgebhard|LINK
Add a <br />...
e.Row.Cells.Controls.Add(new LiteralControl("<br />"));