Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > strange question about DropDownList

Reply
Thread Tools

strange question about DropDownList

 
 
Detective
Guest
Posts: n/a
 
      01-15-2006
hi:
when i used code below and bind with access i could get the resoult what i
want, but when i use sqlserver i got an exception about
System.ArgumentOutOfRangeException which argument is lev.how can i solve this
problem ,thank you:
///////////////////////////////////////////////////////////////////////////////////////
<aspropDownList id="DropDownList2" Width="144px"
SelectedValue='<%#DataBinder.Eval(Container.DataIt em, "lev")%>' Runat=server
>

<asp:ListItem>test1</asp:ListItem>
<asp:ListItem>test2</asp:ListItem>
</aspropDownList>
 
Reply With Quote
 
 
 
 
Axel Dahmen
Guest
Posts: n/a
 
      01-16-2006
From what I see, the value you provide in the "lev" column is neither
"test1" nor is it "test2", have you checked your SQL? Perhaps you've got
different data in you SQL Server database than you had in the Access
database.

HTH,
Axel Dahmen


--------------
"Detective" <(E-Mail Removed)> schrieb im Newsbeitrag
news:(E-Mail Removed)...
> hi:
> when i used code below and bind with access i could get the resoult what

i
> want, but when i use sqlserver i got an exception about
> System.ArgumentOutOfRangeException which argument is lev.how can i solve

this
> problem ,thank you
>

////////////////////////////////////////////////////////////////////////////
///////////
> <aspropDownList id="DropDownList2" Width="144px"
> SelectedValue='<%#DataBinder.Eval(Container.DataIt em, "lev")%>'

Runat=server
> >

> <asp:ListItem>test1</asp:ListItem>
> <asp:ListItem>test2</asp:ListItem>
> </aspropDownList>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
GridView: Filter DropDownList for another DropDownList =?Utf-8?B?SnVhbmpv?= ASP .Net 0 12-29-2005 07:44 AM
GridView: Filtr DropDownList from another DropDownList =?Utf-8?B?SnVhbmpv?= ASP .Net 0 12-23-2005 01:31 PM
databinding a Dropdownlist to another dropdownlist tshad ASP .Net 8 10-19-2005 10:00 PM
Using a data-bind dropdownlist to populate another data-bind dropdownlist mr2_93 ASP .Net 1 10-02-2005 05:07 PM
Question About Strange 'C' Code Syntax ( Well strange to me anyway ) Harvey Twyman C Programming 8 10-25-2003 05:54 AM



Advertisments