473,772 Members | 3,603 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to retrive data in textbox from combo box?

7 New Member
hi,
i am working on asp
i am facing problem in asp , combox
i want to retrive data in textbox , from combobox .
in combobox , when i select particular user , i want to fetch that regarding data from database in the textfield .

so i am facing problem that
reply

thanks
Feb 16 '07 #1
4 4005
clain
79 New Member
seriously ... i find it hard to understand ... can you be more clear ?
. so that we Can answer....
Feb 21 '07 #2
avdbrink
12 New Member
Hi,

Try to post the form in an onchange event of the <select> element using javascript. You can then, on reloading the page get the required data from your database and show it in the form.

Cheers!
Arno
Feb 21 '07 #3
khyati30
7 New Member
seriously ... i find it hard to understand ... can you be more clear ?
. so that we Can answer....
hello friend,
i am saying you clearly here
i have one combobox & 2 or 3 textbox . i have a one database table like user .
the user table values are fetched in the combobox from database.
i have done it properly .but problem is here .
when i am seletcting the paricular value from combobox , according to that values are select & directly field in to the textboxes from datbase .
so , i can't do it
help me
thanks
Feb 23 '07 #4
vijaydiwakar
579 Contributor
hello friend,
i am saying you clearly here
i have one combobox & 2 or 3 textbox . i have a one database table like user .
the user table values are fetched in the combobox from database.
i have done it properly .but problem is here .
when i am seletcting the paricular value from combobox , according to that values are select & directly field in to the textboxes from datbase .
so , i can't do it
help me
thanks
This code may give u help
Expand|Select|Wrap|Line Numbers
  1. Private Sub cboMode_DropDown()
  2.  
  3.     Dim sSql        As String
  4.     Dim Rsdata      As New ADODB.Recordset
  5.     sSql = ""
  6.     sSql = "Select CompID , CompName From Company"
  7.     Rsdata.Open sSql, c_Cnn, adOpenForwardOnly, adLockReadOnly
  8.     cboMode.Clear
  9.     While Not (Rsdata.EOF Or Rsdata.BOF)
  10.         cboMode.AddItem Rsdata!CompName & ""
  11.         cboMode.ItemData(cboMode.NewIndex) = Rsdata!CompID & ""
  12.         Rsdata.MoveNext
  13.     Wend
  14.     Set Rsdata = Nothing
  15. End Sub
  16.  
  17. on change event of combo write
  18.  Dim sSql        As String
  19.     Dim Rsdata      As New ADODB.Recordset
  20. ssql=select * from table where compid=" &  Val(cbomode.ItemData(cbomode.ListIndex))
  21. ' write the code here
  22.  
  23.  
Feb 23 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
4012
by: Smith_X | last post by:
I have access database which I willuse form to retrieve a field to show in List of combo box. the method that I use now is adodb code when form load is show below. Private Sub Form_Load() Dim sql As String Dim i As Integer StrConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path &
3
1813
by: James | last post by:
Hi, I have a combo box(cmboParts) and the row source is a part name. Once a part is selected I have button(cmdOrderAdd) to add data about this part to a sub-form(frmParts_Ordered). However this sub-form does not have the field PartName. Instead it has a field called PartCode. Therefore i have had to set up a QBE to find PartCode(both PartName and PartCode are in the same table 'tblPart') and this will be used in the code for the button.
3
1411
by: epigram | last post by:
I've tried asking this question several times and have received many good answers, but ones that don't quite answer my question. This leads me to believe that I am trying to do something very awkward or I don't know how to pose the question correctly. Let me try again. I appreciate any input! :-) I have an asp.net web form with a TextBox control and a submit button. The TextBox control's text property is set on the server before it...
2
1137
by: Premkumar-Prem_kumar2003 | last post by:
Database details:- Four Categories r there. Every Category includes some Description. DATA BINDING FOR SELECTED INDEX CHANGED EVENT:- Req:- 1. Combobox 2. ListBox (or) Textbox (with multiline Property) BINDING:- Combo box will displays Categories
0
4166
by: Gian Paolo | last post by:
this is something really i can't find a reason. I have a form with a tabcontrol with tree pages, in the second page there is a Data GRid View. Plus i have a class. When i open the form i "inizialize" the Data Grid View (add a data sorce, filled with notthing at staratup, and hide some columns) when i put a code in the txtCLCOD textbox start a searsh. If i foud something i popolate the Data grid view on the second page. Now the magic if i...
0
1541
by: varaprasad204 | last post by:
hai all..., i used to store my mp3 file into database by <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %> <%@ import Namespace="System.IO" %> <%@ import Namespace="System.Data.SqlClient" %> <%@ import Namespace="System.Drawing.Imaging" %> <%@ import Namespace="System.Drawing" %> <%@ import Namespace="System.Data" %> <%@ import Namespace="System.Web.UI.WebControls" %> <script...
1
1648
by: ganesh22 | last post by:
Hi, Here the below code is for dynamically creating textboxs, its creating fine but after user enters some values in textboxs how can i retrive that values? using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls;
2
2461
by: semomaniz | last post by:
I have created two tables dynamically and have added textboxes inside the table. now i am trying to retrieve the data from the the textboxes and i am getting a null reference error. I am not sure why i am getting this error. Please advice. Code to set the tables protected void LoadCityStateControl(int origin, int destination) { //initializing the origin city/state controls Table city = new Table();
7
9594
reginaldmerritt
by: reginaldmerritt | last post by:
I have a few forms which i have designed to be subforms to a mainform that has no fields or record source. The forms have an unbound textbox and combo box, which i use to seach the data on these 'continuous' forms. Which works fine when i open them as main form. However, as soon as i use them as subforms i can't enter or select anything from the unbound textbox and combo box on the subform. I have checked both the mainform, subform and...
0
9620
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10104
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9912
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7460
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6715
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2850
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.