You must Sign In to post a response.
  • Category: [Competition Entries]

    Url how it only displays the Title only

    Hello, everyone
    Url how it only displays the Title only

    this Url :http://localhost:3640/Testsolusion/details.aspx?title_article=Examle+Link+details&

    Make this my code:

    <asp:Repeater ID="listarticle" runat="server">
    <HeaderTemplate> <center> <b> EXAMPLE ARTICLE IN MY WEBSITE </ b> </ center> <hr /> </ HeaderTemplate>
    <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>

    <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"]);
  • #747508

    Please check <Title> tag inside the <Head>. Title for IE is displayed from <Title> tag and not from the other controls tag.
    Hope it helps

    Happy Coding

  • #747512

    I am not very clear what exactly you are looking for. Are you talking about the title or the URL?

    If you are looking for the title then you have to specify the page title in your .aspx pafe inside the <title>test</title>

    If you are talking about the URL then you may use URL rewrite technique to show the different URL from the actual.
    URL rewriting sample code can be found in below DNS resource:
    Or refer scottgu's blog for complete

    Asheej T K

  • #747524

    Its not clear what you want to ask here. But if you are looking for the title ie. once you run the code in the browser, if the tab of the browser is displaying localhost...something. Then you need to check the <title> </title> tag of the head section of your .aspx page. Whatever you will write there it will display in tabs of the browser.

    Ashutosh Jha

  • #747574
    I just wanted to show this in the url: http://localhost:3640/Test Solution / details.aspx? type = examle Link details

    and appears in the browser page content of the article

    instead of: http://localhost:3640/Testsolusion/details.aspx?title_article=Examle+Link+details&

    databas I Create:

    Id (int)
    title_article (varchar),
    contens (text),
    Date_post (date)

  • Sign In to post your comments