Solved

asp.net label

Posted on 2014-10-11
1
274 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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

734 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