Hi Peter,

Thank you very much! That is exactly what I need/want!

You've solved my problem.

Perhaps I hadn't explained well the first time.
My english is kinda rusty...:)

M�rio Ramos


-----Original Message-----
From: Peter Brunone [mailto:[EMAIL PROTECTED] 
Sent: segunda-feira, 18 de Abril de 2005 18:58
To: [email protected]
Subject: RE: [AspNetAnyQuestionIsOk] Focus and Select listbox item on page load



Hi Mario,



���Did I answer your original question last week?� My memory is a bit cloudy 
lately...



���If you only change the first listbox, then you won't have triggered anything 
on the second.� Are you trying to do something like this?



http://tinyurl.com/bztt9



���If you want to build one of these on your own, you can check out



http://easylistbox.com/listBoxResources.aspx



for some good articles and sample code.



Peter



P.S.� I wasn't trying to slam Rich -- apologies if it came out that way --�but 
that message really could've sent someone in the wrong direction (or just 
confused them).� A typo maybe?



 From: "Mario Ramos (Ext)" [EMAIL PROTECTED]



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]



���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/
 



Reply via email to