Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 5th, 2007, 11:41 AM
Registered User
 
Join Date: Mar 2007
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hmmz very strange because if i reload the page the first of the userlist is selected and the websites are selected too.
When i select another user and then the first again no websites are selected.

 
Old March 5th, 2007, 11:50 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

I am not sure the page_load event is where you want to put this code. This is how I would do it (pseudo code)

'Page_Load
'If not page.ispostback then
'make a call to a method to setup the dropdownlist and listbox
'End if

'Method getData()
'retrive data from dataset and populate list box and ddl

'ddlSelectedIndexChanged(sender as object, e as eventargs) handles ddl.SelectedIndexChanged
'send dropdown value to a method that will retrive the values for the listbox

'getListBoxValues(ddlValue as string)
'Populat listbox

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
 
Old March 5th, 2007, 02:52 PM
Friend of Wrox
 
Join Date: May 2005
Posts: 227
Thanks: 1
Thanked 7 Times in 7 Posts
Default

tombert:
I think a bigger issue needs to be addressed and that is "Security":
     1) No One should have a list of userid's and their passwords unless u r a Security Manager and even then he/she should have the capabilities of unmasking the passwords;
     2) The Website administrator has the responsibility of adding a user or registering a userid to a web application and assigning a "common password" , which must be changed by the user at login time. The web site adminstrator may generate a list of userid's but even he should not know their passwords;
      3) It not clear in what you meant by allowing the userid's to edit websites from a list/listbox of websites. There are now in place Business Process Owners, Data Owners, Change Control Procedures that prevent anyone from making changes anywhere without proper documentation of said change(s).

My advice to you before going any futher is to check with the company's or corporation Security or CIO (Chief Information Officer) for what you are allowed to do and not do, expecially on a web site.

Don't mean to be the "Grim Reaper", but your questions could have serious Security impact.

Hope this helps.
 
Old March 6th, 2007, 07:12 AM
Registered User
 
Join Date: Mar 2007
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

first of all i want to thank you for your help/time. Second i will try your solution this afternoon.

Peace:
The security is no matter because it is a small project with only 1 admin and that will be me ;).


 
Old March 7th, 2007, 12:12 AM
Friend of Wrox
 
Join Date: May 2005
Posts: 227
Thanks: 1
Thanked 7 Times in 7 Posts
Default

tombert:
It matters not the size of the project but the security of the userid's and their passwords is an issue. As website administrator, you may have the responsibility of registering the userid and assigning the first password, but allowing that user to change the password the first time they use it. You should not know their passwords. Even after they changed the passwords and forget, the only action you should take is "reseting" that password and not telling them what it was.... Also as website administrator, it is best that you track such changes as adding, changing and deleting a userid....

But let me know how it all works out for you and the small project on your next IT Audit....
 
Old March 7th, 2007, 07:38 PM
Authorized User
 
Join Date: Mar 2007
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Dont use a listbox, use a checkbox list.

bind your data to the checkbox list.

Check and uncheck the boxes and then on submit.

delete all relations in the one to one table you created

for x as integer = 0 to mycheckbox.items.count - 1
if mycheckbox.items(x).checked = true then
 insert this checked value back into that one to one table
end if
next

Dropdown lists are a pain to multi select especially when on the phone:) Checkboxes i have found alot easier.








Similar Threads
Thread Thread Starter Forum Replies Last Post
DropDown list selections with IE Back button Dawn_B ASP.NET 1.0 and 1.1 Basics 0 May 3rd, 2006 11:57 AM
C# ListBox Working With Multiple Selections pro-logic C# 1 October 9th, 2005 02:15 AM
Select Menu Multiple Selections phungleon HTML Code Clinic 2 July 20th, 2004 12:25 PM
Storing multiple values from the dropdown list lily611 SQL Server 2000 0 June 21st, 2004 06:08 AM
Storing multiple values from the dropdown list lily611 ADO.NET 0 June 21st, 2004 05:21 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.