i want to change font_style (hyper link<a href...>text</a>) normal to italics,when load a page..?

Discussion in 'ASP .Net' started by ajaspersonal@gmail.com, Mar 9, 2007.

  1. Guest

    "i want to change font_style (hyper link<a href...>text</a>) normal to
    italics.when load a page"
    this is my problem

    but

    that label included in one 'USERCONTROL'
    This user controls may condain 4 link
    (<a href...>page1.aspx</a> <br> <a href ....>page2</a> etc..).
    that will redirect another page ex:(page1.aspx).

    when program run, the home page(page1.aspx) will come and it condain
    that 'usercontrol' and if we click third link then it show third page

    Here the loaded page (page3.aspx) also condain the above same
    'usercontrol'

    but here i want to see the loaded page's link(usercontrol's) in
    italics

    ALL other links should be in normal font(then user can easly identify
    which page is loaded)

    any chance...?

    user controles condain html codings..
     
    , Mar 9, 2007
    #1
    1. Advertising

  2. Try following.

    in UserControl.ascx

    <a runat="server" id="linkXid" href="somelink" >text</a>

    with code-behind

    public bool linkXItalic
    {
    set
    {
    linkXid.Style["font-style"] = value? "italic": "normal";
    }
    }

    in page1.aspx
    <tag:UserControl1 runat="server" id="UserControl1InstancePage1"
    linkXItalic="false" />

    in page3.ascx
    <tag:UserControl1 runat="server" id="UserControl1InstancePage1"
    linkXItalic="true" />
     
    Muhammad Naveed Yaseen, Mar 9, 2007
    #2
    1. Advertising

  3. Try following.

    in UserControl.ascx


    <a runat="server" id="linkXid" href="somelink" >text</a>


    with code-behind


    public bool linkXItalic
    {
    set
    {
    linkXid.Style["font-style"] = value? "italic": "normal";
    }



    }


    in page1.aspx
    <tag:UserControl1 runat="server" id="UserControl1InstancePage1"
    linkXItalic="false" />

    in page3.aspx
    <tag:UserControl1 runat="server" id="UserControl1InstancePage3"
    linkXItalic="true" />
     
    Muhammad Naveed Yaseen, Mar 9, 2007
    #3
  4. Guest

    On Mar 9, 12:07 pm, "Muhammad Naveed Yaseen" <>
    wrote:
    > Try following.
    >
    > in UserControl.ascx
    >
    > <a runat="server" id="linkXid" href="somelink" >text</a>
    >
    > with code-behind
    >
    > public bool linkXItalic
    > {
    > set
    > {
    > linkXid.Style["font-style"] = value? "italic": "normal";
    > }
    >
    > }
    >
    > in page1.aspx
    > <tag:UserControl1 runat="server" id="UserControl1InstancePage1"
    > linkXItalic="false" />
    >
    > in page3.aspx
    > <tag:UserControl1 runat="server" id="UserControl1InstancePage3"
    > linkXItalic="true" />


    Thanks for reply but...

    wher wnt 2 write following code...

    public bool linkXItalic
    {
    set
    {
    linkXid.Style["font-style"] = value? "italic": "normal";
    }

    }
     
    , Mar 9, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Meheraj shaik via .NET 247

    Hyper link in Datagrid

    Meheraj shaik via .NET 247, May 28, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    2,526
  2. Hemant

    Wrap text in Hyper link

    Hemant, Feb 3, 2010, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    857
    Nathan Sokalski
    Feb 4, 2010
  3. Vamsi Krishna

    show text in italics.

    Vamsi Krishna, Jul 18, 2008, in forum: Ruby
    Replies:
    6
    Views:
    127
    Vamsi Krishna
    Jul 21, 2008
  4. Soren Vejrum
    Replies:
    4
    Views:
    687
    Lasse Reichstein Nielsen
    Jul 5, 2003
  5. pavi
    Replies:
    0
    Views:
    1,369
Loading...

Share This Page