Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Create redirect link in code behind

Avatar of kdeutsch
kdeutschFlag for United States of America asked on
.NET ProgrammingASP.NETVisual Basic.NET
20 Comments1 Solution589 ViewsLast Modified:
I am trying to create a redirect link in my code behind.  If the data row I am pulling end up blank I want it to put in the field "NOT SET'  (DONE)  if there is something I want it to list out what is in data rows (DONE).  The next portion is I want to turn it into a redirect link so that if someone click on the words above it redirect them to another page to set some further values, below is my code but I cant seem to get it correct.


sql = "Select strBenchmarkName from tblBenchmarkname where intSid = " & myDataTable.Rows(0)(1) & " order by strBenchmarkname"

                BmTable = New DataTable
                BmTable = getData(sql)

                If BmTable.Rows.Count = 0 Then
                    bmName = ""
                Else
                    For Each bmrow In BmTable.Rows
                        bmName += bmrow(0) & ", "
                    Next

                    bmName = Left(bmName, Len(bmName) - 2)
                End If

                If isAdmin = True Then
                    If bmName = "" Then
                        bmName = "(not set)"
                    End If

                    lblBMName.Text = "<div style='display:inline;cursor:hand;' onclick='window.location.replace('EditMetric.aspx?sid=' + myDataTable.Rows(0)(1)&kpname=myDataTable.Rows(0)(1)); & bmName & "</div>"
                Else
                     lblBMName.Text = "<div style='display:inline;cursor:hand;' onclick='window.location.replace('EditMetric.aspx?sid=' + myDataTable.Rows(0)(1)&kpname=myDataTable.Rows(0)(1)); & bmName & "</div>"
                End If
ASKER CERTIFIED SOLUTION
Avatar of propakmike
propakmikeFlag of United States of America image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 20 Comments.
See Answers