how to add values in database using drop down list when the list is connected to a database column already????

hi there all....

well i am working on my web site.....i have inserted a drop down control which i have connected with my database table column....now i want to add the values in the same database column in other table connected with the primary key.....now can any one tell me the code as how to insert the values in the column from this drop own list control????

0
quaddus
4/20/2006 3:37:35 PM
asp.net.getting-started 91979 articles. 3 followers. Follow

1 Replies
837 Views

Similar Articles

[PageSpeed] 35

Hello:

Could you please illustrate more on what you are trying to do? Do you want to store back the dropdownlist elements back to the database? Or what exactlt?

Regards


Bilal Hadiar, MCP, MCTS, MCPD, MCT
Microsoft MVP - Telerik MVP
0
haidar_bilal
4/20/2006 5:18:50 PM
Reply:

Similar Artilces:

Drop down list in Form view returns error when value in bound field (data binding
I get the following error when I click edit to edit the details in the web form:'ddlUserRestrictionType' has a SelectedValue which is invalid because it does not exist in the list of items.Parameter name: value  I would like it to accept any value which currently exists in the database. Is this easily achievable? With what you've posted, all I can tell is that you are trying to set the SelectedValue of a ddl to a value that does not exist in the list.  It would be helpful if you can post some code and the expected values of this control.~ Timwww.bucketo...

How to get the list of second drop-down-list based on value selected in the first drop-down-list
I have two drop-down-lists, the second one depends on the value chosen in the first drop-down-list.  In the first drop-down-list, I have AutoPostBack = "true" and OnSelectedIndexChanged = "SelectedIndexChanged" In the selectedIndexChanged method, I do the following: 1    protected void SelectedIndexChanged(object sender, EventArgs e)2        {3            if (IsPostBack)4            {5      &nbs...

Drop down list to get value from Database
my case is that I have one table which contains several templates in DB Table: eConfirmationTempNameTemp1Temp2Temp3 In the interface, I will allow the users to choose the template by using the "drop down list".After click the "Confirm" button, it should be able to retreive the approprite template of which is selected by the user. And using this template as email template to send da letter.I have some coding here, how can I get the value from drop down list and choos the right template to send the email================================================================...

Values not being stored in database when using cascading drop down list
I am trying to insert country/state values for a record (amongst others) and they are going in the database as 0's.  How can I get my insert method to 'pick up' the selected values of the cascading drop down list?  Code: <asp:Content ID="Content1" ContentPlaceHolderID="Main" runat="Server"> <asp:ScriptManagerProxy ID="ScriptManagerProxy2" runat="server"> </asp:ScriptManagerProxy> <asp:DetailsView ID="dvPerson" runat="server" AutoGenerateRows="False" DataKeyNames="PersonID" DataSourceID="OBS_PersonDetail" Font-Size="10pt" Height="50px" Width="800px"> &...

using value from a drop down list to select database name for query
Thanks in advance to anyone who can help me out. I've been at this one for a little while now and am getting nowehere fast.  I have a drop down list available for my coworkers to select a database for which they want to view the stored procedures. That select statement selects the db names as "dbname" In my statement to display the procedures for the db that has been selected I have:  <asp:SqlDataSource ID="sdsAdmin" runat="server" ConnectionString="<%$ ConnectionStrings:masterConnectionString %>" SelectComman...

get list from database, email list
------_=_NextPart_001_01C184E6.5FF8A600 Content-Type: text/plain; charset="iso-8859-1" Hi again: This is my first attempt at trying to pull info from a database ... but this is my goal: A few days ago, I was having problems emailing a list of users ('documentation about perl / email' ... thanks to Brett and Jenda for the pointers) and I got to thinking, "Why not go directly to the database, get the list of users and append \@domain.com at the end and send the message on it's way?" In my current script, however, I'm trying to figure out h...

I have a drop down list bound to a database table. How can i add 'Choose from list' as my first selected option..
I have a drop down list bound to a database table. How can i add 'Choose from list' as my first selected option even though this is not coming from table? is this possible? a couple of ways: Set AppendDataBoundItems to True so your statically defined ListItems wont get wiped out when you databind additional items. <asp:DropDownList ID="DropDownList1" runat="server" AppendDataBoundItems="True"> <asp:ListItem>Choose from list</asp:ListItem> </asp:DropDownList> or after databinding, you can insert...

UPDATE: RE: get list from database, email list
------_=_NextPart_001_01C184FB.1C71EAD0 Content-Type: text/plain; charset="iso-8859-1" Update: I think I may be closer than I thought! In the original code, I *thought* I was bringing back the entire select output. I *believe* I was only bringing in one row. I am trying to recreate it by testing from another table. It brings the first row; but now, the 'fetchrow' part of it *seems* to be working, but it's only 'fetching ONE row'... How do I bring back an entire array / list from the select statement I just made? [code] #!/usr/bin/p...

Drop down list state or getting the right value from the list
 Just a little background hopefully someone can help me ive been at this for about 1 week now i cant seem to get it. Im using 1.1 i dynamically load a bunch of drop down lists on a page from a sql 2k database. When i load the page everything is fine. The issue is when i postback. I select an index in a drop down but it doesnt stay  im trying to redirect when the value is chosen but all it is doing is reloading the dropdown with all the data Ive tried adding a button to grab the value of whats in the drop down but i cant do that if every time the page reloads back to the server it r...

Database entry using drop down lists.
I'm new to asp.net. Anywhere here is my problem. I have 4 drop down lists pulling data from a database. Im having trouble figuring out where to start. I created a button but im not sure where to start in the C# code. When this button is clicked I want it tocall a sql statement that takes the data input in the drop down lists and places them in the appropriate fields. The four drop down lists contain these values. Name, ObjectiveID, Score, DateCompleted. What im not sure is if i have to manually open a connection to the database in the protected void Button1_Click(object sender, Even...

Drop Down List Value Selection from Database
Like I said in another thread, I have a web application that displays a user's information when the user signs in. I can get the correct data to display in the textboxes, but there are a few drop down menus that are not changing. My code is.... Code: Dim dSet As DataSet dSet = STNcd.FillData(Mid) txtfName.Text = dSet.Tables(0).Rows(0)("fname").ToString() txtlName.Text = dSet.Tables(0).Rows(0)("lname").ToString() txtEmail.Text = dSet.Tables(0).Rows(0)("email").ToString() txtCompany.Text = dSet.T...

cascading drop down list using database
   hello..i had refer to this tutorial to do d cascading DDL. http://www.asp.net/AJAX/AjaxControlToolkit/Samples/Walkthrough/CCDWithDB.aspx [WebMethod] public CascadingDropDownNameValue[] GetModelsForMake(string knownCategoryValues,string category) { StringDictionary kv = CascadingDropDown.ParseKnownCategoryValuesString( knownCategoryValues); what is StringDictionary mean? why i got the error told that the type could not be found in the web service?thanks               Have you included the cor...

How to get a list of users connected to the database?
The subject says it all - How do I get a list of users (or second best a count of users) that are attached to my sqlA db?? Look at the "System functions" in the online help. There are a couple of those functions that you'll need to use. Seems like they should ship SQL Anywhere with a set of procedures that do what you are asking. -- Jim Egan [TeamPS] Dealer Solutions, LLC Houston, TX Yo Joe: Check out the system stored procedures dbo.sa_conn_properties or dbo.sa_conn_info. Either one shows how to do this, they're stored in the sys.sysprocedure table. Us...

how to retrieve value from database to drop down list?
i have the value "Mr" from database for shopper id 1, in my dropdownlist i populate items on page load.. when i open the page.. i want Mr to be the selected value on default how to do this?  ddltitle.Items.Add            ddltitle.Items.Add("Dr")            ddltitle.Items.Add("Miss")            ddltitle.Items.Add("Mr")            dd...

Web resources about - how to add values in database using drop down list when the list is connected to a database column already???? - asp.net.getting-started

Bowe Bergdahl’s Attorney Lashes Out at Donald Trump for ‘Defamation’
(WASHINGTON) — The attorney for Army Sgt. Bowe Bergdahl lashed out on Tuesday at Republican presidential candidate Donald Trump and congressional ...

Rajon Rondo Refuses to Apologize for Calling Gay NBA Ref Bill Kennedy a ‘Faggot’
NBA player Rajon Rondo is refusing to apologize for calling gay referee Bill Kennedy a “motherf–king faggot” at a game last week in Mexico City. ...

Man arrested in toymaker hack that exposed data for millions of kids
Enlarge UK police said they have arrested a 21-year-old man in connection to the November breach of electronic toymaker VTech , a hack that ...

Forget Stars, You Might Be Able To Rate Uber Drivers With An Emoji Soon
Who wants to get five stars when they can get a smiley face or a thumbs up instead? That’s the idea behind a new rating system Uber is testing. ...

GOP Rep on Fox: ISIS Poses ‘Existential Threat’ to U.S., But So Might Obama
In an interview with Fox News’ On the Record , Republican Pennsylvania Congressman Scott Perry wondered whether or not the administration of ...

Los Angeles Schools Closed, But New York Schools Remain Open After Similar Threat
Los Angeles schools closed after receiving a bomb threat earlier today, but New York schools opted to stay open after receiving a similar threat. ...

#AGU15 Religion and Climate Change addressed
I attended this session yesterday, and I cam away with the impression that these researchers are holding their noses while they are forging ahead ...

Lamar Odom Has Memory Loss & Brain Damage From Overdose: Anxious Khloe Kardashian Slams Kris Jenner For ...
Lamar Odom has severe memory loss resulting from the drug overdose allegedly responsible for the medical crisis he suffered in a Nevada brothel. ...

Saudi Arabia announces 34-state Islamic military alliance against terrorism
Reuters Saudi Arabia announces 34-state Islamic military alliance against terrorism Reuters DUBAI/PARIS A new Saudi-led Islamic alliance to ...

Cosby sues 7 accusers for defamation, seeks damages and retractions
wreg.com Cosby sues 7 accusers for defamation, seeks damages and retractions wreg.com NEW YORK CITY: Bill Cosby has struck back against some ...

Resources last updated: 12/15/2015 6:32:45 PM