Click here to Skip to main content
15,916,426 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Repitition of records Pin
rais patel10-Jul-06 2:05
rais patel10-Jul-06 2:05 
GeneralRe: Repitition of records Pin
Not Active10-Jul-06 2:13
mentorNot Active10-Jul-06 2:13 
GeneralRe: Repitition of records Pin
RichardGrimmer11-Jul-06 5:20
RichardGrimmer11-Jul-06 5:20 
GeneralRe: Repitition of records Pin
Brent Lamborn10-Jul-06 7:02
Brent Lamborn10-Jul-06 7:02 
Questionhow to do this Pin
Sandeep Akhare10-Jul-06 0:48
Sandeep Akhare10-Jul-06 0:48 
AnswerRe: how to do this Pin
_AK_10-Jul-06 0:59
_AK_10-Jul-06 0:59 
AnswerRe: how to do this Pin
Amit Agarrwal10-Jul-06 1:04
Amit Agarrwal10-Jul-06 1:04 
QuestionDropdownlist List items collection from database Pin
For_IT10-Jul-06 0:35
For_IT10-Jul-06 0:35 
Hi all

I want to add dropdownlist listitem collection from the database. How can I do this databinding with the database. I am using following code, but it binds the default data to the dropdown list and listitems are static.


<asp:DropDownList ID="dropdownAuflage" runat="server" DataSourceID="DropDownDataSource" DataTextField="field_defaultvalue" >
<asp:ListItem>Item 1</asp:ListItem>
<asp:ListItem>Item 2</asp:ListItem>
<asp:ListItem>Item 3</asp:ListItem>
<asp:ListItem>Item 4</asp:ListItem>
</asp:DropDownList>

This code displays the list items, but I want to bind this listitem data with the database.
At present I have four list items and I want to give advantage to user to add more in future if he wishes to do so. So I do not want to hard code the list items in the code.

Can anyone please tell me how can I do it.

Thanks.
AnswerRe: Dropdownlist List items collection from database Pin
_AK_10-Jul-06 0:38
_AK_10-Jul-06 0:38 
GeneralRe: Dropdownlist List items collection from database Pin
For_IT10-Jul-06 4:16
For_IT10-Jul-06 4:16 
GeneralRe: Dropdownlist List items collection from database Pin
_AK_10-Jul-06 20:20
_AK_10-Jul-06 20:20 
GeneralRe: Dropdownlist List items collection from database Pin
Amit Agarrwal11-Jul-06 21:10
Amit Agarrwal11-Jul-06 21:10 
Questionhow to use subdomain Pin
Amit Agarrwal10-Jul-06 0:31
Amit Agarrwal10-Jul-06 0:31 
AnswerRe: how to use subdomain [modified] Pin
Guffa10-Jul-06 3:11
Guffa10-Jul-06 3:11 
GeneralRe: how to use subdomain Pin
Amit Agarrwal10-Jul-06 19:21
Amit Agarrwal10-Jul-06 19:21 
AnswerRe: how to use subdomain Pin
Guffa11-Jul-06 9:29
Guffa11-Jul-06 9:29 
GeneralRe: how to use subdomain Pin
Amit Agarrwal11-Jul-06 19:27
Amit Agarrwal11-Jul-06 19:27 
GeneralRe: how to use subdomain Pin
sudharsong12-Jul-06 0:56
sudharsong12-Jul-06 0:56 
GeneralRe: how to use subdomain Pin
Amit Agarrwal12-Jul-06 1:26
Amit Agarrwal12-Jul-06 1:26 
AnswerRe: how to use subdomain Pin
Guffa12-Jul-06 6:27
Guffa12-Jul-06 6:27 
GeneralRe: how to use subdomain Pin
Amit Agarrwal12-Jul-06 19:45
Amit Agarrwal12-Jul-06 19:45 
AnswerRe: how to use subdomain Pin
Guffa13-Jul-06 11:47
Guffa13-Jul-06 11:47 
GeneralRe: how to use subdomain Pin
Amit Agarrwal13-Jul-06 21:02
Amit Agarrwal13-Jul-06 21:02 
QuestionEdit item in Data Grid Pin
venkatasivaramaprasad10-Jul-06 0:25
venkatasivaramaprasad10-Jul-06 0:25 
AnswerRe: Edit item in Data Grid Pin
_AK_10-Jul-06 0:40
_AK_10-Jul-06 0:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.