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

A

ajaspersonal

"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..
 
M

Muhammad Naveed Yaseen

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" />
 
M

Muhammad Naveed Yaseen

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" />
 
A

ajaspersonal

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";
}

}
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top