|
-
May 9th, 2007, 06:12 PM
#1
Thread Starter
Frenzied Member
[2005] Prevent user from posting page back again before its complete
Hello all,
i am using vs2005.net , web project with coding Vb.net
i have a web page that loads several comboboxes that loads depending on each other ( for example user select country , it loads cities combobox, select city then loads areas and so on until it gets rating from a prices databases. everything works fine on local machine testing and also on web deployement except a special case condition.
of course all comboboxes has their autopostback property set to true, if a user selects a list in a a combobx and then quickly selects other item in other combobox an exception is thrown and page is destoryed. of course all my codes in the page is contained in try catch statements. so what i need to do is to to prevent user from hitting anything until the page is fully loaded completely, is there anyway i can do so ???
thx in advance
-
May 9th, 2007, 07:47 PM
#2
Re: [2005] Prevent user from posting page back again before its complete
The WebBrowser component has three useful events you can use;
Navigating - about to start navigating to a page
Navigated - navigating to a new location, page about to load
DocumentCompleted - page has loaded
So how about, before you load the page, disable the combo's so the user cannot change them. Re-enable them when DocumentCompleted.
-
May 9th, 2007, 08:03 PM
#3
Re: [2005] Prevent user from posting page back again before its complete
I haven't actually test it so I'm not sure that i'll work, but you can try this idea...
1. Handle the dropdownlist's SelectedindexChanged event... In this event handler, you disable the dropdownlists.
2. Handle the Page_LoadComplete event, and re-enable the dropdownlists.
And BTW, there's no server control named ComboBox.... In the future, please use the correct control name to avoid any confusions that it may cause... And also post in the right forum. This is VB.Net... There's a forum for asp.net
-
May 10th, 2007, 03:01 AM
#4
Thread Starter
Frenzied Member
Re: [2005] Prevent user from posting page back again before its complete
ok , points noted Mr. stanav. i tested your solution without any sucess, the problem is that the user creates two post back events before even the server disables the comboboxes in the first postback.
and i agree if any one here can move this post to asp.net i will be thankul, but please note that i posted this post here because i only use vb.net code inside the web project i am using.
thx (-:
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
|