Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. displaying controls [modified]

displaying controls [modified]

Scheduled Pinned Locked Moved ASP.NET
helpquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    soorma
    wrote on last edited by
    #1

    I have a datareader and i am passing many strings one by one to a sub. I think i have to do dynamically but how can i do it. The data looks like this datetimestart datetimeend String String cboStringM i don't know the data in adv.. i am looping thru one by one. i don't know how many strings i will encounter. i can encounter 3 or 4 or 1 but i need to display the textbox for each string i pass and same goes for the listbox. When i pass the datetimestart i show the calendar control. When i pass the datetimeend i show another calendar control. When i pass the String i show the textbox. When i pass the second String i show another textbox. when cboStringM then a listbox But the second textbox is not showing. When the first string is passed the firsttextbox is set to true when when the second strings turn comes the firsttextbox is already true and it doesn't go to the second one. That is my problem. How can i show both the textboxes when 2 strings are passed of the same name. here is the code Dim ParameterReportType As New Data.SqlClient.SqlParameter("@id", SqlDbType.VarChar, 50) ParameterReportType.Value = Request.QueryString("id") myCommandReportType.Parameters.Add(ParameterReport Type) Dim objReaderparam As SqlDataReader = myCommandReportType.ExecuteReader() Dim DisplayedName As New ArrayList Dim ParameterType As New ArrayList Dim ParameterName As New ArrayList Dim DataSource As New ArrayList Dim Hidden As New ArrayList Dim DefaultValue As New ArrayList Dim DatabaseSourceNumber As New ArrayList While objReaderparam.Read() DisplayedName.Add(objReaderparam.Item("DisplayedNa me")) ParameterType.Add(objReaderparam.Item("Parameterty pe")) ParameterName.Add(objReaderparam.Item("ParameterNa me")) DataSource.Add(objReaderparam.Item("DataSource")) Hidden.Add(objReaderparam.Item("Hidden")) DefaultValue.Add(objReaderparam.Item("DefaultValue ")) DatabaseSourceNumber.Add(objReaderparam.Item("Data baseSourceNumber")) formattable(objReaderparam.Item("DisplayedName"), (objReaderparam.Item("Parametertype")), (objReaderparam.Item("ParameterName")), (objReaderparam.Item("DataSource")), (objReaderparam.Item("Hidden")), (objReaderparam.Item("DefaultValue")), (objReaderparam.Item("DatabaseSourceNumber"))) End While objReaderparam.Close() Sub formattable(ByVal DisplayedName As String, ByVal Parametertype As String, ByVal ParameterName As String, ByVal DataSource As String, ByVal Hidden As String, ByVal DefaultValue As String, ByVal DatabaseSourceNumber As String)

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups