Saturday, March 24, 2012

ListBox - avoid AutoPostBack when Ctrl key pressed

In a ListBox I allow Multiselection.

I have also the Autopostback property = True

When the user wants to multiselect
and presses Ctrl key and starts clicking on items,
the Autopostback if firerd every time:
it is frustrating.

Is there a way to avoid Autopostback in this case?An,

I dont think that is possible. You will have post it back during some other
event.

Regards,
Augustin
http://augustinprasanna.blogspot.com
"an" wrote:

Quote:

Originally Posted by

In a ListBox I allow Multiselection.
>
I have also the Autopostback property = True
>
When the user wants to multiselect
and presses Ctrl key and starts clicking on items,
the Autopostback if firerd every time:
it is frustrating.
>
Is there a way to avoid Autopostback in this case?
>
>
>
>
>


If I let the user enable Javascript,

is there a way to detect somewhere the Ctrl key pressed ?

A sort of:

If key.Ctrl = True then
Listbox1.Autopostback = False
End If

How to correctly write it?
Where to put it?

Quote:

Originally Posted by

>An,
>
>I dont think that is possible. You will have post it back during some other
>event.
>
>Regards,
>Augustin
>http://augustinprasanna.blogspot.com
>
>"an" wrote:
>

Quote:

Originally Posted by

>In a ListBox I allow Multiselection.
>>
>I have also the Autopostback property = True
>>
>When the user wants to multiselect
>and presses Ctrl key and starts clicking on items,
>the Autopostback if firerd every time:
>it is frustrating.
>>
>Is there a way to avoid Autopostback in this case?
>>
>>
>>
>>
>>

0 comments:

Post a Comment