﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Inland Empire .NET User's Group Forums / Inland Empire .NET User's Group / Begining ASP.NET  / Adding a static item to dropdownlist when it is binded to database / Latest Posts</title><generator>InstantForum.NET v4.1.3</generator><description>Inland Empire .NET User's Group Forums</description><link>http://forums.iedotnetug.org/forums/</link><webMaster>forums@iedotnetug.org</webMaster><lastBuildDate>Thu, 09 Sep 2010 16:28:15 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Adding a static item to dropdownlist when it is binded to database</title><link>http://forums.iedotnetug.org/forums/Topic168-63-1.aspx</link><description>Ah... I see: [php] injection!&lt;/P&gt;&lt;P&gt;Looking forward to the slides.&lt;/P&gt;&lt;P&gt;Gotta head out to work now...</description><pubDate>Tue, 29 Apr 2008 04:59:46 GMT</pubDate><dc:creator>steveh</dc:creator></item><item><title>RE: Adding a static item to dropdownlist when it is binded to database</title><link>http://forums.iedotnetug.org/forums/Topic168-63-1.aspx</link><description>Hi Stevem&lt;/P&gt;&lt;P&gt;i keep forgetting the slides, i ll do it tonight. i put the [php] tags cause %99 of the forums in the world  support this special tag, and anything u put in between this tag should be formatted nicely . apprarently our forum doesnt support it</description><pubDate>Mon, 28 Apr 2008 16:10:35 GMT</pubDate><dc:creator>volkanuzun</dc:creator></item><item><title>RE: Adding a static item to dropdownlist when it is binded to database</title><link>http://forums.iedotnetug.org/forums/Topic168-63-1.aspx</link><description>Thanks Volkan! But, why the [php]? Are those tags for VS2008?&lt;P&gt;Will you be posting your slides from Weeks 4 and 5 here too?&lt;/P&gt;&lt;P&gt;I will post my application soon, but I've been busy at work lately (conversion headaches). It is working, but I want to do some cleanup before I post it.&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;P&gt;P.S. You are to be commended for doing an excellent job of teaching us ASP.NET. I have already gained much insight and have been able to leverage what I already know in Delphi, Java, and Oracle toward C#, ASP.NET, and SQL Server. I personally feel the class has been worth my time.</description><pubDate>Mon, 28 Apr 2008 12:04:27 GMT</pubDate><dc:creator>steveh</dc:creator></item><item><title>Adding a static item to dropdownlist when it is binded to database</title><link>http://forums.iedotnetug.org/forums/Topic168-63-1.aspx</link><description>Hi,&lt;br&gt;today in the class, i was asked how to bind the dropdownlist to a sqldatasource, as wells as adding some static items. It is easy, you set the AppendDataBoundItems property of the dropdownlist to true, and add your static item., an example is below: there is a dropdownlist binded to sqldatasource which gets the categories from the northwind database, and also a static listitem is added to the dropdownlist. you can also see, how we can use requiredfieldvalidator :&lt;br&gt;[php]&lt;br&gt;&lt;asp&lt;img align="absmiddle" src="http://forums.iedotnetug.org/forums/Skins/IEDOTNET/Images/EmotIcons/BigGrin.gif" border="0" title="BigGrin"&gt;ropDownList ID="listCategories" runat="server" &lt;br&gt;            DataSourceID="SqlDataSource1" DataTextField="CategoryName" &lt;br&gt;            DataValueField="CategoryID" AppendDataBoundItems="True"&gt;&lt;br&gt;            &lt;asp:ListItem Text="Select a Category" Value="" /&gt;&lt;br&gt;        &lt;/asp&lt;img align="absmiddle" src="http://forums.iedotnetug.org/forums/Skins/IEDOTNET/Images/EmotIcons/BigGrin.gif" border="0" title="BigGrin"&gt;ropDownList&gt;&lt;br&gt;        &lt;asp:RequiredFieldValidator ID="valCategory"&lt;br&gt;        Text="(Required)" ControlToValidate="listCategories" runat="server" /&gt;&lt;br&gt;        &lt;br /&gt;&lt;br /&gt;&lt;br&gt;        &lt;asp:Button ID="btnSubmit" runat="server" Text="Submit Form" /&gt;&lt;br&gt;    &lt;/div&gt;&lt;br&gt;    &lt;asp:SqlDataSource ID="SqlDataSource1" runat="server" &lt;br&gt;        ConnectionString="&lt;%$ ConnectionStrings:NorthwindConnectionString %&gt;" &lt;br&gt;        SelectCommand="SELECT [CategoryID], [CategoryName] FROM [Categories]"&gt;&lt;br&gt;    &lt;/asp:SqlDataSource&gt;&lt;br&gt;[/php]</description><pubDate>Sat, 26 Apr 2008 23:46:34 GMT</pubDate><dc:creator>volkanuzun</dc:creator></item></channel></rss>