Advertisement

06.18.2008 at 07:41AM PDT, ID: 23495363
[x]
Attachment Details

Simple VB.net using if/then on database data and passing from .vb file to .aspx file

Asked by drocco21 in Visual Studio, Microsoft Visual Basic.Net

Tags:

I have had assistance with getting the data pulled into the .vb file and filling a datagrid, now I have one more question. I would like to say, "If mytable.judge = 'hoover' then response.write 'JUDGE'". This is probably simple but I am in diar need. The code above is probably more classic asp worded but I hope it helps with this issue.

Thanks for your assistanceStart Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
---.vb file---
Imports System.Data.SqlClient
Imports System.Data
 
Partial Class _Default
    Inherits System.Web.UI.Page
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim dtJudges As New DataTable("Judges")
        Using conn As New SqlConnection("Initial Catalog=court_dms;Data Source=DINO;Integrated Security=no; User ID=norton;PWD=goldcat13")
            Using cmd As New SqlCommand("SELECT * FROM court_gbs", conn)
                Using da As New SqlDataAdapter(cmd)
                    da.Fill(dtJudges)
                End Using
            End Using
        End Using
        GridView1.DataSource = dtJudges
        GridView1.DataBind()
    End Sub
End Class
[+][-]06.18.2008 at 08:19AM PDT, ID: 21813863

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: Visual Studio, Microsoft Visual Basic.Net
Tags: Visual Basic
Sign Up Now!
Solution Provided By: cpkilekofp
Participating Experts: 2
Solution Grade: A
 
 
[+][-]06.18.2008 at 08:21AM PDT, ID: 21813873

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.18.2008 at 09:19AM PDT, ID: 21814487

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.18.2008 at 11:15AM PDT, ID: 21815479

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