473,322 Members | 1,241 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

tabbing and loading tables when textbox key is pressed?!?!

Hi all,
Could someone please explain to me how i could load a different datagrid or
fill out all the textboxes with feilds from a database - once a user types a
character in a textbox.
I have the code for it, but my problem is that it doesn't work unless i
click on an empty button, just to reload the page...
also how would i control the direction of the tabbing on my ASP.Net webpage???
Thanks,
adam

--
Ad****@hotmail.com
Nov 19 '05 #1
1 1404
You can cause the textbox to postback for the "onkeyup" event. This method
will fire everytime the user releases a key on the keyboard when the text
box has focus.

txtEntry.Attributes.Add( "onkeyup", this.GetPostBackClientEvent( txtEntry,
"" ) );

You can then wire to the TextChanged event on the TextBox to ensure that the
postback was caused by the text changing and do you loading and datagrid
stuff.

Are you sure you just don't want to wire to the TextChanged event and turn
on AutoPostBack for the TextBox. This will cause a postback when the user
tabs out of the textbox and the text has changed. With the approach above,
if the user types "hello", there will be 5 postbacks of which the user will
probably only see the last one, depending on how fast your server is.

If you are running a query based on what they typed in, you might have 5
queries run, but only the last query is the one you want, thus increasing
load on your database.

HTH,

bill

"ACaunter" <Ad****@hotmail.com> wrote in message
news:73**********************************@microsof t.com...
Hi all,
Could someone please explain to me how i could load a different datagrid or fill out all the textboxes with feilds from a database - once a user types a character in a textbox.
I have the code for it, but my problem is that it doesn't work unless i
click on an empty button, just to reload the page...
also how would i control the direction of the tabbing on my ASP.Net webpage??? Thanks,
adam

--
Ad****@hotmail.com

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

145
by: David MacQuigg | last post by:
Playing with Prothon today, I am fascinated by the idea of eliminating classes in Python. I'm trying to figure out what fundamental benefit there is to having classes. Is all this complexity...
3
by: Richard | last post by:
Tabbing from the first control on a form always sends me to IE's Address Bar instead of the next control, no matter how I set the TabIndex property for the controls. Why is this happening? For...
1
by: Tom | last post by:
A dumb question: Exactly how does tabbing work in an ASP.NET form in the browser? Does it work the same was as a Windows Forms form does? I have a rather complicated ASP form (that consists of...
3
by: Fredrik Melin | last post by:
Have posted about this before without luck, maybe someone know a workaround. Using Framework 1.1 I have about 140 clients running my application, every day, some of them loosing the Tab key...
0
by: Mike Walters | last post by:
We are auto tabbing from one control to the next after max length is reached, but when within a groupbox tabbing remains within itself. when we are at the max length and use the backspace or Del...
2
by: rmiller | last post by:
I'm in dire straits. I'm converting part of a product into VB.NET, but still need to access forms written in VB 6.0. I've got just about everyting working, but the tabbing on the form. The form...
2
by: matthewr | last post by:
In Internet Explorer, for example, when you hit return in the address bar, the Go button is pressed. In my program, I have a toolstrip with a textbox and button. How do I ensure the button is...
7
by: koonda | last post by:
Hi guys, I am trying to create a web interface in C# using ASP.NET. The database being used is SQL Server. I have some problems loading the tables in the datalist controls. When I run the program...
1
by: daonho | last post by:
I tried to use javascript to trigger up the button click function when user press enter key from the textbox. This function work fine with a single button click such has login page. However, if the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.