473,322 Members | 1,671 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

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 2916
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Francesco Moi | last post by:
Hello. I'm trying to build a RSS feed for my website. It starts: ----------------//--------------------- <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE rss PUBLIC "-//Netscape...
2
by: Hernán Castelo | last post by:
hi i'm trying to do : <link rel="stylesheet" type="text/css" href="myurl..../inc/css/style.css"/> from the url field of the browser i can normally open the "style.css" with notepad but thru...
3
by: Sonija | last post by:
I found that I can use <LINK REL = "stylesheet" TYPE = "mime/type" HREF = "styles.css"> to use the CSS file of my project. But it seems it's not working. Is HREF = "styles.css" not sufficient or...
5
by: Jake Barnes | last post by:
Very odd. Check out this RSS feed that my PHP script just built: http://www.tagcastle.com/rss/photography.xml When I had a straight URL in the <link> tag, or the <comment> tag, then "="...
1
by: Baldoni | last post by:
It's been years since putting together a page. This line in my HTML: <link type="text/css" rel="stylesheet" href="net4801style.css"> gives this problem (via weblint HTML checker): attribute...
17
by: The Numerator | last post by:
I know a lot about HTML, but all this time I don't know what the <LINK> tags in the head do. There are those that call a stylesheet, favicon, etc. But what about those that state the contents of...
1
by: Doug.Sheahan | last post by:
I am attempting to parse and xml file using javascript but am running into a problem when parsing a <link></link> pair. For example, the link information in most RSS feeds is given as <link> ...
6
by: Spartanicus | last post by:
I'd like to execute a function when a <link rel="next" href="foo.htm"> type element is used. Although the "onclick" handler is allowed on the element, presumably because the functionality of the...
9
by: Arancaytar | last post by:
I have so far seen two methods for including external resources as CSS stylesheets in a document. The first is this: <link href="/stylesheets/style.css" rel="stylesheet" type="text/css" /> And...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.