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 20-Nov-12 0:52am
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
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
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

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

  Print Answers RSS
0 DamithSL 335
1 OriginalGriff 209
2 BillWoodruff 170
3 Zoltán Zörgő 165
4 Maciej Los 123
0 OriginalGriff 7,854
1 DamithSL 5,949
2 Sergey Alexandrovich Kryukov 5,449
3 Maciej Los 5,084
4 Kornfeld Eliyahu Peter 4,539


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

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100