simple question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Manny Chohan

    simple question

    hi guys, i am creating Hyperlink control in the codebehind and adding it to
    the panel.
    The problem is that they are ending up next to each other without any space
    between them.
    can someone recomend based on my code how i can get a space about a tab
    between each hyperlinks.
    here is my code:

    HyperLink MyHyperLink = new HyperLink();
    MyHyperLink.Nav igateUrl = attachment[k].Address.ToStri ng();
    MyHyperLink.Tex t =attachment[k].FileName.ToStr ing();
    HyperLink space = new HyperLink();
    space.Text=" ";
    LHW_PanelAttach ment.Controls.A dd(MyHyperLink) ;
    LHW_PanelAttach ment.Controls.A dd(space);

    thanks
    Manny
  • Manny Chohan

    #2
    RE: simple question

    How about createing hyperlinks in seperate lines. Either way will help

    "Manny Chohan" wrote:
    [color=blue]
    > hi guys, i am creating Hyperlink control in the codebehind and adding it to
    > the panel.
    > The problem is that they are ending up next to each other without any space
    > between them.
    > can someone recomend based on my code how i can get a space about a tab
    > between each hyperlinks.
    > here is my code:
    >
    > HyperLink MyHyperLink = new HyperLink();
    > MyHyperLink.Nav igateUrl = attachment[k].Address.ToStri ng();
    > MyHyperLink.Tex t =attachment[k].FileName.ToStr ing();
    > HyperLink space = new HyperLink();
    > space.Text=" ";
    > LHW_PanelAttach ment.Controls.A dd(MyHyperLink) ;
    > LHW_PanelAttach ment.Controls.A dd(space);
    >
    > thanks
    > Manny[/color]

    Comment

    • Karl Seguin

      #3
      Re: simple question

      The problem is you are using spaces instead of   (non-breasking
      space)...consid er:

      HyperLink MyHyperLink = new HyperLink();
      MyHyperLink.Nav igateUrl = attachment[k].Address.ToStri ng();
      MyHyperLink.Tex t =attachment[k].FileName.ToStr ing();
      LHW_PanelAttach ment.Controls.A dd(MyHyperLink) ;
      Literal lit = new Literal();
      lit.Text = "   &nb sp;   ";
      LHW_PanelAttach ment.Controls.A dd(lit);

      (wasn't sure why your spaces had to be in a hyperlink control, so I put them
      in a literal instead, seems to make more sense from what you showed up). If
      you need more formatting, you'll need to use a table or something.

      Karl

      --
      MY ASP.Net tutorials
      Programming blog exploring Zig, Elixir, Go, Testing, Design and Performance



      "Manny Chohan" <MannyChohan@di scussions.micro soft.com> wrote in message
      news:0FEC79F8-4A86-4AA3-8996-0E87DE7E4C21@mi crosoft.com...[color=blue]
      > How about createing hyperlinks in seperate lines. Either way will help
      >
      > "Manny Chohan" wrote:
      >[color=green]
      > > hi guys, i am creating Hyperlink control in the codebehind and adding it[/color][/color]
      to[color=blue][color=green]
      > > the panel.
      > > The problem is that they are ending up next to each other without any[/color][/color]
      space[color=blue][color=green]
      > > between them.
      > > can someone recomend based on my code how i can get a space about a tab
      > > between each hyperlinks.
      > > here is my code:
      > >
      > > HyperLink MyHyperLink = new HyperLink();
      > > MyHyperLink.Nav igateUrl = attachment[k].Address.ToStri ng();
      > > MyHyperLink.Tex t =attachment[k].FileName.ToStr ing();
      > > HyperLink space = new HyperLink();
      > > space.Text=" ";
      > > LHW_PanelAttach ment.Controls.A dd(MyHyperLink) ;
      > > LHW_PanelAttach ment.Controls.A dd(space);
      > >
      > > thanks
      > > Manny[/color][/color]


      Comment

      • Manny Chohan

        #4
        Re: simple question

        Thanks karl, ill try this

        "Karl Seguin" wrote:
        [color=blue]
        > The problem is you are using spaces instead of (non-breasking
        > space)...consid er:
        >
        > HyperLink MyHyperLink = new HyperLink();
        > MyHyperLink.Nav igateUrl = attachment[k].Address.ToStri ng();
        > MyHyperLink.Tex t =attachment[k].FileName.ToStr ing();
        > LHW_PanelAttach ment.Controls.A dd(MyHyperLink) ;
        > Literal lit = new Literal();
        > lit.Text = " ";
        > LHW_PanelAttach ment.Controls.A dd(lit);
        >
        > (wasn't sure why your spaces had to be in a hyperlink control, so I put them
        > in a literal instead, seems to make more sense from what you showed up). If
        > you need more formatting, you'll need to use a table or something.
        >
        > Karl
        >
        > --
        > MY ASP.Net tutorials
        > http://www.openmymind.net/
        >
        >
        > "Manny Chohan" <MannyChohan@di scussions.micro soft.com> wrote in message
        > news:0FEC79F8-4A86-4AA3-8996-0E87DE7E4C21@mi crosoft.com...[color=green]
        > > How about createing hyperlinks in seperate lines. Either way will help
        > >
        > > "Manny Chohan" wrote:
        > >[color=darkred]
        > > > hi guys, i am creating Hyperlink control in the codebehind and adding it[/color][/color]
        > to[color=green][color=darkred]
        > > > the panel.
        > > > The problem is that they are ending up next to each other without any[/color][/color]
        > space[color=green][color=darkred]
        > > > between them.
        > > > can someone recomend based on my code how i can get a space about a tab
        > > > between each hyperlinks.
        > > > here is my code:
        > > >
        > > > HyperLink MyHyperLink = new HyperLink();
        > > > MyHyperLink.Nav igateUrl = attachment[k].Address.ToStri ng();
        > > > MyHyperLink.Tex t =attachment[k].FileName.ToStr ing();
        > > > HyperLink space = new HyperLink();
        > > > space.Text=" ";
        > > > LHW_PanelAttach ment.Controls.A dd(MyHyperLink) ;
        > > > LHW_PanelAttach ment.Controls.A dd(space);
        > > >
        > > > thanks
        > > > Manny[/color][/color]
        >
        >
        >[/color]

        Comment

        Working...