Advertisement

06.05.2008 at 09:58AM PDT, ID: 23461027
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.6

Check if value exists

Asked by ellemental in Scripting Languages, .NET, Programming for ASP.NET

Tags: ,

Here's what I'm trying to do:

Display a list (lastname), (firstname) from a database. If that person has a weblink, I want to make their name a weblink, for example,
<a href="weblinkexists">(lastname), (firstname) </a>
<a href="weblinkexists">(lastname), (firstname) </a>
(lastname), (firstname) -- this person has no weblink, just their static name shows
<a href="weblinkexists">(lastname), (firstname) </a>
<a href="weblinkexists">(lastname), (firstname) </a>


HERE'S MY CODE SNIPPET:

Dim i_website1

Sub Page_Load(sender as Object, e as EventArgs)

    call openDB()

   dim strSQL="Select * from jbi_artist WHERE director_group='flute' ORDER BY director_lastname"
       
        Dim ds2 As New DataSet()        
        dim mycommand2 as new MySqlDataAdapter(strSQL, connTemp)
        mycommand2.Fill(ds2, "cur_data2")   
            
        flute.DataSource = ds2
        flute.DataBind()
            
        i_website1 = ds2.Tables("cur_data2").Rows(0)("director_website")

         call CloseDB()

End Sub
 
AND HERE"S MY DATALIST ON THE PAGE:

<asp:DataList ID="flute" GridLines="None" HorizontalAlign="Left" CellPadding="0" ItemStyle-VerticalAlign="TOP" CellSpacing="0" RepeatDirection="Vertical" RepeatLayout="Table" RepeatColumns="1" ShowBorder="False" Width="100%" runat="server" >            
<ItemTemplate>
<% IF i_website1 <> "" THEN
%>
 <a  href="<%# DataBinder.Eval(Container.DataItem, "director_website") %>"> <%# DataBinder.Eval(Container.DataItem, "director_lastname") %>, <%# DataBinder.Eval(Container.DataItem, "director_firstname") %></a><br />
  <% ELSE  %>
 <%# DataBinder.Eval(Container.DataItem, "director_lastname") %>, <%# DataBinder.Eval(Container.DataItem, "director_firstname") %><br />
  <% END IF %>
</ItemTemplate>                              
 </asp:DataList>

No matter how I flip things around, either everyone has a link or no one has a link.

For example,

<a href="weblinkexists">LastName, FirstName</a> (actually has a website so the link is correct)
<a href="mydomain">LastName, FirstName</a> (has no website, but it take the a href anyway
<a href="weblinkexists">Last, First </a>(actually has a website so the link is correct)

I've tried making the field (NULL), empty, etc.

I think I need to use "count" to go through each row and see if that value is NULL, but my attempts with that have thrown errors.

Thanks for any assistance!
Start Free Trial
[+][-]06.05.2008 at 10:13AM PDT, ID: 21721769

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.05.2008 at 10:22AM PDT, ID: 21721847

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.05.2008 at 10:55AM PDT, ID: 21722204

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.05.2008 at 11:34AM PDT, ID: 21722580

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.05.2008 at 12:02PM PDT, ID: 21722830

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.05.2008 at 12:33PM PDT, ID: 21723098

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.05.2008 at 01:19PM PDT, ID: 21723547

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.05.2008 at 01:23PM PDT, ID: 21723566

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.05.2008 at 02:01PM PDT, ID: 21723957

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.06.2008 at 05:34AM PDT, ID: 21728360

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.06.2008 at 07:45AM PDT, ID: 21729560

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.06.2008 at 07:57AM PDT, ID: 21729661

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Scripting Languages, .NET, Programming for ASP.NET
Tags: ASP, ASP.NET 1.1, all
Sign Up Now!
Solution Provided By: samtran0331
Participating Experts: 2
Solution Grade: A
 
 
[+][-]06.06.2008 at 08:02AM PDT, ID: 21729720

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628