469,647 Members | 1,808 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,647 developers. It's quick & easy.

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

"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</aetc..).
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 '07 #1
3 2738
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" />

Mar 9 '07 #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.aspx
<tag:UserControl1 runat="server" id="UserControl1InstancePage3"
linkXItalic="true" />
Mar 9 '07 #3
On Mar 9, 12:07 pm, "Muhammad Naveed Yaseen" <mnyas...@gmail.com>
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 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Francesco Moi | last post: by
2 posts views Thread by Hernán Castelo | last post: by
3 posts views Thread by Sonija | last post: by
17 posts views Thread by The Numerator | last post: by
1 post views Thread by Doug.Sheahan | last post: by
9 posts views Thread by Arancaytar | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.