List Info

Thread: I want to limit users to list items only




I want to limit users to list items only
user name
2006-06-27 18:13:24
I do not want the users to be able to add any new list
items.  Here is
my code.


'----------------------------------------------------------
------------------
            '-- ADD ITEMS TO THE TYPE DROP DOWN BOX

'----------------------------------------------------------
------------------
            sqlCMD.Connection = New
SqlConnection(ConfigurationSettings.AppSettings("con&
quot;))
            sqlCMD.CommandType = CommandType.StoredProcedure
            sqlCMD.CommandText =
"usp_GetAppType"
            'sqlCMD = New SqlCommand("SELECT DISTINCT
APL_TYP_C FROM
dbo.TCPRDA ORDER BY APL_TYP_C", con)

            sqlCMD.Connection.Open()
            myReader = sqlCMD.ExecuteReader()

            If myReader.HasRows Then
                'Add blank first item.  Note this will be
the default
selection but user must select another value
                Me.ddlType.Items.Add("")
                Do While myReader.Read()
                    i = New ListItem(myReader.GetString(0))
                    Me.ddlType.Items.Add(i)
                Loop
            Else
                i = New ListItem("No items
returned")
                Me.ddlType.Items.Add(i)
            End If

            myReader.Close()
            sqlCMD.Connection.Close()

            'Remove ALL from the type of application drop
down list
            Me.ddlType.Items.Remove("ALL")
            Me.ddlType.SelectedIndex = 0


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "DotNetDevelopment, VB.NET, C# .NET,
ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting"
group.
To post to this group, send email to DotNetDevelopmentgooglegroups.com
To unsubscribe from this group, send email to
DotNetDevelopment-unsubscribegooglegroups.com
For more options, visit this group at http
://groups.google.com/group/DotNetDevelopment
-~----------~----~----~----~------~----~------~--~---

I want to limit users to list items only
user name
2006-06-27 19:07:24
>> I do not want the users to be able to add any new
list items.  Here is
>> my code.

<snip>

Unless your "users" can programmatically Add
items to your DDL, I don't
see any other way for them to add items. This is not a
ComboBox they're
dealing with. Are you making a UserControl, perhaps, and
you're
concerned that other programmers should not be able to add
items ?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "DotNetDevelopment, VB.NET, C# .NET,
ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting"
group.
To post to this group, send email to DotNetDevelopmentgooglegroups.com
To unsubscribe from this group, send email to
DotNetDevelopment-unsubscribegooglegroups.com
For more options, visit this group at http
://groups.google.com/group/DotNetDevelopment
-~----------~----~----~----~------~----~------~--~---

I want to limit users to list items only
user name
2006-06-29 08:36:57
No.  The users are able to type in an item that is not on
the list and
save the results.  This web form is for a product request by
a
department.  I supply the only available product
"types" and the users
are typing in their own entry.

Its an ASP.NET DropDownList control.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "DotNetDevelopment, VB.NET, C# .NET,
ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting"
group.
To post to this group, send email to DotNetDevelopmentgooglegroups.com
To unsubscribe from this group, send email to
DotNetDevelopment-unsubscribegooglegroups.com
For more options, visit this group at http
://groups.google.com/group/DotNetDevelopment
-~----------~----~----~----~------~----~------~--~---

I want to limit users to list items only
user name
2006-06-29 08:45:00
Is this VS 2005 ? In VS 2003 atleast, I haven't seen a
DropDownList
control that allowed you to type in new items.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "DotNetDevelopment, VB.NET, C# .NET,
ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting"
group.
To post to this group, send email to DotNetDevelopmentgooglegroups.com
To unsubscribe from this group, send email to
DotNetDevelopment-unsubscribegooglegroups.com
For more options, visit this group at http
://groups.google.com/group/DotNetDevelopment
-~----------~----~----~----~------~----~------~--~---

I want to limit users to list items only
user name
2006-06-29 20:53:14
I developed it using VS 2003.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "DotNetDevelopment, VB.NET, C# .NET,
ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting"
group.
To post to this group, send email to DotNetDevelopmentgooglegroups.com
To unsubscribe from this group, send email to
DotNetDevelopment-unsubscribegooglegroups.com
For more options, visit this group at http
://groups.google.com/group/DotNetDevelopment
-~----------~----~----~----~------~----~------~--~---

I want to limit users to list items only
user name
2006-06-30 17:23:50
Ok when I take the application and database home and
recomplie and run
it there, I can not enter any text in the drop down list
control.
We'll be rebuilding our web server later today.  I know
that doesn't
tell me the problem, it should correct it.

Thanks everyone


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "DotNetDevelopment, VB.NET, C# .NET,
ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting"
group.
To post to this group, send email to DotNetDevelopmentgooglegroups.com
To unsubscribe from this group, send email to
DotNetDevelopment-unsubscribegooglegroups.com
For more options, visit this group at http
://groups.google.com/group/DotNetDevelopment
-~----------~----~----~----~------~----~------~--~---

[1-6]

about | contact  Other archives ( Real Estate discussion Medical topics )