By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,091 Members | 1,546 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,091 IT Pros & Developers. It's quick & easy.

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

P: n/a
"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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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.