Solved

asp.net label

Posted on 2014-10-11
1
265 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
1 Comment
 
LVL 28

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

757 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now