Url how it only displays the Title only
Hello, everyoneUrl how it only displays the Title only
this Url :http://localhost:3640/Testsolusion/details.aspx?title_article=Examle+Link+details&contents=Hello+this+example+link+details..asp.net
Make this my code:
<asp:Repeater ID="listarticle" runat="server">
<HeaderTemplate> <center> <b> EXAMPLE ARTICLE IN MY WEBSITE </ b> </ center> <hr /> </ HeaderTemplate>
<ItemTemplate>
<br />
<asp: HyperLink ID = "HyperLink1" runat = "server" NavigateUrl = '<% # DataBinder.Eval (Container.DataItem, "title_article", "details.aspx? type = {0}")%>' Text = "View "Font-Size =" Large "ForeColor =" # 33CC33 "> View details </ asp: HyperLink>
<br />
<br />
<asp: Label ID = "lblcontents" runat = "server" Text = '<% # Eval ("contents"). ToString (). Length> 200? Eval ("contents"). ToString (). Substring (0,200): Eval ("contents"). ToString ()%> 'Font-Bold = "false" ForeColor = "# 000000"> </ asp: Label>
<p>
<asp: HyperLink ID = "HyperLink2" runat = "server" NavigateUrl = '<% # string.Format ("details.aspx? title_article = {0} & contents = {1}",
HttpUtility.UrlEncode (Eval ("title_article"). ToString ()), HttpUtility.UrlEncode (Eval ("contents"). ToString ()))%> '
Text = "View Details" /> <br />
<br />
<asp: Label ID = "lbldate" runat = "server" Text = '<% # Eval ("date_post")%>'> </ asp: Label>
</ p>
<hr />
</ ItemTemplate>
</ asp: Repeater>
Code behind:
If (IsPostBack)
{
lbltitle.Text = HttpUtility.UrlDecode (Request.QueryString ["title_article"]);
lblcontents.Text = HttpUtility.UrlDecode (Request.QueryString ["contents"]);
}