How to access data using objects onkeypress event

Hi there,

Onkeypress event of a textbox, I want to query database using my already existing database connection ( i'm using Now I did not find anyway to write VB code to trap onkeypress event. The only way I found was to write a javascript. But in javascript, I was not able to access my exitsting data object like connection and dataset. As in my case I need to query only from current database session as my transaction is not over yet. Can anybody Please suggest me some way to do this.
This is very very urgent and important for me.

12/19/2003 4:41:29 PM 93655 articles. 6 followers. Follow

3 Replies

Similar Articles

[PageSpeed] 0

onkeypress is a "client side event", so you will not be able to use your server side logic at inside that event.
Christian Calderon
Need to work in Classic ASP? then do it the right way with CLASP!
Classic ASP Framework
12/19/2003 4:49:38 PM
As Christian said, you can only use javascript to catch the onkeypress.  You could try saving your DB session inside the ViewState, i.e. ViewState("DBSession") = DBConnection object

You could then have the javascript post back the key press and get your ViewState DBSession back...
I know this feature exists, but I have never used it before so I don't know the ease of implementing it.
12/19/2003 8:07:33 PM
Actually, you cannot store a connection object in the viewstate. The requirement to place things in the viewstate is they it has to be serializable.
Christian Calderon
Need to work in Classic ASP? then do it the right way with CLASP!
Classic ASP Framework
12/19/2003 8:41:01 PM

Similar Artilces:

.Net 2.0 Web application using is unable to create object of another dll writen in C# .net 2.0
Hi, I habe created one web application using which is adding reference of dlls written in C# and .net 2.0. But whenever trying to create object of referencing dll, it is throwing error :Object reference does not set to an object. But, locally it is working fine,. In the server i have deployed the .aspx files and dll files in the bin. There were already an web.config in the server which is of .net 1.1. But checked it is retrieving value for that web.config correctly. Should i have to deply any other files and if not what can be the solution for this? Please help. Thanks, So...

hei guys, i need help on my application, i'm using C#.NET as front-ed and SQL as back-end, aside from a datagrid, i want to display my data using textboxes and not a datagrid, i can do it using Visual Basic 6 but since i'm a newbee at C#.NET i don't know how to do it, specially the codes, can anyone help me with it? thank you in advance! If you are doing windows development, i would suggest using 'DataForm wizard' (Use Solution Explorer-->Rightclick project-->Add new Item-->New DataForm). It will guide you through steps. If you are doing web apps. Use quickstart to learn them. h...

Innovation to ADO.NET
Matisse Software Inc. provides its native ADO.NET Data provider for Matisse 6.0, the Database for .NET. Matisse Software has pushed the envelope of Microsoft ADO.NET architecture and extended it into a powerful Object Access Services component for .NET. Matisse’s extension of ADO.NET demonstrates that ADO.NET can evolve beyond the Microsoft architecture to benefit .NET developers. Unlike the standard ADO.NET data provider, which returns data in a table format to integrate seamlessly with relational products, Matisse has extended the ADO.NET architecture to return data in an object format....

optional to use ADO.NET for data access
I've read somewhere that it is optional to use ADO.NET for data access.  Is this true? I find it hard to grasp.  In one tutorial, on the website (, there is a lesson about databinding (lesson 7) where it can retrieve data without ADO.NET... I think this is just a matter of semantics.  When you databind from a source in the way they show there, you don't have to go through the effort of creating the command object, reading its data and manually plugging the data into whatever rendering control you are using, you simply databin...

I installed ODP.NEt 2.0 on top of my Oracle client 10g. I am developing a Data Access component. I am having the below problem.  I created the Data Layer class. The constructor of the data layer class initiates a new Oracle Connection.  then I assign the Oracle Transaction obbject to the open connection. In my web page, I instantiate the DataLayer class and then call BeginTransaction method.  At this point, my connection object is null.  What am I missing?  I am getting Externalcontext connection error and Internalcontext error with the error message "Specified slot...

Sending SMS using or using or
Hi  My requirement is I hav one csv file with these fields id,mobilenum,messgae,status.intiallu staus is 0. once i read the all fileds and take that mobile number.using tat mobile number  i need to send sms .after sending sms i shuld change status as 1 How to send sms thru coding (please dont provide any links.if it is provide also please give working links becox i checked codeproject .i didnt get any nice link. and also provide the how to update the status field im csv file   Thank ssandhya   To send SMS, you need some third party SMS providers. if you consul...

populating web form objects when using Visual Studio.NET
What is the best way of creating datasets for pages and populating web form objects. I have always created datasets within a sub routine and then populated my web form controls from that dataset. I was given some code that the pages were created in visual studio. I know the page gets its data from a stored procedure. What I can't find is code that calls that stored procedure and also populates the web form objects. Most of my development has been done on the page and not in Visual Studio. So if someone could tell me what to look for that would be great. Well, t...

ORM.NET v.16
Olero Software has released version 1.6 of ORM.NET - the popular object relational mapping and code generation tool. ORM.NET saves .NET developers significant time and effort by generating a complete ADO.NET based Data Access Layer (DAL) modeled on an existing SQL database schema. Version 1.6 NOW SUPPORTS VB.NET code generation as well as the ability to easily customize project namespaces. Download a free trial and see the difference ORM.NET will make on your next .NET project at Stop manually coding your ADO.NET data access layer! ...

Implementing .Net Form into an web form, can this be done
I am new here, but have been searching for a while, and may not have the correct lingo to find what I am looking for.  I am tasked with implementing a .exe application that was writen vb6 then converted to .net into a new website my team is developing. The idea is to put each of the 3 different forms in this .exe application of 3 different .aspx pages. I have attempted multiple things to get this into the page and even started to just rewrite it as an web form, but even then I can't reuse any of the code since the System.Web.UI.Page doesn't inherit the sa...

Help Please-writing form data to ms access using
Hi, I am trying to write data entered via a form into ms access using On compilation, I get the error message - Compiler Error Message: BC30648: String constants must end with a double quote. I believe my sql statement is written incorrectly. Could someone help me please? In addition, I would like to post the data to the database only after the data has been validated, can anyone recomment how to go about it? Thanks, code is as follows:<script runat="server">Sub Submit_Click(sender As Object, e As EventArgs) Dim connectionString As StringconnectionString = "Pro...

How to use Web Developer Express or VB.Net to access data from Fox Pro
How to use Web Developer Express or VB.Net to access data from Fox Pro   I am going through the elementary tutorials in Web Developer Express and database tutorials using SQL 2005 Express. All of a sudden, a friend asks whether we can use the and Web Developer to access data from Fox pro tables, process the data and save them in Word or Excel and then convert them into PDF documents to send out via the email.   I would appreciate it if someone could enlighten me on the first part first, as I have no experience in using Fox pro at all.   Can some one show me some ...

Access data using web service from a Dot Net windows user control
Hi, I have a Windows Control Library and many UserControls in them. I added the output .DLL to another web project. I have put the dll in the root folder of the website. Now, in my .aspx pages I will declare <object> as follows. <object id="some id" name="some name" classid="some.dll#namespace.usercontrol name" width="578" height="404">    <param name="DAWebServiceUrl" value="<%=DAWebServiceUrl%>" /></object> This works fine if the url of the website has LOCALHOST. If I use t...

The way I see the design in the most basic forms, that the DAL is referenced in Business Logic Layer, where data returned by the entities is stored in a class.That class is referenced by both the UI and BLL. Right? There is no other way to do it I think, because the moment you let the developer reference the entity in UI, then you lose the separation of data.ORRRRRRRRR maybe there is a way to return an Entity Type to UI from BLL without referencing the DAL?BTW I've searched the web, not much there, as I think relatively few systems have yet to take advantage of this technology this deepl...

System.Data, Is ADO.NET is the best way to access data
   Can any one give me simple example on how to open a cursor to get data and field names and types. Is this the best way?  The System.Data namespace provides access to classes that represent the ADO.NET architecture. ADO.NET lets you build components that efficiently manage data from multiple data sources.  Is this a good example.  Is this efficient?  How do I also print the field names?  Please help DataSet GetData(String queryString) { // Retrieve the connection string stored in the Web.config file. String connectionString = ConfigurationManager...

Web resources about - How to access data using objects onkeypress event -

Frequently Asked Questions - Australia
Frequently Asked Questions - Australia

The Constitutional Centre of Western Australia - The Role of the High Court
... accesskey="S" title="Enter search words" class="searchBox" class="ms-sbplain" alt="Enter search words" onkeypress="javascript:if (event.keyCode==13) ...

Media Statements - Home
Media Statements of the Premier and Ministers of the Western Australia State Government. Media releases.

当前位置:首页 > 招贤纳士
... onafterpaste="if(page.value 1)page.value='';page.value=page.value.replace(/\D/g,'');" onKeyPress="if(page.value 1)page.value='';page.value=page.value. ...

AMD Processors for Servers and Workstations: AMD Opteron™ Processor
" id="ctl00_csbAllResults_txtSearch" class="searchTextBox" onkeypress="if(value.length==0){isSearchValue=false;}else{isSearchValue=true;}" o ...

Point Of View: Δεν καταλαβαίνεις; -
... κακό... > :(" onmouseover="current_rating(2358, 1, 'Πολύ κακό... > :(');" onmouseout="ratings_off(3.7, 4, 0);" onclick="rate_post();" onkey ...

Issues - google-web-toolkit - Google Web Toolkit (GWT) - Google Project Hosting
My favorites ▼ - Sign in google-web-toolkit Google Web Toolkit (GWT) Project Home Downloads Wiki Issues Source New issue Search Search within: ...

Palast Investigative Fund Store
... == 0) {this.className = 'hint'; this.value = 'input key words here';}" type="text" maxlength="200" width="20" id="searchBox" onkeypress="se ...

- Review of New Cars - New York Times
New York Times Autos 5) this.value = ''; this.setAttribute('maxlength', 5); " onkeypress="var key; if(window.event) { key = window.event.keyCode; ...

Sample Contracts - License Agreement - BTG International Ltd. and TolerRx Inc. - Business Agreements ...
... if (this.createTextRange) { var r = (this.createTextRange(); r.moveStart('character', (this.value.length); r.collapse();; }}" on ...

Resources last updated: 12/29/2015 10:37:12 AM