|
-
Sep 9th, 2004, 07:35 AM
#1
Thread Starter
Hyperactive Member
avoid post back event
I am developing web site using asp.net. I have 50 list box controls on the web form.
I want to cancel the selcted item from the listbox.
I am doing that using lstbox.Cancelselection mehtod but postback event fire again which
populate the all listboxes.
On form_load event i am already checking postback event as false.
Now my question is how do i avoid populationg listbox on click of clear button
-
Sep 9th, 2004, 07:41 AM
#2
In the Page Load event, check for
VB Code:
If Not Page.IsPostBack Then
'.....
-
Sep 15th, 2004, 12:52 PM
#3
Frenzied Member
Something to remember is that the Page Load fires before the button event. Meaning that even if you load the boxes on every load the clear will still or should still clear them.
Another thing if you Bind the list boxes on every load the SelectedItem will alway be the first item in the list because between it being select and the fireing of any server code using the selected. The list has been rebound and it's selected item set back to 0.
always bind a list inside a Not IsPostBack check.
Listen to the frog he is pretty smart
Magiaus
If I helped give me some points.
-
Sep 16th, 2004, 02:22 AM
#4
Is it just me or has the text in the first post changed, making me look like a complete idiot?
-
Sep 16th, 2004, 08:43 AM
#5
Frenzied Member
I dunno I only read up until it said listbox
Magiaus
If I helped give me some points.
-
Sep 16th, 2004, 08:44 AM
#6
Frenzied Member
btw, what does the asian text say?
Magiaus
If I helped give me some points.
-
Sep 16th, 2004, 08:45 AM
#7
Frenzied Member
you know I think it did change
Magiaus
If I helped give me some points.
-
Sep 17th, 2004, 12:02 AM
#8
Originally posted by Magiaus
btw, what does the asian text say?
All your base are belong to us!
-
Sep 17th, 2004, 02:22 AM
#9
Frenzied Member
hahahaha
move zig, move zig, move zig
Some one setup us the bomb.
Magiaus
If I helped give me some points.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|