Jump to content
Xtreme .Net Talk

cokedev

Members
  • Posts

    7
  • Joined

  • Last visited

Personal Information

  • .NET Preferred Language
    VB.NET

cokedev's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Do you have an example?
  2. OK I have generated a number of textboxes on page load depending on the numer of enterys i have. What i have gotten stuck on is when i submit my form how can i check for my values using a loop? ie: my textboxes or generated tb1,tb2,tb3....etc how can use that in a loop like: Do While i = intEnteryTotal datafield("item") = tb Loop ----------------------------------------------------------------------------------- Public Function load_desc() Dim strSQL As String = "SELECT * FROM tblDESCREP" Dim myConn As New OleDb.OleDbConnection(strProvider) Dim myDC As New OleDb.OleDbCommand(strSQL, myConn) myConn.Open() Dim objRdr As OleDb.OleDbDataReader = myDC.ExecuteReader Dim intI As Integer = 1 Dim intR As Integer Response.Write("<Table><tr><td>Descrepancy Name</td><td align=""center"">Pass</td><td align=""center"">Fail</td><td>Descrepancy Name</td><td align=""center"">Pass</td><td align=""center"">Fail</td></tr><tr>") Do While objRdr.Read intR = intI Mod 2 If intR = 1 Then Response.Write("</tr><tr>") End If Response.Write("<td style=""WIDTH: 225px"">") If objRdr.Item("DESCREP_MAJOR") = True Then Response.Write("<b>") End If Response.Write(objRdr.Item("DESCREP_NAME")) If objRdr.Item("DESCREP_MAJOR") = True Then Response.Write("</b>") End If Response.Write("</td>") Response.Write("<td style=""WIDTH: 30px"" align=""center""><INPUT Name=""d" & objRdr.Item("DESCREP_ID") & """ type=""radio"" value=""True"" CHECKED></td>") Response.Write("<td style=""WIDTH: 50px"" align=""center""><INPUT Name=""d" & objRdr.Item("DESCREP_ID") & """ type=""radio"" value=""False""></td>") intI += 1 Loop Response.Write("</tr></Table>") myConn.Close() End Function -------------------------------------------------------------------------------
  3. nm it works with the databinding....i think i'll just keep it simple right now....I really do appreciate the help
  4. Can I set myclass to MemberValue like lstDesc.MemberValue = myclass mystring = lstDesc.SelectedValue.id Is this valid?
  5. It worked like a charm.....tyvm
  6. OK, I put my database info in a listbox....I would like to be able to select the item and get the displaymember and valuemember info from it. It seems that all i can retrieve is an index number, and if that is all that i can get then what is a good way i could go about using the index # to retrieve access to the data. :confused: ------------------------------------------------------ Dim dc As New OleDb.OleDbConnection(strProvider) dc.Open() Dim strSQL As String = "SELECT * FROM Discreps WHERE Job_ID='0'" Dim mydc As New OleDb.OleDbCommand(strSQL, dc) Dim myadp As New OleDb.OleDbDataAdapter(mydc) dsJobDiscreps.Clear() myadp.Fill(dsJobDiscreps) dc.Close() lstDesc.DataSource = dsJobDiscreps.Tables(0) lstDesc.DisplayMember = "Discrep_ID" lstDesc.ValueMember = "JobDiscrep_ID" ----------------------------------------------------- Thank for the help in advance. I just think I have had way too much Dr. Pepper this morning :D
  7. I been having trouble finding out a way to quary my dataset and take the results and put it in a listbox. ----------------------------------- Function LoadDiscreps() dsJobDiscreps.ReadXml("../Data/JobDiscreps.xml") Dim tDs As DataSet Dim aRow As DataRow() = dsJobDiscreps.Tables("Discrepancy").Select("Job_ID = '000'") lstDesc.DataSource = aRow lstDesc.DisplayMember = "Discrep_ID" lstDesc.ValueMember = "Discrep_ID" End Function ------------------------------------ This is what i tought i can do but i guess it isn't possible...I guess i just need a nudge in the right direction.
×
×
  • Create New...