-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: Kantha
Message 3 in Discussion






One way of doing this is<o:p></o:p>


To create a function which returns a
dataset which has the column project type.<o:p></o:p>


<o:p> </o:p>


public DataSet
ProjectTypeList()<o:p></o:p>


{<o:p></o:p>


      string ConStr =
"server=(local);database=ProjectDB";<o:p></o:p>


      SqlConnection SqlCon = new SqlConnection(ConStr);<o:p></o:p>


      SqlCon.Open();<o:p></o:p>


      string Projlist =
"select ProjectType from Project";<o:p></o:p>


      SqlDataAdapter dalist = new SqlDataAdapter(Projlist,SqlCon);<o:p></o:p>


      DataSet ds = new DataSet();<o:p></o:p>


      dalist.Fill(ds , "Project");<o:p></o:p>


      return (ds);<o:p></o:p>


}<o:p></o:p>


<o:p> </o:p>


Then
call this function to populate the dropdown this way<o:p></o:p>


<o:p> </o:p>


DropdownList.DataTextField
= "ProjectType";<o:p></o:p>


DropdownList.DataSource
= ProjectTypeList();<o:p></o:p>


DropdownList.DataBind();<o:p></o:p>


<o:p> </o:p>


Hope this helps solve ur
problem. There are other ways too��.<o:p></o:p>


<o:p> </o:p>


<o:p> </o:p>








From: sanii18
[mailto:[EMAIL PROTECTED] 

Sent: Tuesday, June 15, 2004 4:21
PM

To: 'BDOTNET'

Subject: DropDown List Problem<o:p></o:p>


<o:p> </o:p>


<o:p></o:p>


 
  
  
<o:p></o:p>
  
  
  
New
  Message on BDOTNET<o:p></o:p>
  
 
 
  
  
<o:p></o:p>
  
 





<o:p> </o:p>


DropDown List Problem<o:p></o:p>


 
  
  
Reply

  <o:p></o:p>
  
  
  
   
    
    
 <o:p></o:p>
    
    
    
Reply to Sender   Recommend
    <o:p></o:p>
    
    
    
Message 1 in
    Discussion <o:p></o:p>
    
   
  
  
<o:p></o:p>
  
 
 
  
  
   
    
    
From: sanii18 <o:p></o:p>
    
   
   
    
    
<o:p> </o:p>
    
    
 <o:p></o:p>
    
    
    
Hi..<o:p></o:p>
    
 <o:p></o:p>
    
I have a drop down list..Say ProjectTypeList which
    have two or three items like Chip,Fullchip,Protocol etc..<o:p></o:p>
    
And i have table Project which have Projecttype
    Column..i want the particular type from that table should be selected.. in
    that list.<o:p></o:p>
    
 <o:p></o:p>
    
 <o:p></o:p>
    
Please do help me..<o:p></o:p>
    
 <o:p></o:p>
    
 <o:p></o:p>
    
    
   
  
  
<o:p></o:p>
  
 





View other groups in this
category. 



 language="JavaScript"  type="text/javascript">
document.write(''); 
</script>



-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/BDOTNET/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to