Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > double posting problem

Reply
Thread Tools

double posting problem

 
 
Boban Dragojlovic
Guest
Posts: n/a
 
      02-04-2004
I have a webform that shows a long list of customers (500 - 1000) to the
user.



At the top of the form are various filtering options, including a quick
search input box.



If you set any filters, you need to click on the 'Filter' button to apply
the filter. In that case the form posts back to the server and performs the
filter.



But the quick search is designed to work easier/faster. If you type
anything into that box, and press tab, it posts back to the server
immediately and performs a search based on the text you entered.



I achieve this by coding these attributes into the quick search textbox:

AutoPostBack="True" OnTextChanged="QuickSearch"





Everything works fine if the user types something and presses Tab.



But, if the user types something into the quick search textbox, and presses
ENTER instead of TAB, then the form posts TWICE instead of once, and I wind
up duplicating data on the screen.





Currently the @Page directive has AutoEventWireup="false"



If I changed that to TRUE, it's even worse (it ALWAYS double posts).





Any ideas?




 
Reply With Quote
 
 
 
 
Kevin Spencer
Guest
Posts: n/a
 
      02-04-2004
You'll have to write a JavaScript routine that captures the ENTER key and
reacts appropriately.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Boban Dragojlovic" <news@_N_O_S_P_AM_dragojlovic.org> wrote in message
news:AmdUb.21526$(E-Mail Removed). com...
> I have a webform that shows a long list of customers (500 - 1000) to the
> user.
>
>
>
> At the top of the form are various filtering options, including a quick
> search input box.
>
>
>
> If you set any filters, you need to click on the 'Filter' button to apply
> the filter. In that case the form posts back to the server and performs

the
> filter.
>
>
>
> But the quick search is designed to work easier/faster. If you type
> anything into that box, and press tab, it posts back to the server
> immediately and performs a search based on the text you entered.
>
>
>
> I achieve this by coding these attributes into the quick search textbox:
>
> AutoPostBack="True" OnTextChanged="QuickSearch"
>
>
>
>
>
> Everything works fine if the user types something and presses Tab.
>
>
>
> But, if the user types something into the quick search textbox, and

presses
> ENTER instead of TAB, then the form posts TWICE instead of once, and I

wind
> up duplicating data on the screen.
>
>
>
>
>
> Currently the @Page directive has AutoEventWireup="false"
>
>
>
> If I changed that to TRUE, it's even worse (it ALWAYS double posts).
>
>
>
>
>
> Any ideas?
>
>
>
>



 
Reply With Quote
 
 
 
 
Boban Dragojlovic
Guest
Posts: n/a
 
      02-04-2004
Can you explain to me what is happening...

What do the two post events represent?



"Kevin Spencer" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> You'll have to write a JavaScript routine that captures the ENTER key and
> reacts appropriately.
>
> --
> HTH,
> Kevin Spencer
> .Net Developer
> Microsoft MVP
> Big things are made up
> of lots of little things.
>
> "Boban Dragojlovic" <news@_N_O_S_P_AM_dragojlovic.org> wrote in message
> news:AmdUb.21526$(E-Mail Removed). com...
> > I have a webform that shows a long list of customers (500 - 1000) to the
> > user.
> >
> >
> >
> > At the top of the form are various filtering options, including a quick
> > search input box.
> >
> >
> >
> > If you set any filters, you need to click on the 'Filter' button to

apply
> > the filter. In that case the form posts back to the server and performs

> the
> > filter.
> >
> >
> >
> > But the quick search is designed to work easier/faster. If you type
> > anything into that box, and press tab, it posts back to the server
> > immediately and performs a search based on the text you entered.
> >
> >
> >
> > I achieve this by coding these attributes into the quick search textbox:
> >
> > AutoPostBack="True" OnTextChanged="QuickSearch"
> >
> >
> >
> >
> >
> > Everything works fine if the user types something and presses Tab.
> >
> >
> >
> > But, if the user types something into the quick search textbox, and

> presses
> > ENTER instead of TAB, then the form posts TWICE instead of once, and I

> wind
> > up duplicating data on the screen.
> >
> >
> >
> >
> >
> > Currently the @Page directive has AutoEventWireup="false"
> >
> >
> >
> > If I changed that to TRUE, it's even worse (it ALWAYS double posts).
> >
> >
> >
> >
> >
> > Any ideas?
> >
> >
> >
> >

>
>
>



 
Reply With Quote
 
Kevin Spencer
Guest
Posts: n/a
 
      02-04-2004
The ENTER key in most browsers will submit a form by default. Your textbox
has an event handler that is triggered when the textbox loses focus. When
the form is submitted, the textbox loses focus, thereby triggereing 2
"events".

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Boban Dragojlovic" <news@_N_O_S_P_AM_dragojlovic.org> wrote in message
news:wIdUb.21537$(E-Mail Removed). com...
> Can you explain to me what is happening...
>
> What do the two post events represent?
>
>
>
> "Kevin Spencer" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > You'll have to write a JavaScript routine that captures the ENTER key

and
> > reacts appropriately.
> >
> > --
> > HTH,
> > Kevin Spencer
> > .Net Developer
> > Microsoft MVP
> > Big things are made up
> > of lots of little things.
> >
> > "Boban Dragojlovic" <news@_N_O_S_P_AM_dragojlovic.org> wrote in message
> > news:AmdUb.21526$(E-Mail Removed). com...
> > > I have a webform that shows a long list of customers (500 - 1000) to

the
> > > user.
> > >
> > >
> > >
> > > At the top of the form are various filtering options, including a

quick
> > > search input box.
> > >
> > >
> > >
> > > If you set any filters, you need to click on the 'Filter' button to

> apply
> > > the filter. In that case the form posts back to the server and

performs
> > the
> > > filter.
> > >
> > >
> > >
> > > But the quick search is designed to work easier/faster. If you type
> > > anything into that box, and press tab, it posts back to the server
> > > immediately and performs a search based on the text you entered.
> > >
> > >
> > >
> > > I achieve this by coding these attributes into the quick search

textbox:
> > >
> > > AutoPostBack="True" OnTextChanged="QuickSearch"
> > >
> > >
> > >
> > >
> > >
> > > Everything works fine if the user types something and presses Tab.
> > >
> > >
> > >
> > > But, if the user types something into the quick search textbox, and

> > presses
> > > ENTER instead of TAB, then the form posts TWICE instead of once, and I

> > wind
> > > up duplicating data on the screen.
> > >
> > >
> > >
> > >
> > >
> > > Currently the @Page directive has AutoEventWireup="false"
> > >
> > >
> > >
> > > If I changed that to TRUE, it's even worse (it ALWAYS double posts).
> > >
> > >
> > >
> > >
> > >
> > > Any ideas?
> > >
> > >
> > >
> > >

> >
> >
> >

>
>



 
Reply With Quote
 
Rimu Atkinson
Guest
Posts: n/a
 
      02-04-2004
>
> But the quick search is designed to work easier/faster. If you type
> anything into that box, and press tab, it posts back to the server
> immediately and performs a search based on the text you entered.
>

that's madness. that's not what the users will be expecting to happen, it
will confuse them. don't do it.


 
Reply With Quote
 
Gibs
Guest
Posts: n/a
 
      02-04-2004
you have to catch the enter key. you can use this piece in the
onsubmit="return false;" form tag.

"Boban Dragojlovic" <news@_N_O_S_P_AM_dragojlovic.org> wrote in message
news:AmdUb.21526$(E-Mail Removed). com...
> I have a webform that shows a long list of customers (500 - 1000) to the
> user.
>
>
>
> At the top of the form are various filtering options, including a quick
> search input box.
>
>
>
> If you set any filters, you need to click on the 'Filter' button to apply
> the filter. In that case the form posts back to the server and performs

the
> filter.
>
>
>
> But the quick search is designed to work easier/faster. If you type
> anything into that box, and press tab, it posts back to the server
> immediately and performs a search based on the text you entered.
>
>
>
> I achieve this by coding these attributes into the quick search textbox:
>
> AutoPostBack="True" OnTextChanged="QuickSearch"
>
>
>
>
>
> Everything works fine if the user types something and presses Tab.
>
>
>
> But, if the user types something into the quick search textbox, and

presses
> ENTER instead of TAB, then the form posts TWICE instead of once, and I

wind
> up duplicating data on the screen.
>
>
>
>
>
> Currently the @Page directive has AutoEventWireup="false"
>
>
>
> If I changed that to TRUE, it's even worse (it ALWAYS double posts).
>
>
>
>
>
> Any ideas?
>
>
>
>



 
Reply With Quote
 
Kevin Spencer
Guest
Posts: n/a
 
      02-05-2004
If they add that to the form, it will never submit.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Gibs" <(E-Mail Removed)> wrote in message
news:#(E-Mail Removed)...
> you have to catch the enter key. you can use this piece in the
> onsubmit="return false;" form tag.
>
> "Boban Dragojlovic" <news@_N_O_S_P_AM_dragojlovic.org> wrote in message
> news:AmdUb.21526$(E-Mail Removed). com...
> > I have a webform that shows a long list of customers (500 - 1000) to the
> > user.
> >
> >
> >
> > At the top of the form are various filtering options, including a quick
> > search input box.
> >
> >
> >
> > If you set any filters, you need to click on the 'Filter' button to

apply
> > the filter. In that case the form posts back to the server and performs

> the
> > filter.
> >
> >
> >
> > But the quick search is designed to work easier/faster. If you type
> > anything into that box, and press tab, it posts back to the server
> > immediately and performs a search based on the text you entered.
> >
> >
> >
> > I achieve this by coding these attributes into the quick search textbox:
> >
> > AutoPostBack="True" OnTextChanged="QuickSearch"
> >
> >
> >
> >
> >
> > Everything works fine if the user types something and presses Tab.
> >
> >
> >
> > But, if the user types something into the quick search textbox, and

> presses
> > ENTER instead of TAB, then the form posts TWICE instead of once, and I

> wind
> > up duplicating data on the screen.
> >
> >
> >
> >
> >
> > Currently the @Page directive has AutoEventWireup="false"
> >
> >
> >
> > If I changed that to TRUE, it's even worse (it ALWAYS double posts).
> >
> >
> >
> >
> >
> > Any ideas?
> >
> >
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
URL Posting Fails in Medium Trust (3rd time posting this w/ zero replies so far) AmitKu ASP .Net 7 01-08-2007 07:31 PM
Top Posting vs. Bottom Posting scaredkitty Computer Support 37 04-06-2005 12:27 AM
cannot convert parameter from 'double (double)' to 'double (__cdecl *)(double)' error Sydex C++ 12 02-17-2005 06:30 PM
Double double display display problem problem Tom Accuosti Firefox 3 09-27-2004 10:02 PM
Everytime I hover cursro over a posting, it crosses out with red mark on it.. on every posting alanb ASP .Net 2 04-23-2004 02:23 PM



Advertisments