Solved

asp.net label

Posted on 2014-10-11
1
281 Views
Last Modified: 2014-10-24
Below this single line of code, I want to read the asp:label value
Now I have: <a href="Category.aspx?category=<%# Eval("typeName") %>&brand=HP">

And

I want to change like <a href="Category.aspx?category=<%# Eval("typeName") %>&brand=<%= brandHP.Value %>">

How can I do that?


<a href="#" class="dropdown-toggle" data-toggle="dropdown">
               
<asp:Label runat="server" ID="brandHP" Text="HP"></asp:Label>
               
</a>
                <ul class="dropdown-menu mega-menu">
                                       
<li class="yamm-content">
                       
<div class="row">
                           
<div class="col-md-12">
                               
<ul class="list-unstyled">
                                   
<asp:DataList Width="800px" runat="server"
                                     ID="dataListTopSaleProductTypeList"
                                     RepeatColumns="5" RepeatDirection="Vertical" >
                                    <ItemTemplate>
                                    <li>
                                    <a href="Category.aspx?category=<%# Eval("typeName") %>&brand=HP">
                                    <asp:Label Width="200px" runat="server" ID="repeatItem"
                                    Text='<%# Bind("typeName") %>'></asp:Label>                                            
                                    </a>
                                    </li>
                                    </ItemTemplate>
                                    </asp:DataList>
                                 
</ul>
                           
</div>
                         
</div>
                   
</li>
                   
               
</ul>
0
Comment
Question by:ITsolutionWizard
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 29

Accepted Solution

by:
sammySeltzer earned 500 total points
ID: 40376087
Hi

If I understand you correctly, you want the text value to be dynamically generated?

Try this:

 <a href="Category.aspx?category=<%# Eval("typeName") %>" Text="<%# Eval("brandHP") %>">

Open in new window

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question