Click here to Skip to main content
16,014,662 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a web user control menu of page. Now I want HOME text in menu to be Bold at the time default.aspx Loaded (Load event)!
How can I do that If any one can provide code! I am using VB .Net at back.

<%@ Control Language="VB" AutoEventWireup="false" CodeFile="menuwuc.ascx.vb" Inherits="menuwuc" %>
<link href="menustyle.css" rel="stylesheet" type="text/css" />
<center>
<div >
<img src="image1.gif" height="100px" width="902px"/>
</div>
<table width="902px" border="0" cellpadding="0" cellspacing="0" background="img/header-background1.gif">
<tr>
<td width="80px" class="menu" align="center"><a href="#" class="menu" title="Tutorial home page">HOME</a></td>
<td width="80px" class="menu" align="center"><a href="#" class="menu" title="HTML tutorial">about us</a></td>
<td width="80px" class="menu" align="center"><a href="#" class="menu" title="CSS tutorial">Whats New</a></td>
<td width="80px" class="menu" align="center"><a href="#" class="menu" title="SQL tutorial">Services</a></td>
</tr>
</table>
</center>
Posted
Updated 17-Aug-10 7:54am
v3
Comments
R. Giskard Reventlov 17-Aug-10 9:11am    
What have you already tried? What issues did you come up against?
[no name] 17-Aug-10 9:35am    
I tried to make an object of Web user control and acces attributes of element by object but couldnt!
Sandeep Mewara 17-Aug-10 13:02pm    
Post your menu code. It should be having some items in it. The way it is represented should have something on which you can apply styles. Use 'Improve Question' link to update question.

1 solution

Sunil Tarwara

Since you are using the plain HTML i.e.
a href="#" class="menu" title="Tutorial home page">HOME
without adding even the htmlcontrols, I feel it is difficult to do that.

I suggest to use the controls (either HTML or ASP), so that you can handle at code behind.
 
Share this answer
 
Comments
[no name] 21-Aug-10 7:51am    
Yes sure I will use any control. What will be the code if i use ASP label.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900