Nope... It doesn't. I want to get focus on the listbox on page_load an also get the 1st item of the listbox selected (not get the selected item) because I have another listbox which is dependent on this one. But I don't know if this is going to fire the 2nd listbox's selected_indexchanged event.
-----Original Message----- From: Peter Brunone [mailto:[EMAIL PROTECTED] Sent: segunda-feira, 18 de Abril de 2005 17:20 To: [email protected] Subject: Re: [AspNetAnyQuestionIsOk] Focus and Select listbox item on page load ���That line doesn't make any sense for server-side OR client-side code. From: "richard pauer" [EMAIL PROTECTED] Hi there To get the first item that is selected inthe listbox you need the follwoing code form name.list box1,listindex HTH Rich ----- Original Message ----- From: "Mario Ramos (Ext)" Hi guys, I'm trying to get the first item of a listbox selected on page load. I got the control focused but how do I get the item selected? I'm using in page_load: Dim strBuilder As StringBuilder = New StringBuilder() strBuilder.Append(" ") strBuilder.Append(" document.getElementById('lstbxLines').focus();") strBuilder.Append(" document.getElementbyid('lstbxLines').select()") ' strBuilder.Append(" ") RegisterStartupScript("Focus", strBuilder.ToString()) ' Thankx M�rio M�rio Ramos SADTEAM - Siemens Archibus Development Team Servi�os IntegradosTM Siemens Medical Solutions Edif�cio Minho Telf.: +351 22 999 22 84 Fax.: +351 22 999 22 88 Email: [EMAIL PROTECTED] [Non-text portions of this message have been removed] Yahoo! Groups Links Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
