Frist I add before Data Binding.It is not doing anything.Then I add after data 
binding.Now it is working.
Abhi

Robert Filipiak <[EMAIL PROTECTED]> wrote:
Where do you have your code? Before or after you bind the DropDown?
---------- Original Message ----------------------------------
From: abhilash donepudi <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Date:  Mon, 20 Sep 2004 08:03:40 -0700 (PDT)

>Hi 
>   Thanks for your responce guys.
>   I add the following code in Page_load event.
> 
>   lstCategory.Items.Insert(0, new ListItem("  "))
> 
>   It is not adding any new item to the dropdownlist.Just I want a space as the 
> default item.
> 
>Abhi
>
>
>Peter Brunone <[EMAIL PROTECTED]> wrote:
>
>      Or, if you want a different value from the text in your item,
>
>ddl.Items.Insert(0, new ListItem("Your Text", "YourValue")
>
>
>Peter Brunone
>___________________
>www.EasyListBox.com
>
>-----Original Message-----
>From: DJ Sampson [mailto:[EMAIL PROTECTED] 
>
>
>ddl.Items.Insert(0, new ListItem("yourtextgoeshere))
>
>abhilash donepudi <[EMAIL PROTECTED]> wrote:
>
>Hi
>
>     I am using dropdown list box and grabbing the data from data
>source.It is taking the first value as selected. I try to add a space in
>the dropdownlist box but no luck.This is the following code.
>
>Any help is appreciated.
>
>Abhi
>
><tr> 
>             <td align="left" class="TextSmall">Catogery Search:</td> 
>                 <td align="left"><asp:dropdownlist CssClass="TextSmall"
>DataTextField="Code" DataValueField="Code" ID="lstCategory"
>runat="server" Width="350">
>      <asp:listitem> </asp:listitem>
>     </asp:dropdownlist>
>                   </td>
>            </tr>
>
>
>
>Yahoo! Groups SponsorADVERTISEMENT
>
>
>---------------------------------
>Yahoo! Groups Links
>
>   To visit your group on the web, go to:
>http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
>  
>   To unsubscribe from this group, send an email to:
>[EMAIL PROTECTED]
>  
>   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 
>
>
>            
>---------------------------------
>Do you Yahoo!?
>Yahoo! Mail - You care about security. So do we.
>
>[Non-text portions of this message have been removed]
>
>
>
>
> 
>Yahoo! Groups Links
>
>
>
> 
>
>

--
Bob Filipiak
A question not asked
is a missed opportunity to learn!
--

Yahoo! Groups SponsorADVERTISEMENT


---------------------------------
Yahoo! Groups Links

   To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
  
   To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
  
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 


                
---------------------------------
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.

[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to