C#/LinkLabel

Advertisement


Question
hi,
  i'm searching to keep the linklabel in listview. can u help me with coding and procedure to keep the linklabel in listview....

Answer
like gridview or repeater , listview have item template than you can add it in html source of your listview and like repeater or datalist , you can easily select something from database and then bind it to your listview
you can add every object you want such as textbox, label, link label, image, everything...
I don't know link label you mean hyperlink if so it works for you.
file test1.aspx.cs

     private void BindData()
       {

           try
           {
               DataTable dt = new DataTable();
              cls.getselectdata(dt);
               switch (dt.Rows.Count)
           {
               case 0:
                 //your message here
                   break;
               default:
                 ListView1.DataSource=dt;
                 ListView1.DataBind();
                   break;
           }
           }
           catch (Exception ex)
           {
              //error message here
           }

       }

your HTML of test1.aspx

<asp:ListView ID="ListView1" runat="server">
<ItemTemplate>
<a href='xx.htm' runat="server"> <%# DataBinder.Eval(Container.DataItem, "yourcolumn")%></a>
</ItemTemplate>
</asp:ListView>

C#

All Answers


Answers by Expert:


Ask Experts

Volunteer


Hosnieh [Sara]

Expertise

Questions which I can answers: 1- Programming (C#.net, Vb.net, javascript, HTML) more Web applications 2- CSS 3-Databases (Ms SQL server -all versions) 4-OS (workstation and servers (windows)) 5- MS office 6- General problems in computer software I cannot answer other kinds of questions which I did not mention here.

Experience

my CV: http://iran-americamarket.com/Contact.aspx I have more than 8 years Experience in IT field. my core skills are : • Asp.net Developer (Portal, Dynamic websites ,e-commercial websites) • Visual studio.net 2003,2005,2008 (VB.net , C#.net , AJAX.net) • O.O programming (n-tier Architecture) • Database (SQL server 2000-2005, Oracle9i, Ms Access) , TSQL, Stored procedures, Triggers • IIS 5-6 , SSL (Installation and configuration SSL) , Network(TCP/IP ,Active directory , DHCP, … ), Windows 2000-2003 Server Configuration and administration • UML (usecase diagram, class diagram) , Microsoft Project • Graphics Design( Photoshop , Flash ) • JavaScript , CSS, DHTML, XML • Hardware (physical installation, configuration , and driver installation) • Ms Office all versions (Ms word, Ms Access, Ms Excel, Ms Outlook , Ms FrontPage, and etc) • OS (Windows –Linux) and VMware • Network Monitoring (Solarwinds) • Computer Teacher, English Teacher • MATLAB (simulations and computation projects)

Organizations
-

Publications
Translation Experience English to Farsi • Use brain scan to predict when people will buy products . May 2008 (Published in AI Magazine) – Medicine , AI • Totally tubular motors _Tomorrow automation technology : March 2008 (Published in AI Magazine) – AI , Mechanic, Industry • Improving PLC compatibility and function flexibility: March 2008 (Published in AI Magazine) – AI , Robotics , Industry • Make packaging lines more flexible: January 2008 (Published in AI Magazine) – AI , Robotics , Industry • Personal CNC : December 2007 (Published in AI Magazine) – AI , Medical , Industry • Multipurpose optical tools Characterize as MEMS: December 2007 (Published in AI Magazine)- optical physics • Managing Innovation: November 2007 (Published in AI Magazine) – IT Management • Calculating the total value of ownership (TVO):October 2007 (Published in San-ate Hooshmand Magazine) -IT and Economics

Education/Credentials
I am currently student and doing my Master in Computer Network Engineering

Awards and Honors
- Poster about new methods of management in Organization( Entrepreneurship ) - 2007

Past/Present Clients
-

©2012 About.com, a part of The New York Times Company. All rights reserved.