Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
Hi All,
I have 3 dropdownlists are there in my task.Every dropdownlist have multiple values.Those are like state,city,mandal .Every control have multiple values.i want to save those values in database at a time.
 

Thanks&Regards
Hari
Posted 19-Nov-12 23:52pm
Comments
faisal23 at 20-Nov-12 6:17am
   
Please specify your question properly. On which event you have to save values and which values , etc.
Hari Krishna Prasad Inakoti at 21-Nov-12 1:39am
   
<html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> <script language="javascript" type="text/javascript"> function state() { var select=new Array("-Select-"); var jammu=new Array("-Select-","Srinagar","Kathua","Doda","Kishtwar","Poonch","Rajouri"); var punjab=new Array("-Select-","Ludhiana","Amritsar","Bathinda","Firozpur"); var andhrapradesh=new Array("-Select-","Adilabad","Anantapur","Chittoor","YSR Cuddaph","East Godavari", "Guntur","Hyderabad","Karimnagar","Khammam","Krishna","Kurnool","Mahbubnagar","Medak","Nalgonda", "Shri Potti Sriramulu Nellore","Nizamabad ","Prakasam","Rangareddi","Srikakulam","Visakhapatnam","Vizianagaram","Warangal ","West Godavari"); var tamilnadu=new Array("-Select-","Chennai","Coimbatore","Cuddalore","Dharmapuri","Dindigul","Erode","Kancheepuram","Kanyakumari","Karur","Krishnagiri","Madurai","Nagapattinam","Namakkal","Nilgiris","Perambalur","Pudukkottai","Ramanathapuram ","Salem","Sivaganga","Thanjavur","Theni","Thiruvallur","Thiruvarur","Thoothukudi","Tiruchirappalli","Tirunelveli","Tiruvannamalai","Vellore","Villupuram","Virudhunagar"); var karnataka=new Array("-Select-","Bangalore","Mangalore","Mysore","Darwad"); var i,j; var selectedBoxValue=document.getElementById('<%=ddlstate.ClientID%>').value; var stateLength=eval(selectedBoxValue).length; var selectcityvalue=document.getElementById('<%=ddlcity.ClientID%>').value; var citylength=eval(document.getElementById('<%=ddlcity.ClientID%>')).length; document.getElementById("ddlcity").options.length = 0; for(i=0;i<document.getelementbyid('<%>
Krunal R at 20-Nov-12 6:30am
   
What have you tried so far ?? Show us your code...
Hari Krishna Prasad Inakoti at 21-Nov-12 1:38am
   
<html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> <script language="javascript" type="text/javascript"> function state() { var select=new Array("-Select-"); var jammu=new Array("-Select-","Srinagar","Kathua","Doda","Kishtwar","Poonch","Rajouri"); var punjab=new Array("-Select-","Ludhiana","Amritsar","Bathinda","Firozpur"); var andhrapradesh=new Array("-Select-","Adilabad","Anantapur","Chittoor","YSR Cuddaph","East Godavari", "Guntur","Hyderabad","Karimnagar","Khammam","Krishna","Kurnool","Mahbubnagar","Medak","Nalgonda", "Shri Potti Sriramulu Nellore","Nizamabad ","Prakasam","Rangareddi","Srikakulam","Visakhapatnam","Vizianagaram","Warangal ","West Godavari"); var tamilnadu=new Array("-Select-","Chennai","Coimbatore","Cuddalore","Dharmapuri","Dindigul","Erode","Kancheepuram","Kanyakumari","Karur","Krishnagiri","Madurai","Nagapattinam","Namakkal","Nilgiris","Perambalur","Pudukkottai","Ramanathapuram ","Salem","Sivaganga","Thanjavur","Theni","Thiruvallur","Thiruvarur","Thoothukudi","Tiruchirappalli","Tirunelveli","Tiruvannamalai","Vellore","Villupuram","Virudhunagar"); var karnataka=new Array("-Select-","Bangalore","Mangalore","Mysore","Darwad"); var i,j; var selectedBoxValue=document.getElementById('<%=ddlstate.ClientID%>').value; var stateLength=eval(selectedBoxValue).length; var selectcityvalue=document.getElementById('<%=ddlcity.ClientID%>').value; var citylength=eval(document.getElementById('<%=ddlcity.ClientID%>')).length; document.getElementById("ddlcity").options.length = 0; for(i=0;i<document.getelementbyid('<%>
ryanb31 at 20-Nov-12 7:58am
   
Where are you stuck?
Hari Krishna Prasad Inakoti at 21-Nov-12 1:36am
   
Hi ryanb31, If i select in State drop down list i want to save that state's entire city's list into database with that state name.
ryanb31 at 21-Nov-12 7:29am
   
Where are the cities? You'll just need to write code to do this. I guess I'm confused on what specifically you need. We can't write the code for you because there's a million ways to do it and it depends on what you have already.
Hari Krishna Prasad Inakoti at 22-Nov-12 2:34am
   
See below code: <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> <script language="javascript" type="text/javascript"> function state() { var select=new Array("-Select-"); var jammu=new Array("-Select-","Srinagar","Kathua","Doda","Kishtwar","Poonch","Rajouri"); var punjab=new Array("-Select-","Ludhiana","Amritsar","Bathinda","Firozpur"); var andhrapradesh=new Array("-Select-","Adilabad","Anantapur","Chittoor","YSR Cuddaph","East Godavari", "Guntur","Hyderabad","Karimnagar","Khammam","Krishna","Kurnool","Mahbubnagar","Medak","Nalgonda", "Shri Potti Sriramulu Nellore","Nizamabad ","Prakasam","Rangareddi","Srikakulam","Visakhapatnam","Vizianagaram","Warangal ","West Godavari"); var tamilnadu=new Array("-Select-","Chennai","Coimbatore","Cuddalore","Dharmapuri","Dindigul","Erode","Kancheepuram","Kanyakumari","Karur","Krishnagiri","Madurai","Nagapattinam","Namakkal","Nilgiris","Perambalur","Pudukkottai","Ramanathapuram ","Salem","Sivaganga","Thanjavur","Theni","Thiruvallur","Thiruvarur","Thoothukudi","Tiruchirappalli","Tirunelveli","Tiruvannamalai","Vellore","Villupuram","Virudhunagar"); var karnataka=new Array("-Select-","Bangalore","Mangalore","Mysore","Darwad"); var i,j; var selectedBoxValue=document.getElementById('<%=ddlstate.ClientID%>').value; var stateLength=eval(selectedBoxValue).length; var selectcityvalue=document.getElementById('<%=ddlcity.ClientID%>').value; var citylength=eval(document.getElementById('<%=ddlcity.ClientID%>')).length; document.getElementById("ddlcity").options.length = 0; for(i=0;i<document.getelementbyid('<%>

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 9,225
1 OriginalGriff 5,395
2 Peter Leow 4,100
3 Maciej Los 3,540
4 Abhinav S 3,333


Advertise | Privacy | Mobile
Web01 | 2.8.140415.2 | Last Updated 20 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid